[Geany-Users] Java in Geany - Fully Qualified Classname

es noyo esnoyo at xxxxx
Wed Nov 7 19:59:53 UTC 2018

How do I get Geany to automatically pick up the fully qualified classname from the java project that I'm working on in order to run the project?

I'm trying to import some java applications I had previously written elsewhere (Windows + Eclipse, though I've only imported the java files, not attempting to import projects).  I've been looking at https://wiki.geany.org/howtos/configurebuildmenu but can't seem to get the settings right.  

So far I've worked out how to get javac up and running. I'm using this entry in the build menu: 
Command field:   javac "%f" -d /home/me/Documents/Java/Classes -cp /home/me/Documents/Java/Classes
so that it finds source files and leaves classfiles in the structure below:
As I said, this looks like it is working ok.

The problem is what command string to use in the execute part of the build menu. I've tried: 
Command field:   java -classpath /home/me/Documents/Java/Classes "%e"
Working directory field:   /home/me/Documents/Java/Classes

However I'm getting the error: "Error: Could not find or load main class".

Clearly I can see that it doesn't have the right form of classname in it. I know the java command is supposed to use the Fully Qualified Classname of the form "java com.example.ProjectA".  Obviously I want it to pick this up automatically from the project. How do I do this?

Thanks for any clues

Professional Virtual Office

More information about the Users mailing list