Eclim daemon is running.
:PingEclim yields
- eclim 2.3.2
- eclipse 4.3.1
File: Foo.java
public class Foo {
public static void main(String[] args) {
System.out.print("Foo");
}
}
By running :Java, I am presented with the error
java.lang.RuntimeException: Required setting 'org.eclim.java.run.mainclass' has not been set.
Now, I know I can manually set the mainclass in the project settings, but this used to work just by running :Java. Additionally I can add that running :Java % is not working either. It simply seems incapable of detecting my main function.
Update
Included the output of :Java % below.
Error: Could not find or load main class .Foo
[java] Java Result: 1
Update 2
It seems Eclim sets the main class the first time it detects and runs a Main function inside a Project. After that, trying to manually run another class containing a main function will result in the above error. Not sure how to work around it, but it should really be possible to not be locked to the class that is run first.
I had the same problem too. Then I found out that if the main class is included in a package, you have to use the full qualified class name. For example, if your main class starts with:
Then use the setting:
After that, it should work fine.