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

2013/5/15

Downloading your own scenarios.

JMiller JMiller

2013/5/15

#
I do not have the scenario I uploaded to the website gallery ( around roughly a year ago ) because I misplaced the storage device ( Flashdrive ) , but I would like to work on it again. Is it there any possibility to download scenario's that you have uploaded on your account to the website's gallery gallery? Potentially Useful Facts: The account used to start this discussion has uploaded the project. Greenfoot does not work on my home computer, but my school computers run it just fine. I'm a terrible problem solver, so this is why I immediately posted onto the discussions before going in depth for a solution.
danpost danpost

2013/5/15

#
Your scenario, Labyrinth Hijinks, was not uploaded with source code included; therefore you cannot recover the source code.
erdelf erdelf

2013/5/15

#
you could download the jar file and then decompile it
danpost danpost

2013/5/15

#
@erdelf, how can JMiller download it if there is no 'Open in Greenfoot' button to select download on?
JMiller JMiller

2013/5/16

#
Fortunately my AP Java Instructor was kind enough to locate the file for me in her archives ( She likes to use past projects as references ), so I thank you for atleast trying. On another note, I'm curious about one more thing. How does my game manage to run on this website if it's not the greenfoot source code? This is just a curiosity question, it's not "vital" or "important" that you answer this.
davmac davmac

2013/5/16

#
The source code is compiled to" byte code" and it is the byte code that is uploaded and that runs. Many programming languages work like this - you compile the source into some kind of binary format, and you run the binary. A lot of the information in the source code is lost in the process, so it's not trivial to get the source code back from the binary.
erdelf erdelf

2013/5/16

#
@danpost, you can just download the jar file and decompile it
danpost danpost

2013/5/16

#
You cannot download it unless the source was given to begin with. Maybe you can have one of the Greenfoot team email the 'byte-code' file to you, but otherwise, you do not have access to any code.
erdelf erdelf

2013/5/16

#
didn't I give you a copy of a scenario you made, because you lost your version?
danpost danpost

2013/5/16

#
Not me!
erdelf erdelf

2013/5/16

#
oh yeah, I looked again it was another guy. next time you are on a scenario page just look in the html source and search after this line ( the numbers change for every scenario )
archive="/applet_attachments/0001/9312/greenfoot1003466325928914861.jar"
then just write this in your browser
greenfoot.org/applet_attachments/0001/9312/greenfoot1003466325928914861.jar
danpost danpost

2013/5/16

#
What will that do? and how will one regain the source from that?
erdelf erdelf

2013/5/16

#
it will download the jar file. you can just use a decompiler on this file and you have your source
You need to login to post a reply.