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

2016/1/5

Exporting to .jar problems

1
2
danpost danpost

2016/1/6

#
You should only need click the 'Share' button at top-right corner of main greenfoot frame and select to export as an application. The executable jar file created will run outside of the greenfoot application.
matttic97 matttic97

2016/1/7

#
Yes and I did that but when I open the jar file it appears small Greenfoot window with 3 buttons(act,run,reset).There is non of background,objects...
danpost danpost

2016/1/7

#
It might be easiest if you upload the project here on the site, including the source code (checking the 'Publish source code' checkbox). Then we could test its ability to create jar files from it and maybe come up with a solution.
matttic97 matttic97

2016/1/7

#
here it is http://www.greenfoot.org/scenarios/15821
matttic97 matttic97

2016/1/7

#
and as you see it's a same problem here on site, it is only white screen with no backgraound,objects...
danpost danpost

2016/1/7

#
The 'images' folder of your project folder is missing the image file -- "flappybird3.png".
matttic97 matttic97

2016/1/7

#
ohh i have to add pictures that are in folder on C:\\ where greenfoot is installed?
matttic97 matttic97

2016/1/7

#
oh yes now I know whats problem I will try that tnx
matttic97 matttic97

2016/1/7

#
tnxx it work now on this site..but still when i export it in project folder it doesn't want to open
danpost danpost

2016/1/7

#
matttic97 wrote...
ohh i have to add pictures that are in folder on C:\\ where greenfoot is installed?
It does not matter where the images come from -- as long as copies of them are placed in the 'images' folder of the project folder. If a wanted image is already on your system, you can use the greenfoot application to import the files by right clicking on the class and selecting 'Set image..' on the drop-down menu; then, click on the 'Import from file...' button and browse your directory to select the appropriate file. You can always either reset the default image for that class or select 'No image' to reset the default after importing the file (which places a copy of the file selected in the 'images' file).
matttic97 matttic97

2016/1/7

#
Yes i know i already import new pictures I just forgot to add flappy3.png so thank you for that:) now i when i open jar file is nothing.Before it was just scenario buttons but now its nothing:o i will restart pc maybe this will help.What program do you use for opening jar files?I think i do Java Platform SE binary
danpost danpost

2016/1/7

#
You did not check the 'Publish source code' checkbox when uploaded the revised scenario. So, I just copied and renamed one of the other flappybird images. I was able to export and run the project in the form of an "application jar file". I believe I use the same program for opening these files. I am using greenfoot 2.3.0 USB which I have had very little trouble with (hence, not updated to newer version).
matttic97 matttic97

2016/1/7

#
When I open with cmd is this thread: Exception in thread "main" java.lang.NullPointerException at java.util.Hashtable.put(Unknown Source) at java.util.Properties.setPropertiy(Unknown Source) at java.lang.System.setProperty(Unknown Source) at greenfoot.export.GreenfootScenarioMain.main(GreenfootScenarioMain.java) a:78)
danpost danpost

2016/1/7

#
I hope you are not trying to open the jar file within greenfoot. Just find the created executable jar file for the scenario in your directory and double-click on it to start it.
matttic97 matttic97

2016/1/7

#
No,I tried that and it doesn't work I mean nothing shows up..
You need to login to post a reply.
1
2