I have multiple .java files in a folder. I try to compile them separately from the command line, but it gives me errors saying it can't find objects of the other classes. So do I compile the folder as a whole? If so, how do I go about that?
Printable View
I have multiple .java files in a folder. I try to compile them separately from the command line, but it gives me errors saying it can't find objects of the other classes. So do I compile the folder as a whole? If so, how do I go about that?
try using jCreator or something like that...then you put all files in a project and compile the project.
Well I'd like to know how to compile it specifically from the command line. Because in the IDE, they build successfully, but when I use the javac <path>.java command, I get the errors about not recognizing other classes...which confuses me.
Hmmmm...interesting. what about telling the compiler to use all .java files.
do cd<path> whern you are in the folder try:
javac *.java
I assume this should look for all .java files, stack them and compile...
The doc for javac should explain it all for you.