Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java command line option using @ symbol

Tags:

java

When invoking the 'java' process, I'm almost certain there is a way to have Java expand the contents of a file into a set of additional command-line arguments using the "@" symbol.

Something like:

java @myfile -cp foo -Dbar=baz com.mydomain.MyApp

And then the contents of "myfile" will be used as additional parameters.

It doesn't seem to work, but I'm certain that something very similar used to work. I've searched high and low but can't find anything on the InterNETs to help. Its driving me nuts! Someone please refresh my memory or lock me up.

like image 369
plinehan Avatar asked Sep 20 '25 07:09

plinehan


1 Answers

It's probably the compiler you're thinking of:

javac [ options ] [ sourcefiles ] [ classes ] [ @argfiles ]

http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html

like image 177
David Z Avatar answered Sep 22 '25 02:09

David Z