I'm a newer to Java. I write a code, which will import the package commons io. But when I compile it, it will shows
the error that package org.apache.commons.io does not exist.
I already download the latest source file of commons io, and put the commons-io-1.4.jar under %javahome%\jre\lib\ext,
but this error is still exist.
Can anybody tell me how to solve this problem?
Thanks very much!
Yes. Opalo is correct. I would add that it is generally bad practice to modify anything under JAVA_HOME (with a few notable exceptions like security policies). Generally, you want to set a CLASSPATH for both compilation and execution for the JAR and CLASS files that are needed. Generally, set JAVA_HOME as an environment variable but specify CLASSPATH for each usage.