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
-1
votes
2 answers

getting the error even after setting JAVA_HOME property

This is the error that i get when i try to run the application based upon google app engine through netbeans. But i have set the JAVA_HOME variable :(see the pic) BUILD FAILED /home/non-admin/NetBeansProjects/Guestbook/nbproject/build-impl.xml:550:…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
-2
votes
1 answer

I've install jdk(11 lts) but (.java)files are not recognizing

as it mentioned I installed jdk 11.0.12(lts) in my win10 64bit,and checked java version in cmd, and it's showing my java versions and even tried creating path like java_home and copying path to path, but still (i wrote testing program, I'm like…
-2
votes
2 answers

Got any error while installing Android studio on windows 10

JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_281\bin Please set the JAVA_HOME variable in your environment to match the location of your Java installation. How to solve this problem??
-2
votes
1 answer

Why JVM work when there is not JAVA_HOME?

$ env ... When I try to print my shell environment on macOS, I find there is not a JAVA_HOME, but my JVM still works. So I am very confused, I just want to understand how JVM finds the location of JDK when there is not indicated from shell…
Shuai Li
  • 2,426
  • 4
  • 24
  • 43
-2
votes
1 answer

Ionic: Your JAVA_HOME is invalid

I am facing JAVA_HOME invalid problem. I have followed these steps: npm install -g cordova ionic ionic start myApp tabs cordova platfomr add android Installed JDK jdk1.8.0_91 Set JAVA_HOME path as "C:\Program Files\Java\jdk1.8.0_91\bin" in…
-2
votes
1 answer

JAVA_HOME variable not setting in Windows

I've downloaded jdk9 and Java is installed in the following location. C:\Program Files\Java\jdk-9 and I'm trying to set up the JAVA_HOME variable under environment variables. I've created a system variable And I checked JAVA_HOME variable value in…
Syed
  • 2,471
  • 10
  • 49
  • 89
-2
votes
2 answers

Java ProcessBuilder not recognizing java_home path

I'm trying to automate a process, one of which requires doing an ant build. I've set up all the environment variables. Inputting commands directly into cmd works: my build.xml has some properties like these:
user3758745
  • 777
  • 1
  • 6
  • 19
-2
votes
2 answers

showing java version as 8 for jdk 1.7.0_67

In environment variables I have set the below things: JAVA_VERSION: C:\Program Files\Java\jdk1.7.0_67; And added %JAVA_HOME%\bin to the path. When I run java -version in command prompt it is showing 1.8.0_40, and not 1.7.0_67. Why is that?
Lakshmi
  • 175
  • 1
  • 4
  • 16
-2
votes
1 answer

Cannot start standalone instance of HBase

I was unable to configure the HBase standalone instance. Following are the steps I followed: Downloaded hbase-0.98.9-hadoop2 and extracted it. Set my JAVA_HOMEin the environment variables. Edited conf/hbase-site.xml and changed the configuration as…
Sibtain
  • 1,436
  • 21
  • 39
-2
votes
3 answers

Mac OS: java missing

I have Mac OS 10.8.4 when I type in terminal >java i got an error Unable to locate an executable at "/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java/bin/java" (-1) Have no idea where and when its missed...Few days ago…
Jim
  • 8,874
  • 16
  • 68
  • 125
-3
votes
2 answers

I cannot know where VScode find JAVA_HOME environment variable

enter image description here I installed and uninstalled jdk-14 and install jdk-13 But vscode recognize JAVA_HOME environment variable as "jdk 14" and this is non-existing path. Also, I set the JAVA_HOME as jdk-13 path and write to .zshrc…
ParkSangJun
  • 1
  • 1
  • 1
-3
votes
1 answer

How to set java home in windows 7 for JDK 11?

Unable to set java_home in windows 7. i have update the path to C:\Program Files\Java\jdk-11 in system advanced environment variables still from command prompt am getting the following errors. Error: opening registry key 'Software\JavaSoft\Java…
user3520615
  • 367
  • 1
  • 4
  • 6
-3
votes
3 answers

Couldn't able to compile the java program(Note: No Access to environment variable setup)

As I tried compiling the java program it shows as, 'javac' is not recognized as an internal or external command, operable program or batch file. As all know that this is because of the not setting the environment variable. But the thing I don't have…
1 2 3
40
41