Results 1 to 13 of 13
  1. #1
    Exponential_P is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default Have I missed Something ???

    Hi I'm currently teaching myself the basics of Java using a few books I bought, I've installed the lastest version of Java SDK and I'm using Textpad as my editor because of the in built compiler, but every time I try to compile an applet it keeps coming up with this error message saying system cannot find specified file ??? All the files have been saved using the .java extension. I know this is a really basic stupid question and I apologise but its driving me mad and I can't do any excersies with being able to compile the examples in the book. I think it has something to do with the folder I specified the files should be saved in...... Please help

    THANKS FROM A GRATEFUL NEWBIE

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Try compiling from the command line and following the instructions at the Sun tutorial (the section on creating hello world) to the letter. If you still have problems, then come on back, post your code, post how you compile your code, and post the full text of your error messages. Best of luck.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    What inbuilt compiler you are using? I hope you are working on javac. Can you post the complete error message here to see.

  4. #4
    Exponential_P is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default

    The full error messages is: The system cannot find the file specified

    The code is from Java Made Easy Edition 2, it is the first example of a Java application:

    import java.applet.Applet;
    import java.awt.Graphics ;

    public class HelloApp extends Applet {

    public void paint(Graphics g) {

    g.drawString("Hello from an applet", 50,20);
    }

    }

    I'm sure I'm doing something really silly on a basic level, the complier is from textpad 4

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  6. #6
    Exponential_P is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default

    I'm running from Textpad. Usually when you compile anything in Textpad it will run it in its applet viewer

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Sorry I didn't get you. You say that code is written on the Textpad and run through the command prompt using the command java HelloApp? Then Applet Viewer pops-up?

  8. #8
    Exponential_P is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default

    In textpad's tools option there is an option to compile applet, then usually the applet viewer pops up or if your code has syntax errors an error message will appear with which specific lines its having trouble executing. But I'm not even getting that far.

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Oh, seems both of us talking about two different text pads.

    Lets go back to your question. Can you compile and run simple Java code in that way? Did you try that?

  10. #10
    Exponential_P is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default

    No I've tried compile simple Java apps and applets but I keep geing that same error message, the system cannot find file specified. That message comes up every time I click compile in the tools option of textpad.

  11. #11
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  12. #12
    Exponential_P is offline Member
    Join Date
    Jan 2009
    Posts
    6
    Rep Power
    0

    Default

    No how do u do that ???

    error message reads: The system cannot find file specified

  13. #13
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Posting Permissions

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