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;
}