Java layout and licensing (neophyte questions)?

ur123

Registered
A couple naive questions about Java on OS X, re how its arranged, licensing, etc.

Motivation: I have a Java app that I'm getting ready to distribute. I've prepared Linux and Windows distributions, but OS X is proving to be a problem because of the lack of a 1.5 jre. However, I gather that there is beta version available for Tiger, and I'm wondering if there's a way I can use this.

Specific questions:

(i) Does the OS X installation of Java have the same file/directory structure as the Java's distributed by Sun? All of Sun's distributions have the same layout, regardless of target os, e.g. jdk directory/bin/java Is this true of the OS X Java bundle?

(ii) Once Java has been installed, can its files be copied to another system? i.e. can I circumvent the standard installation procedure and provide a copy of the jre with my application? This works with Linux and Windows XP.

(iii) If (ii) is possible, is it legal under whatever license is involved? I know it's acceptable under Sun's licenses. Does Apple attach its own license to the Java it distributes? If so, does it allow redistribution?

(iv) Is it possible that the 'Tiger' version of Java 1.5 will work with earlier versions of OS X? Since most of Java is written in Java, this might be possible. (FYI I explicitly use the 'Metal' look and feel in my app, so issues of resources required for the OS X look and feel (aqua?) may not apply.)

Thanks
 
It's kinda weird, in the home directory you have bin, include, lib, and man (which is the same as it is on a PC (i think) the difference is that in the bin dir, instead of having the actual binaries, it has aliases (pointers, shortcuts) to a different directory that contains them, the functionality is still the same but the actual files are not there. Same thing with a few of the packages (jars) in the lib dir.
 
Java 1.5 is available from apple.com for Tiger.

No, you can't copy the files to a different system (especially a system with a completely different architecture like Windows) for compatibility reasons -- the JVM is not portable; rather, it's system-specific.

The Java that is installed on Mac OS X is customized by Apple because Sun doesn't package a Mac OS X-compatible JRE. So yeah, it's very likely that Apple's implementation of Java has some quirks and differences from "standard" Java installations.
 
ElDiabloConCaca said:
Java 1.5 is available from apple.com for Tiger.

No, you can't copy the files to a different system (especially a system with a completely different architecture like Windows) for compatibility reasons -- the JVM is not portable; rather, it's system-specific.

I put the question poorly. I meant, can you copy the files to another Mac/OS X computer?
 
HateEternal said:
... it has aliases (pointers, shortcuts) to a different directory that contains them, the functionality is still the same but the actual files are not there.

Excuse the ignorant question, but are OS X aliases functionally different than Unix soft links?
 
ur123 said:
I put the question poorly. I meant, can you copy the files to another Mac/OS X computer?

Well, you can always keep the installation file and just copy the installation file to different machines for installation... I think you'd have a hard time trying to copy the installed files themselves to another machine, since the installer also sets path variables and what-not.

I think it'd be easier to do an "install" on each machine rather than try to copy the installed files to another machine.
 
Back
Top