skip to Main Content

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?

2

Answers


  1. 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

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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search