Questions tagged [java-home]

JAVA_HOME is an environment variable which should point to the root directory of the JDK installation.

JAVA_HOME is an environment variable which indicates the directory where the Java Development Kit (JDK) software is installed.

Setting JAVA_HOME depends on the operating system:

UNIX

  • Korn and bash shells:

    export JAVA_HOME=jdk-install-dir
    
    export PATH=$JAVA_HOME/bin:$PATH
    
  • Bourne shell:

    JAVA_HOME=jdk-install-dir
    
    export JAVA_HOME
    
    PATH=$JAVA_HOME/bin:$PATH
    
    export PATH
    
  • C shell:

    setenv JAVA_HOME jdk-install-dir
    
    setenv PATH $JAVA_HOME/bin:$PATH
    
    export PATH=$JAVA_HOME/bin:$PATH
    

Windows

  1. Right click My Computer > Properties > Advanced system settings
  2. On the Advanced tab, select Environment Variables..., and then add/edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.8.0_60.

or

  1. Go to Control Panel\All Control Panel Items\User Accounts using Explorer
  2. Click on Change my environment variables
  3. Add/edit the JAVA_HOME variable to point to where the JDK software is located
613 questions
0
votes
0 answers

How to I know which Java variable/path is the one I need, I updated my ubuntu, now hadoop and hives won't work

Background first, I installed hadoop on ubuntu 14, but now I updated it to 16, and the java was updated too, from 1.7 to 1.8. But now my hadoop won't work and I'm trying install Hives. I updated my bashrc and source it, but hadoop still won't work.…
NewSQLguy
  • 53
  • 8
0
votes
0 answers

Tomcat won't start even with both JAVA_HOME and JRE_HOME set

I have to install tomEE to run an application I have to modify. But when I use \apache-tomcat-7.0.77\bin>start startup.bat I get the following message : "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these…
user7844226
0
votes
1 answer

Can't run Apache james on mac Sierra

I'm using Apache James as email server for development purpose on mac Sierra - v 10.12.3 When I try to start/run it as super user sudo ./run.sh it I get the following error: ERROR: JAVA_HOME not found in your environment. Please, set the JAVA_HOME…
k.vincent
  • 3,743
  • 8
  • 37
  • 74
0
votes
0 answers

java -version command giving error on MAC OS

I have installed java 8 on my Mac. But when I type command 'java-version' I get the following error - Unable to locate an executable at "/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home/bin/java" (-1)
user3444096
  • 21
  • 1
  • 5
0
votes
1 answer

Gradle build not working libGDX Javahome wrong

I've been trying to get libGDX to work out but i always get a error when gradle's building. here is the error Gradle sync failed: The newly created daemon process has a different context than expected. It won't be possible to reconnect to…
Shawn-Ross
  • 137
  • 2
  • 12
0
votes
0 answers

How to temporarily set java path in a slurm batchfile?

Good morning, at the moment I'm trying to test several frameworks on a cluster administered by SLURM. One problem that comes up again and again is, that the cluster uses java 7 at JAVA_HOME (and getting it updated is ... no option). Our (layered)…
Anders Bernard
  • 541
  • 1
  • 6
  • 19
0
votes
0 answers

JAVA_HOME is not defined correctly (already tried some solutions)

I'm trying to compile this example project with Ubuntu 16.04.2 LTS, java, eclipse, maven, tomcat8 but when I finally import the project and try to run this command mvn eclipse:eclipse I get this error Error: JAVA_HOME is not defined correctly. We…
ferpel
  • 206
  • 3
  • 12
0
votes
2 answers

Windows7 run elasticsearch.bat Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME

enter image description here I want to use elasticsearch on Windows64. At first my Java version is not the same as the Java_Home.Then I reinstalled JAVA. And I found a solution said that the system will find JAVA under…
shery
  • 1
  • 1
  • 2
0
votes
1 answer

JDK issue with Eclipse Neon on my Windows 7 desktop

On my Windows 7 64 bit desktop, I have the following JDK installed to the following directory: C:\Program Files (x86)\Java\jdk1.7.0_80 I downloaded Eclipse Neon (eclipse-jee-neon-2-win32-x86_64) to my desktop. In System Variables, "JAVA_HOME" is…
alextc
  • 3,206
  • 10
  • 63
  • 107
0
votes
1 answer

JAVA_HOME is not defined correctly CARBON cannot execute java - exception while starting wso2

I am using Linux Debian and I can see that JAVA_HOME is setup. I downloaded wso2am-2.0.0.zip, unziped and I try to start the application as described in https://docs.wso2.com/display/AM170/Running+the+Product Any idea what else to check will be…
DemeCarvO
  • 487
  • 4
  • 16
  • 28
0
votes
0 answers

Android Studio and Intellij

I have Android studio installed with the environment variable JAVA_HOME set appropriately for AS. This is incompatible with the installation (64bit) Windows 10 for IntelliJ. How do I fix this so that I have both IDEs?
mafox
  • 61
  • 4
0
votes
1 answer

JAVA_HOME Ubuntu Terminal

I really tried to avoid this question since there are already a lot of it. However I could just not fix to set the my terminal to the right JAVA_HOME. First here the following outputs: Java-Home echo…
kaikun
  • 98
  • 10
0
votes
0 answers

maven installation setting up bash profile

When I do a mvn -version I get the following error FYI:- I saw the other related posts and none of it is resolving my prob Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor…
Ashvitha
  • 5,836
  • 6
  • 18
  • 18
0
votes
2 answers

set a JAVA_HOME variable

I installed android studio 2.0 but when I open it, a message is shown indicating that the JAVA_HOME variable needs to be added to environment variables but I am sure that I do it
0
votes
1 answer

[Doc error]"JAVA_HOME/lib/security" is under "JAVA_HOME/jre", but JDK 7's javadoc is misleading

As JavaSE 7 java.security JavaDoc suggests: ... The Java security properties file is located in the file named <<#JAVA_HOME>>/lib/security/java.security. <<#JAVA_HOME>> refers to the value of the java.home system property, and specifies the…
WesternGun
  • 11,303
  • 6
  • 88
  • 157