Results 1 to 4 of 4
  1. #1
    kungfu is offline Member
    Join Date
    Dec 2009
    Posts
    16
    Rep Power
    0

    Default i dont understand why i cant run my program please help

    well first off i have net beans and i am creating the program hello world so i go to new file , java file class and name it hello then i am staring at the source page but when i have wrote the code for the program and click run it runs some other program called the anagram game that comes stock on netbeans i am so confused why is the run button stuck on running anouther program thats not even open why wont to run my program the one that is open

    wierd ehh

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

  3. #3
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    7

    Default

    I suspect that you have another project selected as the 'Main' project. Right click on the project you are trying to run - then select the option 'Set as main project'. If you have more than one class with a 'main' method, you can select which one should run by right clicking on the project, selecting 'properties', selecting 'Run' and the clicking the browse button next to 'Main Class:' and selecting your main class. If both of these steps have been set to the correct project/file respectively, then clicking the Play (Run Main Project) button will result in the correct program running.

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

    Default OR

    you could just simply run the program from the command prompt window, since its nothing complex.

    Or try something else like eclipse, its possible your just reverting to a default program and just need to set open the correct one from the menu.

Similar Threads

  1. Hello! and I need help. I dont know were to start
    By Fall0ut in forum New To Java
    Replies: 10
    Last Post: 05-19-2010, 06:26 PM
  2. 8 questions I dont understand while studying for SCJP
    By shankhas in forum Java Certification
    Replies: 5
    Last Post: 05-19-2010, 07:53 AM
  3. Dont use this program, Im warning you!
    By Addez in forum JCreator
    Replies: 3
    Last Post: 11-28-2009, 07:18 PM
  4. Dont understand Return Statement.
    By ocean in forum New To Java
    Replies: 6
    Last Post: 10-22-2009, 12:06 PM
  5. Data Files - A problem that I dont understand :D
    By Exhonour in forum New To Java
    Replies: 7
    Last Post: 01-20-2009, 05:13 AM

Posting Permissions

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