jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes jre doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jre doubt" Watch "jre doubt" New topic

jre doubt

ranga shreya

Joined: Mar 05, 2005
Posts: 20
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,<br />Ranga.<br />Life is precious so enjoy the life each moment and utilise it at the same time.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
replaceAll was new in 1.4. Any chance you're running an older JVM in WSAD? I am.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
ranga shreya

Joined: Mar 05, 2005
Posts: 20
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15043

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.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

Moving to Java in General (Beginner).

[Jess in Action][AskingGoodQuestions]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: jre doubt
It's not a secret anymore!