Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27
  1. #21
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,457
    Rep Power
    25

    Default

    Unfortunately i cant copy and paste from the compiler,
    If you are using the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The selection will show
    Click in upper left again
    Select Edit and click 'Copy'

    Paste here.

  2. #22
    SwissR is offline Member
    Join Date
    Jul 2010
    Posts
    39
    Rep Power
    0

    Default

    Ok Hang on, I realise I was being a bit of a gimp just then.
    I've corrected myself, so now I have

    Java 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";}
    And am getting one error

    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

  3. #23
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,457
    Rep Power
    25

    Default

    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".

  4. #24
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,016
    Rep Power
    20

    Default

    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.

  5. #25
    SwissR is offline Member
    Join Date
    Jul 2010
    Posts
    39
    Rep Power
    0

    Default

    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");   
    	}

  6. #26
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,457
    Rep Power
    25

    Default

    I cant copy and paste from the command prompt window
    See post#21

  7. #27
    SwissR is offline Member
    Join Date
    Jul 2010
    Posts
    39
    Rep Power
    0

    Default

    Hi Norm,

    Apologies I didnt actually see that post before, i must have had several at once earlier. Thank you thats a big help. I didnt actually realise that the command prompt window had menu functionality.

    The time i've wasted typing all that out, lol oh wel better late than never ay :)

    Thank you

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Lock a folder
    By nchouhan15@gmail.com in forum New To Java
    Replies: 4
    Last Post: 03-13-2012, 08:33 AM
  2. Reading a .txt i a folder - help
    By Mattedatten in forum New To Java
    Replies: 6
    Last Post: 01-13-2010, 01:49 AM
  3. bin and lib folder
    By sdkanhere in forum New To Java
    Replies: 1
    Last Post: 10-07-2009, 04:46 PM
  4. Replies: 5
    Last Post: 08-21-2009, 11:03 AM
  5. Replies: 15
    Last Post: 03-18-2009, 10:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •