twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
1.06k stars 67 forks source link

Cannot run java code #304

Closed Emporio-a closed 10 months ago

Emporio-a commented 10 months ago
image

I'm new to java. Maybe my java path is wrong. Can anybody tell me where is the location of java path? Is it the file named "java.exe"?

Emporio-a commented 10 months ago
image

Here is the path I'm recently using.

twibiral commented 10 months ago

I think there is something wrong with the spaces before the main function. Try this:

public class HelloWorld{
public static void main(String[] args){
System.out.println("Hello World");
}
}
Emporio-a commented 10 months ago

I think there is something wrong with the spaces before the main function. Try this:

public class HelloWorld{
public static void main(String[] args){
System.out.println("Hello World");
}
}

Thank you!I really appreciate the job you have done!