Search code examples
javajava-home

Setting JAVA_HOME for portable eclipse


I am running Windows XP. I have a portable eclipse installed on a usb and when I tried installing the Android SDK it said "Java SE Development kit (JDK) not found" and told me to set the JAVA_HOME environment variable. The Java SDK is located in

K:\EclipsePortable\JDK\bin K:\EclipsePortable\JRE\bin K:\EclipsePortable\JDK\jre\bin K:\EclipsePortable\App\Eclipse\JRE\bin

I am using K:\EclipsePortable\JDK\ so I assume I set it to one of those two paths. How do i do this? Is this in eclipse or a Windows thing?


Solution

  • An environment variable is for the operating system. As you are on Windows XP - follow these steps to set up a JAVA_HOME environment variable:

    Click "Start" -> "Control Panel" and open "System". Choose "Advanced" tab and click on the "Environment Variables" button. In the "System Variables" section, add a new one named JAVA_HOME and put the value to your Java JDK directory (K:\EclipsePortable\JDK)

    Alternatively you can press the Windows + Pause/Break key combination which will bring up the "System Properties" window straight away, then you can go from there.