File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jre doubt" Watch "jre doubt" New topic
Author

jre doubt

ranga shreya
Greenhorn

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,
Ranga


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
Greenhorn

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: 14111
    
  16

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 7 API documentation
Scala Notes - My blog about Scala
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: jre doubt