I have simple structure:
./out - binary
./src - source
At src
I have Main.java
, where very simple code:
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
I try to compile, with ProcessBuilder
, there is lines of commands:
new EnhancedProcess("javac",
"-d", Project.getPathOut(),
"@" + Project.getPathOut() + File.separator + "source.txt").start();
javac -d /home/username/projects/zxcf/out @/home/username/projects/zxcf/out/source.txt
source.txt
has lines, where catched *.java
files:
/home/username/projects/zxcf/src/Main.java
And catch issue:
/home/username/projects/zxcf/src/Main.java:1: error: class, interface, or enum expected Main.java
^
1 error
What is this can be?