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

Error: JAVA_HOME is not defined correctly executing mvn clean install

I want to execute mvn clean install, but it displays the following error: Error: JAVA_HOME is not defined correctly. We cannot execute /usr/lib/jvm/jdk1.8.0/bin/java When I execute "echo $JAVA_HOME" it…
jack.k
  • 73
  • 1
  • 8
0
votes
0 answers

How to run STS/Eclipse on previous version of Java on Mac?

I have a client project which is running on an older version of Spring/Spring STS for the time being. For my own personal interests, I'd like to install java8. However, when I do this, it prevents STS (which needs java 1.7 in this case) from…
Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213
0
votes
1 answer

Maven Java Home Path: \bin, or not to \bin

So I find myself kind of stuck in between. I set JAVA_HOME to C:\Program Files\Java\jdk1.8.0_121 then Maven works but java -version shows 'java' is not recognized as an internal or external command, operable program or batch file. If I set…
Ascendant
  • 827
  • 2
  • 16
  • 34
0
votes
1 answer

java,javac commands work perfectly but still getting error java_home path does not exist

i am trying to run standalone.bat file from (wildfly-10.1.0.Final) folder but i am getting error in command prompt java, javac commands are working perfectly fine Environment variables are set like this: JAVA_HOME C:\Program…
Irum
  • 65
  • 9
0
votes
2 answers

Set JAVA_HOME for docker in NLTK for Stanford NLP

I am a beginner in using Docker. I'm using Docker toolbox for Windows 7 , i built an image for my python web app and everything works fine. However, for this app, i use nltk module which also needs java and java_home setting to the java file. When…
Jake Lam
  • 3,254
  • 3
  • 25
  • 44
0
votes
1 answer

Can't run JavaVuser script in LoadRunner

Here is very similar question which doesn't help much. I'm trying to run JavaVuser script and getting the next error: Notify: Found jdk version: 1.7.0. [MsgId: MMSG-22986] ... logs out my classpath & Path vars ... Notify: VM Params: . [MsgId:…
i474232898
  • 781
  • 14
  • 25
0
votes
0 answers

Buildozer build failed with JAVA_HOME issue

ok so i get this error Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre" now im aware…
fhi
  • 43
  • 7
0
votes
1 answer

Making a mac app from a jar file

I'm trying to make a Mac app (specifically a GUI) in Java. However, I'm not having much success. Here's what I've tried so far: Double-clicking the executable JAR file produced by Eclipse. RESULT: Exception thrown because the Display that I create…
Agastya Sharma
  • 79
  • 1
  • 1
  • 6
0
votes
1 answer

Trouble installing Rhodes framework

When I run rake run:android, I get the error (I'm using Ubuntu): Your java bin folder does not appear to be on your path. This is required to use rhodes. Here is the relevant part of my bash.bashrc file: export…
user94154
  • 16,176
  • 20
  • 77
  • 116
0
votes
1 answer

Spark worker node cannot start. Incorrect java path in logs

I am trying to run the spark with one worker node. Master node is correctly started and WebUI is also accessible. But Slave or worker node cannot be started due to error. /sbin$ ./start-slaves.sh localhost: starting…
0
votes
2 answers

c++ programmatically retrieve java.exe path

I'm trying to retrieve the java.exe installation path on Windows. However, I can't succeed so far. What I have tried are: getenv("JAVA_HOME"), which is rarely set in my opinion (mostly returns nothing, since it isn't set?) CMD the command for %i in…
TVA van Hesteren
  • 1,031
  • 3
  • 20
  • 47
0
votes
1 answer

Error : JAVA_HOME is pointing to invalid version of java while Installing Maximo Anywhere 7.6.2 on MAC OSX

I am trying to install Maximo Anywhere 7.6.2 on MAC OSX by referring to documentation on ibm site below : Maximo_Anywhere_7_6_1_Installation_Start_to_Finish.pdf On my mac I have jdk1.8.0_131.jdk which is set as export JAVA_HOME as well as in…
Pawan
  • 43
  • 4
0
votes
3 answers

Why System.getProperty("java.home") works different for Eclipse 3.4, 3.5, 3.6?

I develop plugins (to be honest I started not so long time ago) and test my plugins on different Eclipses. I have Eclipse 3.4, 3.5, 3.6 installed. in C:\Program Files\Java there are: jdk1.5.0_22 jdk1.6.0_21 jre1.5.0_22 jre6 for all versions of…
JackBauer
  • 135
  • 1
  • 3
  • 10
0
votes
1 answer

Spring-Boot on mac with Java 8, Unsupported major.minor version 51.0

I created a sample spring-boot project on my mac. But when I try to run maven commands on it (such as mvn spring-boot:run), I get the following error: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli…
James Dunn
  • 8,064
  • 13
  • 53
  • 87
0
votes
2 answers

How to make gradle.properties machine independent

I'm working on 2 different machines (home vs. work) and transfer the code via GitHub, which works nice, but I just ran into a machine dependency when I added this code to the gradle.properties file to fix a vexing OAuth issue for google…