Results 1 to 4 of 4
  1. #1
    ashleymcg is offline Member
    Join Date
    Jan 2012
    Posts
    1
    Rep Power
    0

    Default I add java.exe to programs in preferences but I cannot compile java in textpad. help!

    I have completed the following steps in textpad :



    In TextPad select Configure --> Preferences. The Preferences window will be displayed.
    In the Preferences window select Tools. The right hand side of the window will be populated with any available tools as well as with a button labeled Add.
    Click the Add button and select Program from the drop down list. A window entitled Select a File will be displayed.
    In the Select a File window navigate to the javac.exe file using the directory location annotated in step 2. Select Open.
    Javac will be added in your tools list.
    Repeat steps 5 - 6 this time selecting the java.exe file. Java will be added to your tools list.
    In the Preferences window select Apply.


    Now, when I go to complete the following steps:


    Open up Test.java in TextPad.
    In TextPad, select Tools --> External Tools --> Compile Java. "Tool Completed Successfully" will be displayed in the Tool Output screen.
    In TextPad, select Tools --> External Tools --> Run Java Application. "This is a test." should be displayed in a DOS window.




    I do not find copile java in my external tools options, instead I come to the option "java".



    When I try to use this option I get this error message:

    Could not find the main class: C:\Users\xxxxx\Desktop\Test.java. Program will exit.
    Exception in thread "main"
    Tool completed with exit code 1



    the tool is not completed successfully, nor do i get the message in a dos window. PLEASE HELP.
    i need to get this straightened out AS SOON AS POSSIBLE as I will need to use these tools for
    my school assignments...


    THANK YOU VERY MUCH!!!

  2. #2
    sabhandari is offline Member
    Join Date
    Jan 2011
    Posts
    4
    Rep Power
    0

    Default Re: I add java.exe to programs in preferences but I cannot compile java in textpad. h

    One can also use System.exit which will bypass finally block also

  3. #3
    christopherx is offline Member
    Join Date
    Oct 2011
    Posts
    92
    Rep Power
    0

    Default Re: I add java.exe to programs in preferences but I cannot compile java in textpad. h

    Your code has no main class. How do you expect to make an executable java application that doesn't have a main class?

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default Re: I add java.exe to programs in preferences but I cannot compile java in textpad. h

    Quote Originally Posted by sabhandari View Post
    One can also use System.exit which will bypass finally block also
    I fail to see the relevance of this remark. Did you perhaps post it without reading the thread?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 1
    Last Post: 04-27-2011, 11:08 AM
  2. Replies: 2
    Last Post: 10-30-2010, 05:45 AM
  3. Replies: 8
    Last Post: 09-30-2010, 07:32 PM
  4. java.util.Preferences
    By jon80 in forum New To Java
    Replies: 0
    Last Post: 06-07-2009, 12:28 AM
  5. Same error msg with every program Java Textpad
    By peterdfl in forum New To Java
    Replies: 7
    Last Post: 04-17-2009, 05:49 AM

Tags for this Thread

Posting Permissions

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