Как скомпилировать .java?

Рейтинг: -1Ответов: 1Опубликовано: 19.03.2015

Как можно в линукс скомпилировать исходный код в .class, так чтобы с указанием пути, куда надо класть выходной файл?

Ответы

▲ 3

На просторах интернета нашел:

By default, "javac" will output the class file in the same directory as the source file. But you can change this default behavior by using the "-d" option. It will make "javac" to output the class files into the specified directory.

javac -d .\cls .\com\herong\util\PackagedHello.java