This site requires JavaScript, please enable it in your browser!
Greenfoot back
SoySoy4444
SoySoy4444 wrote ...

2020/4/14

Running .jar

SoySoy4444 SoySoy4444

2020/4/14

#
Note: I have a Mac. I finished my game and exported it as a .jar. I tried to open it but it keeps on coming up 'The Java JAR file "filename" could not be launched. Check the console for possible error messages.' I copy pasted the command Greenfoot gives "/private/var/folders/g3/8kbv7g411r32xwzp2681_s540000gn/T/AppTranslocation/D6077ABE-1117-4F8B-811E-730C78C0D370/d/Greenfoot.app/Contents/JDK/Home/bin/java" -cp "/private/var/folders/g3/....... onto terminal and it works on my mac, but on the Greenfoot website it says
If you want to run the scenario, on another machine, you will need to adjust the command-line to point to their local Java and JavaFX installation. You may find it easier to get them to install Greenfoot (which comes with Java and JavaFX) and play the scenario within Greenfoot, or to export it to this website and let them play online.
What does it mean to adjust the command-line to point to their local Java and JavaFX installation? Which part of the command do I change? Is it just at the end of the second "/private... " block where there's a path to a filename like Greenfoot.app/Contents/Resources/Java/javafx/lib/javafx.web.jar:/Users/username/pathtofile/filename.jar" --module-path ? Are there other part s of the command I have to change?
You need to login to post a reply.