peztherez
peztherez

Reputation: 4031

WSO2 API Manager Installation can not run Java

I am brand new to WSO2 API manager and I am trying to install the API Manager for the first time on a Linux VM machine.

Java-8 has been installed. JAVA_HOME is defined and points to /usr/lib/jvm/java-8-oracle. It has been verified by running: echo $JAVA_HOME and it looks correct. JAVA_HOME and path are both defined in /etc/environment file.

On the WSO2 side I downloaded it and I am trying to run the wso2server.sh executable.

I keep getting this error

ERROR: JAVA_HOME is not defined correctly

CARBON cannot execute java

Upvotes: 0

Views: 1422

Answers (2)

Bee
Bee

Reputation: 12513

Make sure you run all the commands in the same terminal window.

Or you can run source command for the modified file before you start APIM.

Or after setting JAVA_HOME, you can start a new terminal window to run APIM.

Upvotes: 1

Shanika Tharanga
Shanika Tharanga

Reputation: 144

I also faced this problem earlier. The reason I think java version. Bcz I have changed my java version to 1.7 and all wso2 products works properly. Don't use open jdk. Install oracle java. Follow below link to install oracle java on ubuntu.

Change profile file as follows,

JAVA_HOME=/usr/local/java/jdk1.7.0_45
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH

http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux

Upvotes: 1

Related Questions