Ben

Thanks for that.

I think that what I want to do has moved along a bit. I want to have these programs - Tomcat & MySQL - start up when the computer is started, even when no-one is logged in (ie, run the thing as a mini server). Therefore I don't think that I can use user-specific env variables, as there may not be any users logged in. (I also want to see if the machine can be set up to run completely headless.)

I've found a document that gives the following syntax for defining environment variables in the startup script for a program:

export VAR_NAME="var_value"

so I'll go back to your idea of defining the variables I need in Tomcat startup script, startup.sh. Then I'll look for a way of calling that from the system startup scripts.

There are a lot of differences between OS X and Linux/Unix, aren't there? I was looking for the familiar rc.d architecture, but this doesn't exist in OS X. Everything is controlled from /Library, apparently...

Tom



On 17 Jan 2006, at 06:47, [EMAIL PROTECTED] wrote:

FYI

Netinfo Manager in utilities is the OS X way of setting environment variables for users or groups.

Checked this morning....




On 16 Jan 2006, at 15:20, Tom Burke wrote:

Ben

Actually, that doesnt't seem to work. I've tried variations of set and setenv, and with & without an '=' sign in there. but no dice.

However, I have found that all I need to do to set it at the command prompt is this:-

"setenv JAVA_HOME /path/to/java"

and Tomcat then runs.

Incidentally, I've also found that the best path to use for the Java SDK is /Library/Java/Home, which is a link to a 'real' Java directory.

Tom



On 16 Jan 2006, at 11:13, [EMAIL PROTECTED] wrote:

Quoting Tom Burke <[EMAIL PROTECTED]>:

I know there is a way of specifying within os x and i suspect it is in the thing I can't quite rememver the name of (directory services) in utilities..but you can alter /etc/profiles if you want it permanent for all users, however:

Open your terminal emulator and find the tomcat startup script, usually
start_tomcat.sh or startup.sh.

using your favourite text editor (my case vi) open it up and enter somewhere at
the top

set JAVA_HOME = "/path/to/javadir"
export JAVA_HOME


then save.

HTH

Ben

I need to define an environment variable; specifically, JAVA_HOME. (I'm installing & configuring Tomcat). I'm sure this is a simple question, but I don't actually know how to do this.

The problem is that after having installed Tomcat, it won't start (using ..../bin/startup.sh) because it says: 'The JAVA_HOME environment variable is not defined. This environment variable is needed to run this program' And indeed $JAVA_HOME doesn't exist.

Background: I've mainly installed Tomcat on Windows systems before, and in practice JAVA_HOME is created for you when you install Java. However I'm told that Java is pre-installed in OS X, so there's no opportunty to define Java parameters during installation. I know Java is indeed installed as running the terminal command 'java -version' gets some sensible responses.

Tom Burke


--
Mac UK is sponsored by <http://lowendmac.com/> and...

123Inkjets.com <http://lowendmac.com/ad/123inkjets.html>

     Support Low End Mac <http://lowendmac.com/lists/support.html>

Mac UK list info:       <http://lowendmac.com/lists/mac-uk.shtml>
 --> AOL users, remove "mailto:";
Send list messages to:  <mailto:[email protected]>
To unsubscribe, email:  <mailto:[EMAIL PROTECTED]>
For digest mode, email: <mailto:[EMAIL PROTECTED]>
Subscription questions: <mailto:[EMAIL PROTECTED]>
Archive: <http://www.mail-archive.com/mac-uk%40mail.maclaunch.com/>

iPod Accessories for Less
at 1-800-iPOD.COM
Fast Delivery, Low Price, Good Deal
www.1800ipod.com

Reply via email to