Java 1.5 incompatibilities
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
5 posts
• Page 1 of 1
Java 1.5 incompatibilities
by silly freak » 25 Aug 2010, 21:27
Hi! since there are currently problems with the 1.5 compatibility, and I have a 1.5 JDK installed, I thought I'd help you a little with at least pointing out where you're using 1.6-only APIs. I'm afraid that none of these are the cause for the current problems, but I'm investigating them, too
@Chris: how do you create the release jars? maybe I can create a compatible version or determine what settings work and which don't, even with 1.6
- Code: Select all
Description
Resource
Path
Location
Type
The method getFreeSpace() is undefined for the type File
GUI_ImportPicture.java
/ForgeSVN/src/forge
line 101
Java Problem
The method setIconImage(null) is undefined for the type GUI_Filter
GUI_Filter.java
/ForgeSVN/src/forge
line 148
Java Problem
The method setIconImage(null) is undefined for the type GUI_Quest_Filter
GUI_Quest_Filter.java
/ForgeSVN/src/forge
line 144
Java Problem
@Chris: how do you create the release jars? maybe I can create a compatible version or determine what settings work and which don't, even with 1.6
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: Java 1.5 incompatibilities
by Chris H. » 26 Aug 2010, 00:49
Thank you for offering your help. I may provide more info than needed, feel free to ignore anything that is not important.
And ask questions if I fail to explain myself clearly.
I use an Apple iMac computer running the Snow Leopard OS 10.6.4. This OS only has java 6. It looks like there is earlier versions of java on my computer but they are just a link to java 6. Sun does not release java updates for Apple. Instead, Apple releases it's own java updates.
I have two different workspaces set up. "workspace" contains my local copy of the SVN code which is named "ForgeSVN". Below are 2 screenshots of my preferences for this workspace.
`

I use an Apple iMac computer running the Snow Leopard OS 10.6.4. This OS only has java 6. It looks like there is earlier versions of java on my computer but they are just a link to java 6. Sun does not release java updates for Apple. Instead, Apple releases it's own java updates.
I have two different workspaces set up. "workspace" contains my local copy of the SVN code which is named "ForgeSVN". Below are 2 screenshots of my preferences for this workspace.
`
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Java 1.5 incompatibilities
by Chris H. » 26 Aug 2010, 00:57
I have a 2nd workspace named "workspace -> TEST". I build my testing experimental projects in this workspace. I copy and paste the src, res, prefs, etc files from my workspace devoted to the SVN copy over to this testing workspace.
This allows me to go crazy with my coding experiments without corrupting our SVN. This 2nd workspace has the same preference settings.
My beta release copies for our forum are built in this 2nd workspace. I Project -> Build Project and Run -> Run As -> 2 Java Application. At this point I then File -> Export… -> Runnable JAR file and this will build the JAR file.
I use the simple normal way to build and export the JAR. I am not sure if some sort of a script could be put together that I could then run on my computer.
This allows me to go crazy with my coding experiments without corrupting our SVN. This 2nd workspace has the same preference settings.
My beta release copies for our forum are built in this 2nd workspace. I Project -> Build Project and Run -> Run As -> 2 Java Application. At this point I then File -> Export… -> Runnable JAR file and this will build the JAR file.
I use the simple normal way to build and export the JAR. I am not sure if some sort of a script could be put together that I could then run on my computer.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Java 1.5 incompatibilities
by silly freak » 26 Aug 2010, 09:31
Thanks, I tried to create the jar using you settings with OpenJDK 1.6 and don't get the "bad class version" error any more with 1.5. Admittedly, It doesn't really run on my machine, but that is because my java installation seems to be faulty. No problem with 1.6, though.
the attached file is just the jar, renamed to make the forum happy.
the attached file is just the jar, renamed to make the forum happy.
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: Java 1.5 incompatibilities
by Chris H. » 26 Aug 2010, 12:33
`silly freak wrote:Thanks, I tried to create the jar using you settings with OpenJDK 1.6 and don't get the "bad class version" error any more with 1.5. Admittedly, It doesn't really run on my machine, but that is because my java installation seems to be faulty. No problem with 1.6, though.
the attached file is just the jar, renamed to make the forum happy.
Thank you. It works on my Mac with java 6, with luck Slowe will be able to use this with the newest forge beta. And once again, thank you for your help and assistance on figuring this one out.


-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 47 guests