Java 1.5 Support?

What’s our policy on Java 1.5 support for Vassal 3.2? The current build does not compile or run (after fixing compile errors) using Java 1.5.

Joel was just asking if we should bump the windows installer to suggest Java
7. Macs are still on 6. I think that is probably where we are going to want
to be with 3.2 but I think we are still compiling everything with 5 for
compatibility reasons?

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Brent Easton
Sent: Tuesday, July 31, 2012 6:42 PM
To: messages@vassalengine.org
Subject: [messages] [Developers] Java 1.5 Support?

What’s our policy on Java 1.5 support for Vassal 3.2? The current build does
not compile or run (after fixing compile errors) using Java 1.5.


Read this topic online here:
https://forum.vassalengine.org/t/java-1-5-support/5160/1

No, I don’t believe so. The current trunk does not compile under 5 and (at least) one of the libraries is compiled under 6 that causes Vassal to crash on a 5 system.

Thus spake Brent Easton:

What’s our policy on Java 1.5 support for Vassal 3.2? The current build
does not compile or run (after fixing compile errors) using Java 1.5.

I wasn’t intending to drop support for 1.5, since there are still some
old Macs which have nothing newer.

What doesn’t compile?


J.

Thus spake Brent Easton:

but I think we are still compiling everything with 5 for
compatibility reasons?

No, I don’t believe so. The current trunk does not compile under 5 and
(at least) one of the libraries is compiled under 6 that causes Vassal
to crash on a 5 system.

I always compile with the “-source 5 -target 5” flags. Unfortunately
they don’t do the sensible thing for them to do, which is give errors
for JDK methods which didn’t exist in Java 5.

I’ll need a list of the errors.


J.

I asked what you were getting for errors a while back. Could you give me a list so I can look into which libraries are causing the problem?

Sorry Joel,
Here you go.

  1. VASSAL.build.module.StartupGlobalKeyCommand
    @override’s at lines 74,85, 89 and 96 throw an error.

  2. VASSAL.tools.BrowserSupport
    java.awt.Desktop does not exist in 1.5.

  3. VASSAL.tools.swing.EDTExecutorService
    @overrides at lines 174 and 212

The @overrides are trivial and while the Desktop issue will not compile under 1.5, it is not referenced if you are running 1.5, so the version compiled in 1.6 will never throw an error!

Not such a big deal.
Regards,
Brent.

Thus spake Brent Easton:

Sorry Joel,
Here you go.

  1. VASSAL.build.module.StartupGlobalKeyCommand
    @override’s at lines 74,85, 89 and 96 throw an error.

  2. VASSAL.tools.BrowserSupport
    java.awt.Desktop does not exist in 1.5.

  3. VASSAL.tools.swing.EDTExecutorService
    @overrides at lines 174 and 212

The @overrides are trivial and while the Desktop issue will not compile
under 1.5, it is not referenced if you are running 1.5, so the version
compiled in 1.6 will never throw an error!

I’ll remove the overrides tomorrow.

The java.awt.Desktop issue is a funny one. There’s one other place in
the code where we do some trickery to keep some classes from being
loaded—this is how the special Mac UI classes work. I can just do the
same thing with Desktop.

Thanks.


J.

Thus spake Brent Easton:

Sorry Joel,
Here you go.

  1. VASSAL.build.module.StartupGlobalKeyCommand
    @override’s at lines 74,85, 89 and 96 throw an error.

  2. VASSAL.tools.BrowserSupport
    java.awt.Desktop does not exist in 1.5.

  3. VASSAL.tools.swing.EDTExecutorService
    @overrides at lines 174 and 212

The @overrides are trivial and while the Desktop issue will not compile
under 1.5, it is not referenced if you are running 1.5, so the version
compiled in 1.6 will never throw an error!

I’ve removed the overrides in trunk@8337.

Do you mean that BrowserSupport works running under Java 1.5 if it’s
compiled with 1.6? If that’s so, then it doesn’t need changing. We
want V3.2 to run under 1.5 (for people with old Macs) but there’s no
need to restrict compilation to 1.5.


J.