tags:

views:

164

answers:

5

A while back I released an application in Java. While I targetted it for Java 6, I realized that there was a significant Macintosh user base. At the time, Apple had not gotten around to creating a JRE 6 for their users, so I had to make the application compatible with both Java 5 and 6.

Now I've returned to that project and realize that I can't support those users any more; Sun won't let me download the JDK 5 anymore because it's end of life. So I'm caught at a crossroads; as far as I can tell, PPC Mac users still don't have a JRE 6 to use.

So I ask this question: How do I resolve this predicament? I still want to support those users, but I simply don't have a JDK with which to build. Has Apple released a JRE 6 for their PPC users? Is there an alternate way to get JDK 5 (other than becoming a business member of Sun)? Is there some alternative recommendation to supporting these users?

Regards, -- Shirik

EDIT: Some additional info, if Apple has released Java 6 for PPC, how easy is it to get? I ask this because I'm still constantly seeing logs from my users which indicate PPC architecture with a Java 5 VM.

+8  A: 

You could use -target 1.5 -source 1.5 with your Java 6 JDK, to generate 1.5-compatible class files.

Borealid
Thanks, this was actually very helpful. I may look into this option in the future, but for right now the development environment I use doesn't support multiple configurations of JDK arguments. However, this is a very good solution and deserves a +1 (unfortunately I can't accept multiple answers).
Shirik
Is there anything in Java 6 that you particularly _need_? A Java 5 application should run fine on a Java 6 JRE, so unless there's a feature you need from 6, why not develop entirely for 5?
Brian S
@Brian S, that's what I'm trying to do, actually, it's just very difficult to double-check yourself without a JDK 5 at your disposal (you might accidentally use a Java 6 feature; I've done it before).
Shirik
@Shirik: if you specify the arguments I suggested, your code will not compile if you use a Java 6 feature.
Borealid
@Borealid: I figured that, it's just a shame that my development environment doesn't support multiple compiler argument sets right now (so I wouldn't be able to set up multiple builds that way). However, your suggestion is a great long-term solution if I can resolve that issue (which I will be trying to do over time).
Shirik
@Shirik: That's exactly my question. If `-target 1.5 -source 1.5` is a solution to your problem, why do you need other builds? What's the build command you're using now that prevents you from forcing javac into version 1.5? Because the only reason I can think of where you couldn't add those commands would be if you were using those command on some other version. And so far, it seems your only concern is with 5 and 6, and you say compiling as 5 is a good long-term solution. Why, exactly, does no access to multiple builds prevent you from doing this?
Brian S
+4  A: 

You can download Java 5 from Sun. You just have to look in the right place.

Note that these are all existing public releases. The material you got from Sun would have said there would be no new public releases of Java 5.0. They were pointing out that if you needed patches for recently discovered security issues and other bug fixes for Java 5.0 etc, you would have to pay for them.

Obviously, JDKs for Apple platforms are not available from Sun, but this is nothing to do with the fact that Sun have "end-of-lifed" Java 5.0. The fact is that they have never been available from Sun ...

Having said that, in the long term you need to be able to migrate your application to Java 6.0, 7.0 (due out later this year) and so on. At some point you are going to have to draw the line and say "sorry ... no more updates" for the shrinking number of users with old PPC and 32-bit Intel Macs.

Stephen C
So I can. When I started getting harassed by forms to fill out and links to the extended service offers by Sun, along with the message "we are no longer offering public releases" I stopped going further. I should have continued where I was going.
Shirik
+3  A: 

As far as I know, Apple has only released Java 6 for x86-64, and I'd be willing to bet my hat that they will never release Java 6 for either PPC or for plain old 32-bit x86 (note that every Mac released after about mid-2007 or so is x86-64).

Adam Rosenfield
Sounds like a safe bet. 2007 was also the last major release of their operating system to support PPC.
Ken
+1  A: 

Soylatte might work (I have not tried it myself).

TofuBeer
A: 

If you want to support older platforms, including PowerPC macs, it is a good idea to write code that can run on older Java releases. These days Java 5 is a relatively safe bet, but you may want to go even further and e.g. use retroweaver to generate Java 1.4.

Thorbjørn Ravn Andersen