Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Java 1.6

Does xCode support JDK 1.6??? I can't seem to find a download anywhere... I am trying to compile a program for class and I am using the comparable interface and I get an error that says "Generics are not supported in -source 1.3".

MacBook Pro, Mac OS X (10.4.9)

Posted on Sep 14, 2007 1:55 PM

Reply
75 replies

Nov 16, 2007 7:39 PM in response to SteveGoyette

If you want to install the JDK1.6 Preview Release 1 IN LEOPARD you just have to do some minor mods to the file mentioned earlier.

1) move the .pkg file contained on the DMG to somewhere on your hard drive.
2) edit the JavaSERelease1.dist file within the .pkg file's /Content folder as below
NOTE the references I put in RE: 10.6 and the section to be commented out.

apparently whoever wrote this did not consider using it with Leopard
I don't see anything malicious about trying to prevent Leopard usage just a lack of effort to update the package with Leopard in mind.

3) once you save these changes run the pkg and it should install without incident

ENJOY 😉

JB





function rootSystemOK()
{
var sysVersion = system.version;

// Just bail if we can't get the sysVersion
if (!sysVersion) {
my.result.message = system.localizedStringWithFormat('noSysVersion');
my.result.type = 'Fatal';
return false;
}

// system.compareVersions(a,b): Compares two version strings or numbers. Returns:
// -1 if a lt b
// 0 if a == b
// 1 if a gt b

// Make sure they're not 10.6 and they're higher than or equal to 10.4.4...
// Note: this logic needs to be checked/bumped with every Java release
if ( system.compareVersions(sysVersion.ProductVersion, "10.4.4") == -1 )
{
my.result.message = system.localizedStringWithFormat('sysTooOld');
my.result.type = 'Fatal';
return false;
}
//alter this line to say 10.6 not 10.5
if ( system.compareVersions(sysVersion.ProductVersion, "10.6") >= 0 )
{
my.result.message = system.localizedStringWithFormat('sysTooNew');
my.result.type = 'Fatal';
return false;
}
return true;
}

function rootHasEligibleJava()
{
var javaBundle = system.files.bundleAtPath("/System/Library/Frameworks/JavaVM.framework");

// if there's no javaBundle, we can't install
if (!javaBundle)
{
my.result.message = system.localizedStringWithFormat('noJava');
my.result.type = 'Fatal';
return false;
}

// if the JavaVM.framework is less than 11.4.0 ("J2SE 5.0 Release 4"), don't install
// Note: this logic needs to be checked/bumped with every Java release
if (system.compareVersions(javaBundle.CFBundleShortVersionString, "11.4.0") == -1)
{
my.result.message = system.localizedStringWithFormat('needJavaSWU');
my.result.type = 'Fatal';
return false;
}
//comment out the lines below with logic to check your Java install version
// if the JavaVM.framework is greater than 11.6.0 (this release), don't install
// Note: this logic needs to be checked/bumped with every Java release
//if (system.compareVersions(javaBundle.CFBundleShortVersionString, "11.6.0") == 1)
//{
// my.result.message = system.localizedStringWithFormat('javaTooNew');
// my.result.type = 'Fatal';
// return false;
//}
// if Java 1.6's version is greater than 11.6.0 (this release), this volume can't have the update
// Note: this logic needs to be checked/bumped with every Java release
var java16VersionFile = "/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Resources/version.pli st";
if ( system.files.fileExistsAtPath(java16VersionFile) &&
(system.compareVersions(system.files.plistAtPath(java16VersionFile).CFBundleSho rtVersionString, "11.6.0") == 1))
{
my.result.message = system.localizedStringWithFormat('java16TooNew');
my.result.type = 'Fatal';
return false;
}

return true;

}

Nov 16, 2007 8:57 PM in response to SteveGoyette

Hopefully you have ignored the above post by me.

While enabling you to install the 1.6 Preview, the preview itself segfaults when run.

Please disregard the instructions if you can.

MODS please delete my prior message before any other user applies it to their current installation.

The results are not difficult to cleanup but it is annoying to have to do so.

If you want to eliminate the effects of this update then you'll need to modify your JavaVM install.

Please read the following carefully regarding the dates of the files found.

Go to the /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands

you should find that the files here all have a date of sep 5 2006

if so you can delete all of them, otherwise do nothing further.

copy the contents of /System/Library/Frameworks/JavaVM.Framework/Versions/1.5.0/Commands to here and you're done.

Any other artifacts are the contents of /System/Library/Frameworks/JavaVM.Framework/Versions/1.6 and /System/Library/Frameworks/JavaVM.Framework/Versions/1.6.0

they can both be deleted

Let's hope that Apple delivers a new JDK1.6 for Leopard sometime soon.

Dec 7, 2007 6:41 AM in response to etresoft

Main use of Java is in enterprise web applications. Who has latest version installed? Application server has. Application server administrator is deciding what java version is going to be used, and application developer has to/should be using right version. If only one of your customer is using latest version of java, you have no choice. Pardon, you have choice... Switch to Windows or Linux...

Dec 19, 2007 1:17 AM in response to Wade Peeler

Did anyone manage to run eclipse 3.3 with Java 6?

/Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse -vm /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
_NSJVMLoadLibrary: NSAddLibrary failed for /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Libraries/libjvm.dylib
JavaVM FATAL: Failed to load the jvm library.

I want to try to run eclipse with java 6 because I experience so many crashes with leopard in eclipse... Example when I use the type search and I hit enter -> goodby. When I use the mouse and click the button it works. Just one of many examples where eclipse crashes. I want to figure out if Java 6 is more stable.

Thanks for any hints how to run eclipse with this version.

Florian

PS: I have no problem to run my apps within eclipse with Java 6, this is not the question!

Dec 19, 2007 7:55 AM in response to Wade Peeler

It's a shame that it only runs on 64 bit Intel Macs. This means that any one with a G5 or (like me) a Core Duo Mac is going to be disappointed. It also means that anyone wanting to develop with Java 6 is going to find the Mac market extremely limited.

Looks like I'll be sticking with Java 5 for the time being 😉 And since I have no reason to upgrade to Leopard I can save a few dollars by sticking with Tiger. too 😉 😉

Bob

Jan 8, 2008 9:20 PM in response to jmbollard

What the **** is with Apples "attitude" on this. They are snubbing the VERY people that are helping their hardware gain market share. Case in point - I have "sold" over 300 macs in the last 12 months by telling my clients that MacBook Pros were my recommended platform of choice for the Java applications I write for them. Now .. I have to use a friggin Dell (!!!) for development - and can no longer recommend Macs until they get their Java act together - much less take a more transparent, professional approach to their Java on Mac policy. At the VERY least they could tell us WHEN to expect the now 1 year old JDK.
Sun has said that they have offered to manage the Mac version of Java - but Apple continuously says they want to do it themselves. It's like I tell my kids, never say you are going to do something if you either have no plans of doing or or find yourself unable to fulfill your commitment.

I Love my Mac. But I spend most of my time on my Dell. Sad. Apple is definately shooting themselves in the foot on this one - especially by keeping silent about it. Boooooo!!!!

-X

Mar 18, 2008 10:34 AM in response to etresoft

"I just don't understand Mac developers. On other platforms you develop for the user base, but on the Mac as soon as Leopard came out developers were abandoning support for Tiger left, right, and center".

I'm using Windows 2000 on my PC (Wintendo), and despite the fact that it came out in 1999 I didn't run into a program I wanted that I couldn't run on it until just recently.

Ironically, the first program I hit that I couldn't use was the latest Quicktime.

Java 1.6

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.