javageany

Can you compile and execute Java files in Geany with one command?


Is there a way to compile and execute java files using one command, say F1, in Geany?

Its much more comfortable than having to click f5 to wait for the class to compile first, then F1 to execute that compiled file.


Solution

  • You could try creating a shell script that first compiles the class and then runs it. Then set up this shell script instead of pointing Geany to javac and java respectively.

    On the downside, you will have to handle compilation failures in the script, which sounds ugly.

    I would recommend to stick with the existing workflow in Geany.

    If you're looking for advanced functionality, you might want to consider upgrading to a real IDE like Eclipse or Netbeans.