What is JAVA_HOME? How does the JVM find the javac path stored in JAVA_HOME?

前端 未结 9 1596
情深已故
情深已故 2020-11-28 03:40

I would like to know what is JAVA_HOME. Where do I set the path of javac.exe and java.exe. It is in environment variables. When I compile a Java program from command prom

相关标签:
9条回答
  • 2020-11-28 04:29

    Basically JAVA_HOME is use to set path of the java . it is use in windows. it's used for set path of the multiple software like as java EE , ANT and Maven. this is the steps to solve your problem:

    only for core java to set path : path :"C:\Program Files\Java\jre1.8.0_77\bin" but when you are use multi built like as ANT , core java then you are used JAVE_HOME in environment .

    follow the steps :

    JAVA_HOME:"C:\Program Files\Java\jre1.8.0_77\bin" ANT_HOME:"C:\ant\apache-ant-1.9.6"

    Path: JAVA_HOME, ANT_HOME; it is the systematic way to set the environment variable..

    0 讨论(0)
  • 2020-11-28 04:33

    set environment variable

    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_24
    
    classpath=C:\Program Files\Java\jdk1.6.0_24\lib\tools.jar
    
    path=C:\Program Files\Java\jdk1.6.0_24\bin
    
    0 讨论(0)
  • 2020-11-28 04:36

    JAVA_HOME is a environment variable (in Unix terminologies), or a PATH variable (in Windows terminology). A lot of well behaving Java applications (which need the JDK/JRE) to run, looks up the JAVA_HOME variable for the location where the Java compiler/interpreter may be found.

    0 讨论(0)
提交回复
热议问题