advertisement

Article:
  Mixing Java and Titanium: Part 1
Subject:   Easier solution to setenv JAVA_HOME
Date:   2001-12-01 12:28:49
From:   basilbourque
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


1 to 1 of 1
  1. James Duncan Davidson photo Easier solution to setenv JAVA_HOME
    2001-12-04 13:56:59  James Duncan Davidson | O'Reilly AuthorO'Reilly Blogger [View]

    • Easier solution to setenv JAVA_HOME
      2004-02-11 09:44:22  mirandall [View]

1 to 1 of 1