This content has been marked as final. Show 5 replies
Put only the directories that contain spaces into quotes, like so:
c:\"documents and settings"\ejp\*.java.
thanks. it works!
I have another question - when I do -classpath for directory or when I compile a directory - it works only for the same folder and not for sub directories - is there a command that make the javac to work on sub folders as well?
something like the /s in the dir command.
Not in javac. You should investigate a tool like ANT or MAVEN.
I need to run the compilation from a code - I know how to batch from code - that why I wnated to use the javac.
can I activate the ANT or MAVEN also from code?
ANT & MAVEN are better than your code, excellent though it no doubt is ;-) but yes, you can execute any executable from Java, with Runtime.exec().