cancel
Showing results for 
Search instead for 
Did you mean: 

Specify Java installation on mockservicerunner.sh

SOLVED
Highlighted
New Contributor

Specify Java installation on mockservicerunner.sh

Hi everyone,

 

I have two java installation (jdk6 and jdk7) in a linux environment, with "$PATH" variable pointing to jdk 6 installation.

I don't have the credentials to change the "$PATH" variable value.

 

Is there any way to specify java version launching mockservicerunner.sh? Is it possible to specify java version inside the  script (like the SOAPUI_HOME for example) ?

Thanks in advance,

Paolo

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Specify Java installation on mockservicerunner.sh

I believe that, any user can use his own required path. How is it different in your case?
You can just use below commands to change, when you login to your session. Note that, this will be applicable only for that current session. If you want them to be permanent i.e., available all the time on login, then you may set them in $HOME/.profile file

export JAVA_HOME=/set/it/to/jdk7
export PATH=$JAVA_HOME/bin:$PATH

You are done.



Regards,
Rao.

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Specify Java installation on mockservicerunner.sh

I believe that, any user can use his own required path. How is it different in your case?
You can just use below commands to change, when you login to your session. Note that, this will be applicable only for that current session. If you want them to be permanent i.e., available all the time on login, then you may set them in $HOME/.profile file

export JAVA_HOME=/set/it/to/jdk7
export PATH=$JAVA_HOME/bin:$PATH

You are done.



Regards,
Rao.

View solution in original post

Highlighted
New Contributor

Re: Specify Java installation on mockservicerunner.sh

if I run the command

export PATH=$JAVA_HOME/bin:$PATH

I obtain the following value for the PATH variable:

/opt/java/jdk1.7.0_79/bin:/opt/java/jdk1.6.0_33/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/EnterprisePlatform-5.1.2/jboss-eap-5.1/jboss-as/bin:/home/paolo/bin

With 2 java path set into PATH variable.
Is this correct?

Highlighted
New Contributor

Re: Specify Java installation on mockservicerunner.sh

I've tried setting:

export JAVA_HOME=/home/paolo/java/jdk1.7.0_79
export PATH=$JAVA_HOME/bin:$PATH

in .bash_profile file, And it works perfectly!

Thank you very much!

New Here?
Join us and watch the welcome video:
Top Kudoed Authors