Thursday, September 2, 2010

Windows cannot find '-Dsun.io.useCanonCahes=false'

Windows cannot find '-Dsun.io.useCanonCahes=false'. Make sure you typed the name correctly, and then try again. To search for a file , click the Start button, and then click search.

If you have the following error while you are trying to start the Apache Tomcat server ( My case it was Apache-Tomcat-4.1.37 ). Then you don't have the JAVA_HOME correctly added to the environment variable.

  • Right click on My Computer and click on properties.
  • Go to the Advanced tab and click Environment Variables.
  • Add a new entry to the system variables if the JAVA_HOME does not exists.
  • Set the variable value pointing to the place where it is installed.




To compile any of the .java file you can open the command prompt and type

javac classname.java

This will create the classname.class file .

But if the path to the javac compiler is not set the nit will give the following error message although the JAVA_HOME is set:

"'javac' is not recognized as an internal or external command, operable program or batch file."

To rectify the problem add the path of the javac to the path in the Environment variables.

C:\j2sdk1.4.2_18\bin

The other work around to this problem is each time specify the path like:

C:\j2sdk1.4.2_01\bin\javac classname.java

But setting the environment variables is better option.

No comments:

Post a Comment