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

2017/8/24

Problem with openning after sharing to jar file

Krzys Krzys

2017/8/24

#
I have made flappyBird as a standard at the beggining with games in JAVA :) and it works fine. I've made jar and on my computer is also working fine but whenI want to give someone this file this person can't open and this error appears: Java Virtual Machine Launcher: Could not find the main class: greenoot.export.GreemfootScenarioMain. Program will exit. My question is why this appears?
Yehuda Yehuda

2017/8/24

#
The other person has to have all the proper Java and Greenfoot files and folders for the .jar file to work properly (I think, I haven't done this sort of stuff in the past two months).
danpost danpost

2017/8/24

#
Yehuda wrote...
The other person has to have all the proper Java and Greenfoot files and folders for the .jar file to work properly (I think, I haven't done this sort of stuff in the past two months).
All the greenfoot classes required to run your project should be included within the packaging of the jar file. I believe that it should be the case that only a JRE being installed would be needed to run the created executable jar file. The error message given above leads me to believe that your version of greenfoot has a bug in creating the jar file. However, if it works on your computer, then it is probably just a missing JRE on OPs system. But, then, I cannot see how that particular message would show. does the error message really say 'Greemfoot'? (with an 'm') and 'greenoot' without the 'f'?
davmac davmac

2017/8/25

#
It could be that they have a JRE but it is too old. They need to have at least the same version as Greenfoot uses - i.e. usually 8.
You need to login to post a reply.