Page 1 of 1

Java 1.5 incompatibilities

PostPosted: 25 Aug 2010, 21:27
by silly freak
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

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
the problems are based on r1825. I resolved a few easy ones on the fly.

@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

Re: Java 1.5 incompatibilities

PostPosted: 26 Aug 2010, 00:49
by Chris H.
Thank you for offering your help. I may provide more info than needed, feel free to ignore anything that is not important. :wink: 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.

`

Re: Java 1.5 incompatibilities

PostPosted: 26 Aug 2010, 00:57
by Chris H.
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.

Re: Java 1.5 incompatibilities

PostPosted: 26 Aug 2010, 09:31
by silly freak
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.

Re: Java 1.5 incompatibilities

PostPosted: 26 Aug 2010, 12:33
by Chris H.
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. =D> :D