Java can't find package, but PATH set correctly (j2se1.4.0, java.util.regex package)
Hi. The Java 2 SDK includes a package java.util.regex. I'm trying to use it like this:
import java.util.regex.*; Pattern p = Pattern.compile("abc"); But the compiler returns the error "Class not found." Both my PATH and CLASSPATH include /usr/local/j2sdk1.4.0/ /usr/local/j2sdk1.4.0/bin /usr/local/j2sdk1.4.0/lib I would be grateful for any help with this. Thanks! Ethan |
Problem solved. Turned out the kaffe compiler was installed on the system. Thanks to a suggestion on the Java Developer Connection forums, used find and rpm commands to discover it. Uninstalled it. Now the intended Java compiler is used.
Ethan |
You should only need the java "bin" directory in your PATH and thats it. No CLASSPATH or anything else required.
In the future you can check your java version like this: java -version This could also help: which java |
Zemedico, thanks!
Ethan |
Ethan, can you tell me what you did to resolve your problem? Got any links that spell out the problem and fix? I seem to be having similar/same problem.
My compiler also craps out when using assertions too. Any idea on this one? |
Quote:
Quote:
|
All times are GMT -5. The time now is 08:22 PM. |