Am struggling with this error: I have installed J2EE SDK 1.4 in c:\Sun\AppServer (Default Directory) I have installed Tomcat 4.1.30 in C:\Tomcat\Tomcat 4-1-30 JAVA_HOME environment variable : C:\Sun\AppServer CATALINA_HOME environment veriable : C:\Tomcat\Tomcat 4-1-30 I am getting the error : The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program Using CATALINA_BASE: c:\tomcat\Tomcat 4-1-30 Using CATALINA_HOME: c:\tomcat\Tomcat 4-1-30 Using CATALINA_TMPDIR: c:\tomcat\Tomcat 4-1-30\temp Using JAVA_HOME: C:\Sun\AppServer The system cannot find the file -Dsun.io.useCanonCaches=false. Is this a bug for Tomcat with Windows 2000 SP4? Any remedies please?
Java.exe application file are located at 2 places: C:\Sun\AppServer\jdk\bin and C:\Sun\AppServer\jdk\jre\bin I have defined the environment variables through Control Panel>System>Advanced Tab> Under System variables I have installed SDK only once. There is another folder "C:\Java Client" containing "jre-1_2_2_008-win-i" Application file. This has already been installed on my system during the installation of Peregrine Helpdesk Application Software Client. There is no file by any name "CanonCaches" when I search thru explorer window. Also when I delete the environment variable declaration I get the following error: C:\tomcat\Tomcat 4-1-30\bin>startup The JAVA_HOME environment variable is not defined This environment variable is needed to run this program Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CATALINA_TMPDIR: ..\temp Using JAVA_HOME: The system cannot find the file -Dsun.io.useCanonCaches=false.
Joined: Mar 08, 2004
Thanx Bill !! I have found the reason for the error, ofcourse with your hints. Although the default install directory for J2EE SDK was C:\Sun\AppServer, I actually need to define the Environment Variable JAVA_HOME to C:\Sun\AppServer\JDK where (as u rightly said) the Java.exe file was located. All Tomcat Setup guides only instruct to set the Environment Variable path to the J2EE default setup directory, which in my case was C:\Sun\AppServer. Tomcat startup actually needs the path to the Java.exe file.