compilex
compilex copied to clipboard
Not working with centos
Hi, I am using it for compiling java code . But it in local window machine its working fine. But it's not working on the server. Which is centos and java 7 installed on it.
It's throwing this Error: Could not find or load main class Main
if (lang === "Java") {
//if(inputRadio === "true")
if (input) {
var envData = { OS: "linux" };
console.log(code);
compiler.compileJavaWithInput(envData, code, input, function(data) {
res.send(data);
});
} else {
var envData = { OS: "linux" };
console.log(code);
compiler.compileJava(envData, code, function(data) {
res.send(data);
});
}
}
Could you also post the java code, that you tried to compile ?
I haven't tried this combination (centOS + java 7) yet. Let me try it out after you post the java code that you are trying to compile.
Ya am trying with basic helloworld.
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
I tried to compile this directly in server its working fine. While trying through compilex it's giving the above error.
I have checked the temp folder on the server. It's creating the Main.java file but class file is not there.
+1
Hi, I just now deprecated this package. Please read the deprecation notice for alternative solutions.
Thanks.