Hello! Is there anyway to make TextPad put the .class files into one folder and keep the .java files in a sepearate folder , while still being
able to run the program?
Right now, it seems I have to have the .class files and .java files in the same folder to run them in TextPad.
Thanks for any help!!
Class files and .java files
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
Assuming you have the destination directory already created, pass the -d paramter to the javac executible with the name of the output directory.
F:\java>dir /s
F:\java\bin
F:\java\src
F:\java\src\Foo.java
F:\java>javac -d bin src\Foo.java
F:\java>dir /s
F:\java\bin
F:\java\src
F:\java\bin\Foo.class
F:\java\src\Foo.java
I'm too lazy to look through the fine TP help to remember what the parameter substitution should be on the output directory but you get the idea.
F:\java>dir /s
F:\java\bin
F:\java\src
F:\java\src\Foo.java
F:\java>javac -d bin src\Foo.java
F:\java>dir /s
F:\java\bin
F:\java\src
F:\java\bin\Foo.class
F:\java\src\Foo.java
I'm too lazy to look through the fine TP help to remember what the parameter substitution should be on the output directory but you get the idea.
I choose to fight with a sack of angry cats.