user12056706
user12056706

Reputation:

JAVA_HOME is not working for WSO2 product in Cent OS 7

I have a CentOS virtual machine. I am trying to install wso2 server in the VM. My .bash_profile folder is

export JAVA_HOME=/usr/java/jdk1.8.0_102/
export JRE_HOME=/usr/java/jdk1.8.0_102/jre

export PATH=$JAVA_HOME/bin:$PATH

But when I start the server it returns,

Error: JAVA_HOME is not defined correctly.
 CARBON cannot execute /usr/java/jdk1.8.0_102//bin/java

How to solve this issue?

Upvotes: 0

Views: 172

Answers (2)

Romeo Ninov
Romeo Ninov

Reputation: 7235

The good way set those variables in CentOS is to use .bashrc as this is the file which is read by bash on login.

Upvotes: 0

Buddhima Udaranga
Buddhima Udaranga

Reputation: 943

I think there might be an issue with the JAVA_HOME that u have specified

it should be

export JAVA_HOME=/usr/java/jdk1.8.0_102/Contents/Home

and you dont need to export it from the path

export JAVA_HOME=/usr/java/jdk1.8.0_102/jdk1.8.0_151.jdk/Contents/Home

adding above to your .bash_profile will be enough

Upvotes: 1

Related Questions