• Post Reply Bookmark Topic Watch Topic
  • New Topic

jre doubt

 
ranga shreya
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have used string.replaceAll() in rad.
when I am trying to put that code in wsad5.1.0 it's showing error in the place where I have used string.replaceAll() .
What might be the reason for this.
Please give me the reply
thanks,
Ranga
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
replaceAll was new in 1.4. Any chance you're running an older JVM in WSAD? I am.
 
ranga shreya
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes I am running in jdk1.3 wsad 5.1.0..
So what is the solution for this.
Please reply asap
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15758
74
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Upgrade to a newer Java version if possible, or use some other methods instead of replaceAll() to do what you want.

If you need regular expressions while working with JDK 1.3, have a look at Apache Jakarta Regexp or Apache Jakarta ORO.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General (Beginner).
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On my very first Java project I wrote my own replaceAll that uses indexOf and substrings and loops until the old value is no longer found. It's slightly tricky to keep track of starting position when searcing for the old value, cause the first version of "replace A with AB" looped forever.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!