Is it possible to run a JME game from terminal(using javac ...)?

Basically, my teacher is making me submit a java file rather than a jar file for my game. Would it be possible to run a JME game from terminal by doing

javac filename.java
java filename

I’ve only done work in the SDK so I’ve only been using the run function to test out my game and clean and build to export my game.

1 Like

You still need the jME libraries (jar files) to run a jME game. It seems to me like your teacher expects something much simpler, with no external libraries – and consequently no jME.

I have basically built a simple bash build script “Ccoffee” for raspberries, i did some jMonkeyEngine examples, you can check them :

you will refer to buildJava.sh and variables.sh.

Remember, this is never simpler, its a heart burn to take care of every jar and manage your file systems using bash…

Note : if you are on windows, you can still run bash commands using windows terminal ubuntu or git bash…because i haven’t had powershell equivalent files.

EDIT :
The final result for this is a jar file too, jar = java executable, javac just compiles files into byte code, but you need jar command for packaging those byte codes with their dependencies and a manifest to locate these files, so basically you cannot run a java file in jme without being packaged into a jar…