Replace function in jdk 1.2.2

Reply

Join Date: Feb 2008
Posts: 5
Reputation: sr0867 is an unknown quantity at this point 
Solved Threads: 0
sr0867 sr0867 is offline Offline
Newbie Poster

Replace function in jdk 1.2.2

 
0
  #1
Jun 2nd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,639
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 283
Moderator
masijade's Avatar
masijade masijade is offline Offline
Posting Maven

Re: Replace function in jdk 1.2.2

 
0
  #2
Jun 2nd, 2008
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?
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,492
Reputation: jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all 
Solved Threads: 236
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Replace function in jdk 1.2.2

 
0
  #3
Jun 2nd, 2008
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.
42
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 5
Reputation: sr0867 is an unknown quantity at this point 
Solved Threads: 0
sr0867 sr0867 is offline Offline
Newbie Poster

Re: Replace function in jdk 1.2.2

 
0
  #4
Jun 3rd, 2008
As it is not the development environment and may require some time to upgrade
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,639
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 283
Moderator
masijade's Avatar
masijade masijade is offline Offline
Posting Maven

Re: Replace function in jdk 1.2.2

 
0
  #5
Jun 3rd, 2008
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.
Last edited by masijade; Jun 3rd, 2008 at 2:47 am. Reason: typo
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 5
Reputation: sr0867 is an unknown quantity at this point 
Solved Threads: 0
sr0867 sr0867 is offline Offline
Newbie Poster

Re: Replace function in jdk 1.2.2

 
0
  #6
Jun 3rd, 2008
Thanks for your reply .I'll try and get it upgraded
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum


Views: 1354 | Replies: 5
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC