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_HOME on centos for root and normal user --> checking java -version

actually i im learning Linux (CentOs 7). I installed Java on root (usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/bin/java). Now i have one question. if i type "java-version" i get [mibe@localhost ~]$ java -version openjdk version…
Mili Be
  • 53
  • 1
  • 3
0
votes
0 answers

Can't run android on windows to start reactNative app

I have just started learning reactNative, I was able to set up reactNative via command line on Windows, but I could nott start Android emulator. Any idea on what am I missing here?
Le Minh
  • 135
  • 1
  • 1
  • 12
0
votes
1 answer

Is it necessary to set the JAVA_HOME variable every time system is restarted?

I have recently formatted my system and installed Ubuntu 16.0.4 and done all necessary setup for running react-native project.But since then every time i restart the system, getting following error, ERROR: JAVA_HOME is not set and no 'java' command…
ThinkAndCode
  • 1,319
  • 3
  • 29
  • 60
0
votes
1 answer

How to locate openjdk in Docker container?

I tried to run the pyspark application.For this first I installed pyspark from pip then pulled openjdk:8 to set the JAVA_HOME variable Dockerfile : FROM python:3 ADD my_script.py / COPY requirements.txt ./ ENV JAVA_HOME …
Hamza Sheikh
  • 117
  • 3
  • 13
0
votes
1 answer

Installing problems with JDK 11 (please have a look)

What exactly do I have to do to install JDK 11? In which directory do I have to install Java and what exactly have to be the value of JAVA_HOME (if necessary?)? I'm using Eclipse for programming and it forces me to install JDK in its subfolder "jre"…
0
votes
2 answers

Maven does not recognize the $JAVA_HOME jdk installed on Ubuntu shell

Maven doesn't recognize the java_home path provide by $JAVA_HOME variable even though it clearly points to a valid installation. i cant compile the project i want with this command when i'm located on the same directory as the pom.xml folder. $ mvn…
oliviergf
  • 19
  • 5
0
votes
0 answers

Android Studio, change JDK JRE path

I have Android studio 3.1 on Ubuntu 18.04 which was working with Oracle Java 10. I have deleted all Java packages and alternatives according to this answer. Now starting Android Studio I face Fatal error java.lang.RuntimeException:…
Amir-Mousavi
  • 4,273
  • 12
  • 70
  • 123
0
votes
1 answer

Xamarin UI Automation with Appium - Setting JAVA_HOME on MacBook Pro - appium-doctor Does Not Sees It

I am trying to set JAVA_HOME at my MacBookPro for Xamarin Android UI Automation using Appium. I think I have set it up correctly. Below, it shows its setting in my .bash_profile file and the output of JAVA_HOME in terminal, however, running…
pixel
  • 9,653
  • 16
  • 82
  • 149
0
votes
1 answer

JAVA_HOME returns blank Linux Mint 18.3

After update of Linux I have an issue with JAVA_HOME directory. echo doesn't find directory for JAVA_HOME. I have uninstalled java using: apt-get purge oracle-java8-installer Then apt-get update Then apt-get install oracle-java8-installer After…
dzejkob11
  • 11
  • 2
0
votes
1 answer

Eclipse message warning : the environment variable home is not set

I started Eclipse and got below error. I set the variable system JAVA_HOME with the java path up to bin as value but it still doesn't work what should I do? HELP PLEASE. Warning: The environment variable HOME is not set. The following directory…
0
votes
1 answer

UBUNTU: unable to set JAVA_HOME value

In Ubuntu, I installed Maven and JAVA 1.8, installed it and edited the /etc/environment file to set JAVA_HOME value. My /etc/environment is as…
Alla Sasikanth
  • 541
  • 3
  • 7
  • 22
0
votes
0 answers

I get the "JAVA_HOME is not set" error even though I have correctly set it (while trying to install Vagrant)

I am trying to install a java project. I have downloaded Vagrant and VirtualBox. I am following the steps here to setup the project I will be working on. This is what I get when I execute the "vagrant up" command in…
0
votes
0 answers

.cmd files are not getting executed except "startweblogic.cmd" in Weblogic, for the rest the command window is getting closed immediately

I have set environment variable for JAVA_HOME and SQL driver .jar file. C:\Program Files\Java\jdk1.8.0_151; and C:\Users\appuser\Downloads\InforSoftwares\sqljdbc41.jar
user9176394
0
votes
1 answer

How to Run a Runnable Jar without Java_Home

I have a shared host server, I have no root privileges on it, I can't write in system files, so I can't configure Java_Home. I am searching for a solution to deploy my java application on the server. I have a runnable jar. can't I transform it to a…
0
votes
1 answer

I get an error when creating Apk: JAVA_HOME

I have download and installed Java, but having JAVA_HOME invalid error. How can I fix this issue?