• Post Reply Bookmark Topic Watch Topic
  • New Topic

package java.util.regex does not exist  RSS feed

 
Rohna Ranjan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get package java.util.regex does not exist while trying to run a program which uses the Pattern class in the regex package..
I'm using j2sdk1.4.1_02..
I made the entries to the Environment variables too..meaning I set the path(bin) and classpath(lib/tools.jar)..
Is there anything else in specific shud be done??
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You shouldn't have to point the classpath to a system jar file; the classpath is (these days) only used for your custom classes; anything that comes with the JDK should be available.
Out of curiousity, what do you get when you do:
java -version
?
Just to make sure that the runtime is using the correct version of the JRE.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Joel mentioned, you might find that the JRE used when executing java.exe isn't the one you might have expected to be used. Sometimes Microsoft's java.exe is interfering. Successfull fixes that I've seen have included editing the PATH setting to list the location of the java.exe that you'd like to use before any Windows system directories are listed, reinstalling the J2RE, and renaming any java.exe files in a Windows system directory to something akin to java.bad (or just delete it).
Of course, it could be an old version of Sun's JRE that is "interfering".
Any luck?
 
Rohna Ranjan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I give java -version I get java 1.4.1_02..
But yet I get the error..
 
Murali Nanchala
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is your JDK1.4 located on your system? And in which folder did you try java -version?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!