Results 21 to 27 of 27
Thread: Reading In A Folder
- 07-20-2010, 06:05 PM #21
- 07-20-2010, 06:20 PM #22
Member
- Join Date
- Jul 2010
- Posts
- 39
- Rep Power
- 0
Ok Hang on, I realise I was being a bit of a gimp just then.
I've corrected myself, so now I have
And am getting one errorJava Code:/** main method to find the resource name calling */ public Find(String fileName, String begin, String end,String whereToWrite) throws java.io.IOException { fileName="myDir"; begin="<@dynamichtml"; end="@>"; whereToWrite="C:\\Test\\filetest.txt";}
Find.java93:
Find<java.lang.string.java.lang.string (repeats)
String is already defined in Find
public Find <String fileName, String being, String end, String whereToWrite> throws java.io.IOexception
error points to io ?????
regards S
- 07-20-2010, 06:35 PM #23
Why the < and > vs the ( and )?
Doesn't copy and paste work for you? Its better if you copy and paste. Then we know what you're posting could be correct. When you type it in, there is no way to know if what you entered is what was shown on the screen. Some times that can result in a lot of "wild goose chases".
- 07-21-2010, 09:01 AM #24
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
I think you need to take a step back.
Do you know how methods and parameters work?
Because that code implies you don't.
There's no point having parameters to a method (or constructor) if all you do is set the value of them straight away in the code...as you do there.
In addition, as Norm says...why the change from () to <>?
If you do something completely out of the ordinary in the code, something the compiler doesn't understand at all, it then makes a "best guess" at the problem. The further from valid Java syntax you get the less reliable the guess is...which is what might well be happening here.
- 07-21-2010, 09:29 AM #25
Member
- Join Date
- Jul 2010
- Posts
- 39
- Rep Power
- 0
Hi guys,
Unfortunately I cant copy and paste from the command prompt window, it wont allow me to. If you know a way I can do it then please let me know. The only thing i could do is take a screenshot and attach it to the post.
Sorry about the diplay etc when pasting in code from Notepad++ there seems to be some kind of formatting error. I've now solved my the issue, a nice can of Red Bull woke me up this morning.
Thanks very much for your help guys :)
regards S
Java Code:/** main method to find the resource name calling */ public static void main(String[] args) throws IOException { Find f = new Find("myDir", "<@dynamichtml", "@>", "C:\\Documents and Settings\\Kieren McDonald\\Desktop\\Nick\\Java\\Test\\filetest.txt"); }
- 07-21-2010, 01:38 PM #26
See post#21I cant copy and paste from the command prompt window
- 07-21-2010, 01:51 PM #27
Member
- Join Date
- Jul 2010
- Posts
- 39
- Rep Power
- 0
Similar Threads
-
Lock a folder
By nchouhan15@gmail.com in forum New To JavaReplies: 4Last Post: 03-13-2012, 08:33 AM -
Reading a .txt i a folder - help
By Mattedatten in forum New To JavaReplies: 6Last Post: 01-13-2010, 01:49 AM -
bin and lib folder
By sdkanhere in forum New To JavaReplies: 1Last Post: 10-07-2009, 04:46 PM -
problem with reading excel sheet data reading using poi libraries
By sandeepsai17 in forum New To JavaReplies: 5Last Post: 08-21-2009, 11:03 AM -
[SOLVED] Making a new folder, reading an entire file in one block read
By fogus in forum New To JavaReplies: 15Last Post: 03-18-2009, 10:59 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks