• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

cannot compile

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!!
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 2412
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic