compiling from a txt file
I use to be able to compile a txt file that had all my source files listed in it like this:
occupant.java
goodguy.java
morphon.java
...
I can't remember what I typed at the console. It was something like javac @ compile.txt (but not that). Does anyone know how this is done? Thanks.
Re: compiling from a txt file
See: javac - Java programming language compiler
There's a section called Command Line Argument Files and should be what you want (from what I read, you're syntax is very close to being correct, simply remove the space between @ and compile.txt)
Re: compiling from a txt file
You should save .txt as .java and then at command prompt
Code :
javac filename.java
java filename
Re: compiling from a txt file
Quote:
Originally Posted by
Mr.777
You should save .txt as .java and then at command prompt
Code :
javac filename.java
java filename
He's looking to create a text-file which has javac compiler settings. This doesn't have to be a .java file (actually, it's a bad idea to name this as a .java file because this doesn't contain any Java source code).
Re: compiling from a txt file
Quote:
Originally Posted by
helloworld922
See:
javac - Java programming language compiler
There's a section called Command Line Argument Files and should be what you want (from what I read, you're syntax is very close to being correct, simply remove the space between @ and compile.txt)
Thanks, this worked.
And sorry for not replying earlier. My computer crashed and I had to reinstall everything.