954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Replace function in jdk 1.2.2

I am replacing a single quote by double quote in a String

I am getting an error
Method replaceAll(java.lang.String, java.lang.String) not found in class java.lang.String.

my jdk version is 1.2.2

Can anyone help me so that i can use the same function without changing my java version

sr0867
Newbie Poster
5 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

replaceAll doesn't exist in 1.2.2 You can find third party libraries for it in 1.3, and as of 1.4, it is standard, but it does not exist in 1.2 (although, if you search, you may find a third party library, but, as I said, I believe that was first available 1.3).

I would seriously suggest, however, updating your jdk. Sun doesn't even offer documentation for 1.2 anymore (at least not from the Java SE documentation sites).

Why do you not want to upgrade?

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

1.2 is end of life, and has been for years.
1.3 is going end of life soon, and in fact already is end of life for all platforms except Solaris.
Expect 1.4 to go end of life with the release of 1.7, probably next year.

my guess is that the kid has a terribly old book that comes with 1.2 and it thinks it can't use anything else.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

As it is not the development environment and may require some time to upgrade

sr0867
Newbie Poster
5 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

Well, if it's in a production environment, it's even more important to get it upgraded.

Sun does not support that version any longer, so any problems that may occur are yours (or more correctly your company's) responsibility to fix.

Also, let it be known, that (if I remember correctly) there are security related bugs with that version.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

Thanks for your reply .I'll try and get it upgraded

sr0867
Newbie Poster
5 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You