Operating System - HP-UX
1752765 Members
4981 Online
108789 Solutions
New Discussion юеВ

Re: How to set up java Environment variables and profiles?

 
ShivKumar_1
Frequent Advisor

How to set up java Environment variables and profiles?

Hi
I have downloaded java and the developer wants me to set up the environment vairables , class path etc its HP_UX 64 bit 11.0

So please let me know what I should be doing at my end.

I need the basic set up.

Thnks
Kum
6 REPLIES 6
IT_2007
Honored Contributor

Re: How to set up java Environment variables and profiles?

you can add path vairables in /etc/profile so that all users will have them when they login.

export PATH=$PATH:/new path

also you can add environment variables here. Does all users use ksh/sh or csh?
ShivKumar_1
Frequent Advisor

Re: How to set up java Environment variables and profiles?

HI
Can you please give me an example,

Thnks
Murat SULUHAN
Honored Contributor

Re: How to set up java Environment variables and profiles?

Hi

You must use /etc/profile or related user's profile to set environment variable or paths


env variables can be set like that
JAVA_HOME=/opt/java1.4
export $JAVA_HOME

If you want to add Java path in to current path IT_2007's explanation is enough for you

Best Regards


Murat Suluhan
ShivKumar_1
Frequent Advisor

Re: How to set up java Environment variables and profiles?

Thnks every one. It worked.
Murat SULUHAN
Honored Contributor

Re: How to set up java Environment variables and profiles?

Hi Coolsanj

Don't forget the points :)

Best Regards
Murat Suluhan
Ralph Grothe
Honored Contributor

Re: How to set up java Environment variables and profiles?

The java classpath can either be set by the environment variable CLASSPATH (with a colon separated list of directories where your required *.class and *.jar files reside; the developers should tell you the paths),
or alternatively you may pass it to the -cp or -classpath option on invocation of the java interpreter (e.g. in wrapper scripts)
(see "man -M /opt/java1.4/man java")
Setting of environment variables is usually done in the user's dot files (e.g. .profile vs. .login) for the shell of the user that runs the java code on your system.
So the syntax depends on whether it is a bourne or c type shell (viz. export vs. setenv)
Madness, thy name is system administration