|
At least since Mac OS X v10.1, Apple provides a simple solution to setting the path to the Java path.
They have placed an alias (similar to a symbolic link) at:
/Library/Java/Home
This will take you to the current directory holding the equivalent of Sun's "jdk" directory. From there you can get to the /bin directory.
So, to set an environment variable such as JAVA_HOME or JDK_HOME, use:
setenv JAVA_HOME /Library/Java/Home
Also, for convenience you can set up these env vars in the invisible file ".tcshrc" found in your home directory. This file is run each time you open a Terminal window.
BBEdit is a popular Macintosh tool for editing files, now updated for Mac OS X. It includes an option for exposing hidden files so you can open them. It comes in both free and commercial version. http://www.bbedit.com/
More tips:
You do not need to install Apple's "Developer" CD-ROM which comes with Mac OS X, unless you want to use Apple-specific tools and non-Java stuff (gnu compilers, etc.). In the default Mac OS X installation, Apple already includes the full suite of java tools similar to Sun's JDK, such as java, javac, javadoc, jar, rmic, etc. (Yeh!)
The NetBeans ide (http://www.netbeans.org/) runs well on Mac OS X, if you use the latest versions.
--Basil
|
I've also found that most applications that want JAVA_HOME can be spoofed by setting JAVA_HOME to /usr of all things.This falls in the category of stupid pet tricks, but since almost all apps that want JAVA_HOME set are trying to find the javac compiler classes, and those classes are already on the classpath in the Apple VM, this does work.