Hydrox Hydrox - 1 year ago 73
Java Question

How to set the output of a JAVAC compiled file

Hello if you have seen my previous question it said how to compile files with the command

and i currently don't know how to set the output file of the compiled data can somebody please help


The output of javac is always classfiles, and the name of the file matches the name of the class contained within it. (A source file with multiple classes in will result in multiple output files.)

If you use the -d command line option, javac will also use the package of the class to generate a directory hierarchy, with the -d option specifying the root. Otherwise, each class file will be output in the same directory as the source file from which it was compiled.