wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes cannot compile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "cannot compile" Watch "cannot compile" New topic
Author

cannot compile

Suka Hati
Ranch Hand

Joined: Oct 28, 2004
Posts: 56
hi there....
im now developing java application....but yesterday i'm using a new pc....when i tried to run the application that i've write at my previous pc....i got this error(one of it)....

C:\pause\Source\String_Reader.java:535: cannot resolve symbol
symbol : method replaceAll (java.lang.String,java.lang.String)
location: class java.lang.String
str = str.replaceAll("sy","S");

t think it might becouse of the path and classpath setting......

in path setting.....i put...jsdk_directory\bin

where...for classpath...i put....jsdk_directory\lib;directory_of_jar_files

is there something mising in my setting....

can somebody help me!!!
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Hi,

The replaceAll() method in the String class was introduced in JDK 1.4. The error message is saying there's no such method, so the computer you're using must have JDK 1.3 or earlier installed. Time for an upgrade!


[Jess in Action][AskingGoodQuestions]
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Your CLASSPATH wouldn't have anything to do with it. Probably your using a version of Java that didn't have the method replaceAll in String
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Check your JAVA_HOME, see if its pointing to an old version of Java (1.3 & below). And lastly, as previously suggested, grab JDK 1.4 or higher

Have lotsa fun with Java!


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot compile
 
Similar Threads
Errors while building j2ee project. Help needed urgently.
Cannot resolve symbol : request.setAttribute(..
compilation error
cant find constructor in packaged jar
compiled or not compiled