> I'm trying to compile src code for a large package I downloaded, all of a
> sudden I'm realizing after compiling I have all the classes in same folders
> where .java files are.. is there a way to separate src files from classes to
> turn entire package back into a jar file?
You can tell javac where to get the source files and where to put the class
files.
> (or is it ok to convert to a jar file if source files are in same dirs w/the
> classes?) I've never had to compile a large package like this before..
>
> guy who wrote package has been helping me a bit, he says to compile entire
> package by doing "javac nu\fw\jeti\backend\Start.java"
> (I don't understand how compiling Start.java compiles entire package...)
If javac can't find a class file for a class mentioned in Start.java, it will
search for a source file and compile that. Recursively.
> but not all .java files in package get compiled..
>
[quoted text clipped - 8 lines]
> (and how come files in nu\fw\jeti\plugins\emoticons DO get compiled when
> command to compile was "nu/fw/jeti/backend/Start.java
Don't be afraid to use your brain.
> this is basically for an applet I dl'd that we need here at work, can't use
> if can't re-compile all source code.. (b/c will need to change some
[quoted text clipped - 7 lines]
> well, is ANT the only way? or can this be done "by hand"?) thank you..
> Frances
You could try to write a simple shell script that does all the work for you.
Lets say you have directory A with a buch of *.java files.
To compile them all use javac *.java -d B
where B is the directory where all your classes will go, this will
compile all your java source code.
file directory
A
-aClass.java
-bClass.java
-B
--aClass.class
--bClass.class
That should work.
Use this for any further reference.
http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javac.html
Frances Del Rio - 16 Jun 2005 15:05 GMT
> Lets say you have directory A with a buch of *.java files.
> To compile them all use javac *.java -d B
[quoted text clipped - 13 lines]
> Use this for any further reference.
> http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javac.html
this is exactly info I was looking for, thank you very much...
Frances