I have a text file named FormatString.java. It contains a few words. OUt of those words, I want to replace the word oldstring with newstring and rename the final result as t.txt
If you are running the program from command line, maybe you wan to put the FormatString.java
in your bin
folder.
With Eclipse
ProjectRootFolder
bin
FromatString.java
ReplacingText.class
src
ReplacingText.java
With Netbeans
ProjectRootFolder
build
classes
FromatString.txt
replacinttext
ReplacingText.class
src
ReplacingText.java
C:\Users\Dhaval\Desktop\Java Assignment\ReplacingText\build\classes>java replacingtext.ReplaceText FormatString.java public private
Try to run the program like I have above with all the files in the same Directorys like I have