Why is "%Java_Home%" an invalid directory?

Discussion in 'JavaScript' started by Yshua, Jun 13, 2014.

  1. #1
    Dear Digital forum:

    Am wondering how to remedy the following ftpd.bat error in the apache-ftpserver:

    ERROR: JAVA_HOME is set to an invalid directory.
    Please set the JAVA_HOME variable in your environment to match the
    location of your Java installation.

    Have Java and apache-ftpserver-1.0.0 in C:\Program Files (x86) directory.

    Please help orient me,
    Yshua
     
    Yshua, Jun 13, 2014 IP
  2. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #2
    Wrong forum, your question should be here:
    https://forums.digitalpoint.com/forums/programming.17/

    To answer your question:

    JAVA_HOME should point to jdk directory and not jre directory. Also JAVA_HOME should point to the home jdk directory and not to the jdk/bin directory. Assuming that you have JDK installed in your program files directory then you need to set the JAVA_HOME like this:

    
    JAVA_HOME="C:\Program Files\Java\jdkxxx"
    
    Code (markup):
    Where xxx is the jdk version. Follow this link to learn more about setting JAVA_HOME:

    http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html

    Source
     
    ThePHPMaster, Jun 13, 2014 IP