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

2015/12/8

Using Java 6/7 with Greenfoot 3.X?

decadence18 decadence18

2015/12/8

#
Is it possible to use an older JDK with Greenfoot 3.x.x? I'm working on a program that'll run on Windows XP machines, which officially support Java 7 at the maximum. The "Hide Controls" option when exporting the program as a JAR file is absolutely wonderful, as it allows me to expand the size of the control screen. Is there either a way to use Java 6/7 with Greenfoot 3, or is there a way to add in the "Hide Controls" option to Greenfoot 2.4?
Super_Hippo Super_Hippo

2015/12/8

#
I am using Greenfoot 3.0.0 with Java 7. Did any problem occur or are you only asking if it is possible?
decadence18 decadence18

2015/12/8

#
Super_Hippo wrote...
I am using Greenfoot 3.0.0 with Java 7. Did any problem occur or are you only asking if it is possible?
I recently compiled my program with Greenfoot 3.0.1 on a Windows 7 machine, and when I attempted to run it in the Java 7 VE it gives me a version error. I asked mainly if it could be done, because it says on the "Installation Instructions" page that it requires Java 8+.
davmac davmac

2015/12/8

#
Super_Hippo:
I am using Greenfoot 3.0.0 with Java 7
I don't think that is possible. Greenfoot 3 is built with Java 8 and the class file format is not compatible with prior versions of Java. Check your "About" dialog and see what Java version is listed there. decadence18: It's not possible to use an older version of Java with Greenfoot 3.0+. You need Java 8.
Super_Hippo Super_Hippo

2015/12/8

#
Hm, that is interesting. In the About dialog, it says 1.8.0_60. But if I open the Java Control Panel, it says 1.7.0_71-b14, so I use Java 7 outside Greenfoot. Probably Greenfoot installed it automatically then.
davmac davmac

2015/12/8

#
Probably Greenfoot installed it automatically then.
- right; actually Greenfoot is bundled with the Java 8 JDK. (In prior versions, you could get Greenfoot either bundled with JDK, or without, in which case it would use a JDK that you had installed. For Greenfoot 3 we released a bundled version only - I had forgotten this until you mentioned it).
decadence18 decadence18

2015/12/8

#
davmac wrote...
For Greenfoot 3 we released a bundled version only - I had forgotten this until you mentioned it).
Are there any plans to release a version that either is un-bundled or supports older Java versions? If not, is there a way of emulating the "Hide Controls" option from Greenfoot 3 in Greenfoot 2.4?
davmac davmac

2015/12/9

#
Are there any plans to release a version that either is un-bundled or supports older Java versions?
No to both.
If not, is there a way of emulating the "Hide Controls" option from Greenfoot 3 in Greenfoot 2.4?
Nothing that's officially supported. Of course, Greenfoot is open source so you are able to modify it (though this would require a certain level of ability).
Super_Hippo Super_Hippo

2016/2/2

#
I think it is related to what was posted here, so I don't create a new topic. Is it wanted that scenarios, which are exported from 3.0.0, can't be opened here on the website without Java 8 being installed? I mean, I have Java 7 installed, so I can open scenarios which were not built in 3.0.0. This version comes with Java 8, so even if nothing special is used, it gives me an error when trying to open the scenario. This also happens for scenarios which were published earlier and were updated with 3.0.0. I ask because I think that the UserInfo class is still not supported by Java 8. Or, in other words, it can't be used because of some Java 8 security settings... you know what I mean. At least I didn't see anything new related to the UserInfo class. So if I see this correctly, I can either use Java 7, am able to use the features like high score tables, but can't open new scenarios (3.0.0+) or I update to Java 8 and it is the other way around? Is there anything planned in the near future whichwill make the UserInfo class work with Java 8 here on the site? PS: What I just read is that Oracle plans to completely shut down java in browsers if I understood that correctly, because the browsers in the future won't support plug-ins anymore (just like Microsoft Edge for example). What will happen to this website then?
davmac davmac

2016/2/3

#
Is it wanted that scenarios, which are exported from 3.0.0, can't be opened here on the website without Java 8 being installed?
"Wanted?" - no. But it's the current state of affairs, and there's not much we can do about it right now. If you compile code with a Java 8 JDK then by default the resulting class files won't run on an earlier JDK. In reality, everyone should probably be using Java 8 by now. Java 7 isn't going to be supported for ever, and there are security issues to worry about.
I ask because I think that the UserInfo class is still not supported by Java 8. Or, in other words, it can't be used because of some Java 8 security settings... you know what I mean.
I do know what you mean, and you're right that this is still problematic. Unfortunately we have higher priority issues right now, although we'd like to fix this.
So if I see this correctly, I can either use Java 7, am able to use the features like high score tables, but can't open new scenarios (3.0.0+) or I update to Java 8 and it is the other way around?
Correct, though you can always use Java 8 and edit your security settings appropriately, and then UserInfo will work.
PS: What I just read is that Oracle plans to completely shut down java in browsers if I understood that correctly, because the browsers in the future won't support plug-ins anymore (just like Microsoft Edge for example). What will happen to this website then?
The website will still exist, and you'll still be use the "open in Greenfoot" function. We've also discussed exporting scenarios to Javascript so that they can run without a plugin, but that is currently only an idea and will take a lot of implementation effort.
Super_Hippo Super_Hippo

2016/2/3

#
Wow, I must have overlooked this thread. Got it to work, thank you really much! Good to hear that you are aware of this problem and already have ideas on how to work around it.
You need to login to post a reply.