| Author |
having issues replacing strings
|
Timy McTipperstan
Ranch Hand
Joined: Feb 17, 2005
Posts: 32
|
|
So somewhere in my java code there is this I get compile errors telling me that the replaceAll method is undefined for the type string. not sure, runs fine if its in a jsp.
|
 |
James Carman
Ranch Hand
Joined: Feb 20, 2001
Posts: 580
|
|
|
What JDK are you using? Type java -version.
|
James Carman, President<br />Carman Consulting, Inc.
|
 |
Timy McTipperstan
Ranch Hand
Joined: Feb 17, 2005
Posts: 32
|
|
Hummm seems to be 1.3.1 which would explain the issue. Sorry I thought i upgraded that.
|
 |
James Carman
Ranch Hand
Joined: Feb 20, 2001
Posts: 580
|
|
Originally posted by Timy McTipperstan: Hummm seems to be 1.3.1 which would explain the issue. Sorry I thought i upgraded that.
That'd be your problem. Somehow Tomcat (or whatever servlet/JSP container you're using) is running using a 1.4+ JVM.
|
 |
Timy McTipperstan
Ranch Hand
Joined: Feb 17, 2005
Posts: 32
|
|
|
Ah I just updated to 1.4.2_08 and Eclipse still wont compile.
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16811
|
|
Originally posted by Timy McTipperstan: Ah I just updated to 1.4.2_08 and Eclipse still wont compile.
Works for me... What errors are you getting? Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
Timy McTipperstan
Ranch Hand
Joined: Feb 17, 2005
Posts: 32
|
|
|
The method replaceAll(String, String) is undefined for the type String.
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Did you tell Eclipse that you want to use the new JDK?
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
Timy McTipperstan
Ranch Hand
Joined: Feb 17, 2005
Posts: 32
|
|
|
I thought so, however I am now doubting. where would I do that? since it didnt seem to work when I did it the last time.
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16811
|
|
Originally posted by Timy McTipperstan: I thought so, however I am now doubting. where would I do that? since it didnt seem to work when I did it the last time.
Window --> Preferences --> Installed JREs --> ... Henry
|
 |
Timy McTipperstan
Ranch Hand
Joined: Feb 17, 2005
Posts: 32
|
|
Originally posted by Henry Wong: Window --> Preferences --> Installed JREs --> ... Henry
Yeah thats what I had done. Twice.
|
 |
James Carman
Ranch Hand
Joined: Feb 20, 2001
Posts: 580
|
|
|
Just installing the new JRE doesn't do the trick. You have to tell Eclipse to use it in your project.
|
 |
Timy McTipperstan
Ranch Hand
Joined: Feb 17, 2005
Posts: 32
|
|
|
Something did the trick, I think it might have been restarting.
|
 |
 |
|
|
subject: having issues replacing strings
|
|
|