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

Setting Java path using bash script CentOs 7

I'm trying to change the path of java_home to java-1.7.0 in a CentOS 7 machine which already has java-1.8.0 installed. I uninstalled java-1.8.0, and used  yum -y install java-1.7.0 to install java 1.7. However, which java command still points…
userDtrm
  • 533
  • 2
  • 7
  • 20
0
votes
0 answers

Which java path does Intellij IDEA use for gradle tests?

I'm trying to run gradle tests from user interface in Intellij IDEA. The following error occurs: Starting process 'Gradle Test Executor 13'. Working directory: /Users/fdermishin/IdeaProjects/project/module Command: /Applications/IntelliJ…
fdermishin
  • 3,519
  • 3
  • 24
  • 45
0
votes
1 answer

mvn commands not recognize JAVA

Can anyone help me with this issue? It seems that when I run mvn -v command from command line directly from windows the command works as expected. When I run mvn -v command from Jenkins build I got the following error. The JAVA_HOME environment…
user3664679
  • 19
  • 1
  • 4
0
votes
1 answer

Robot Framework - Appium Do Not See Java_Home

first time When I do all the settings and i run appium-doctor it passes, but next time I restart my macbook and run again.I received these message error not see My Error : `WARN AppiumDoctor ✖ ANDROID_HOME is NOT set! WARN AppiumDoctor ✖…
0
votes
2 answers

JAVA_HOME not set

i setup a crontab job to run a php script, php ~/Documents/workspace/tools/src/main/php/testcron.php > mylog and the log file shows: JAVA_HOME is not set. i tried export and saw JAVA_HOME="/Library/Java/Home" i changed it to JAVA_HOME="/usr/bin"…
ohana
  • 285
  • 1
  • 5
  • 20
0
votes
2 answers

Is it fine if echo $JAVA_HOME shows the same path twice separated with a colon?

Here is an example of how the result looks like. I believe it shouldn't be like that. user@user:~$ echo $JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/bin/java:/usr/lib/jvm/java-11-openjdk-amd64/bin/java It also influences maven commands, since I…
0
votes
1 answer

Setting up programming environment for minecraft 1.12 modding, running into gradle decompile error

So I'm following this walkthrough here to setup Eclipse to mod Minecraft. When I run gradlew setupDecompWorkspace --refresh-dependencies it will run until it reaches the :recompileMC stage and fail with an error stating that my java_home classpath…
0
votes
1 answer

How to change iSeries Admin2 JAVA_HOME environmental variable

I'm running V7R2, I have JDK80 as well as JDK71 installed. My PTF level are up to date (that's why i have issues in the first place). My ADMIN2 instance is choosing to use JAVA 1.7, which is giving some problems to Navigator (not all data is…
Łukasz S
  • 45
  • 5
0
votes
2 answers

JAVA_HOME is not set and could not be found. error on When Install HADOOP

I'm new to the hadoop. when the process of the installation, i gave hadoop.env.sh a JAVA_HOME path, but when I'm going to execute hdfs namenode -format it says that the java_home is not set.when check it again, it also saved in the hadoop.env.sh. i…
0
votes
1 answer

IntelliJ: Add a Java SDK using JAVA_HOME variable

On Windows the path of the JDK typically includes the version string. Therefore if you upgrade the JDK the path name changes. In IntelliJ this allyways means to manually update all locations where the JDK path is saved. Therefore I want to add a SDK…
Robert
  • 39,162
  • 17
  • 99
  • 152
0
votes
1 answer

How to set JAVA_HOME in a generic folder

Is it possible to use a generic Folder Name for the JAVA_HOME Environment variable in Linux? At the Moment our JAVA_HOME variable is set to /usr/lib/Java_1_8_212 and when the server was updated to Java_1_8_222 our application Server stopped working…
Jesus Paradinas
  • 189
  • 2
  • 12
0
votes
2 answers

Although I have JAVA_Home set, the system can not find it

I set my JAVA_HOME variable the follow path: /usr/lib/jvm/jdk11 and when i put the following comand: java -version , it shows me the current version and echo $JAVA_HOME indicates the above path. When I start tomcat the following error message comes…
beard black
  • 41
  • 1
  • 5
0
votes
0 answers

I changed JAVA_HOME in .bash_profiles how do i change the java version it uses

I have 3 versions of java installed: adoptopenjdk-8.jdk, jdk-12.0.2.jdkand jdk1.0.0_221.jdk when I set the JAVA_HOME variable to JAVA_HOME="/usr/libexec/java_home" then when I go to terminal type $JAVA_HOME, it gives the jdk-12.0.0.jdkversion. How…
TBM-Codes
  • 1
  • 2
0
votes
4 answers

To set Android_Home and JAVA_HOME variable every-time need to run "source ~/.profile" for Appium on MAC

I am trying to Run Appium on MAC OS Mojave. To see if my configuration is good I am using Appium Doctor. It shows my ANDROID_HOME and JAVA_HOME is not set. Once I set them in ~/.profile Appium Doctor shows all green that is everything is good. Now…
Saif Siddiqui
  • 856
  • 1
  • 13
  • 33
0
votes
0 answers

JAVA_HOME no change for ionic run android

I am developing in Ionic 4. I am using mac Mojave, and according to java -version, I am using 1.8.0_201, and $ JAVA_HOME also points to 1.8.0_201. However, when running ionic cordova run android, it gives me an android version error, because it…