Results 1 to 15 of 15

Thread: Netbeans Issue

  1. #1
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Unhappy Netbeans Issue

    I have a problem when I create a java application, for some reason no main class is created, I can follow the HelloWorld tutorial word for word but I still have the same problem. When I first installed NetBeans everything was fine, then the next day this problem appeared out of no where.

    What should happen: (from "Hello World!" for the NetBeans IDE (The Java™ Tutorials > Getting Started > The "Hello World!" Application))


    What I get:


    I hope there's an easy solution because I'm eager to start learning, this is holding me back. Thanks.

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

    Default Re: Netbeans Issue

    I hope there's an easy solution
    Have you tried looking in the NetBeans help to see whether there's anything about creating/setting the main class? You're going to need more knowledge on that as you continue to use NetBeans, so a simple answer to the immediate problem wouldn't really help you.

    this is holding me back
    Be curious. Click around. Right-click around. Go through all the sections and tabs in properties dialogs. Look up the Help for anything you don't understand.

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

  3. #3
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: Netbeans Issue

    I've looked everywhere for a solution, asked on the netbeans forum but no one replied (thanks for replying by the way).
    I can't right click and add a java class, the java folder isn't even there like I'm sure it was before, just java FX and the rest.

    I can't find anything online about this problem so I'm pretty stuck.

  4. #4
    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 Re: Netbeans Issue

    Once you create that package is it exist physically in the project folder? Check it with and without closing the IDE.

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

    Default Re: Netbeans Issue

    the java folder isn't even there like I'm sure it was before, just java FX and the rest.
    What java folder? Could you be more specific?

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

  6. #6
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: Netbeans Issue

    Quote Originally Posted by DarrylBurke View Post
    What java folder? Could you be more specific?

    db
    When you add a new item to the project there's categories such as java, java FX etc. But it should make the main class automatically.

    Quote Originally Posted by Eranga View Post
    Once you create that package is it exist physically in the project folder? Check it with and without closing the IDE.
    No it isn't.

  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 Re: Netbeans Issue

    Quote Originally Posted by Swick View Post
    No it isn't.
    You mean that any of the created packages are not exist once you reopen the NetBeans?

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

    Default Re: Netbeans Issue

    Um, the <default> package is represented by the /src folder. I don't see any named packages in the screenshot.

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

  9. #9
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: Netbeans Issue

    Quote Originally Posted by Eranga View Post
    You mean that any of the created packages are not exist once you reopen the NetBeans?
    Well I can't find that default package anywhere. The package isn't named correctly when the project is made.

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Netbeans Issue

    When you created the project did you ensure the 'Create Main Class' check box was ticked?
    I would check myself but I don't have Netbeans here.

  11. #11
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: Netbeans Issue

    Quote Originally Posted by Tolls View Post
    When you created the project did you ensure the 'Create Main Class' check box was ticked?
    I would check myself but I don't have Netbeans here.
    Yes, I've tried it several times. Like I said, it worked fine at first (the day before I came across this problem) so I know for sure that I'm not doing anything wrong.

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Netbeans Issue

    What version of Netbeans is it, on which OS?
    Any idea if there's been an auto-update to it that might have broken it?

  13. #13
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: Netbeans Issue

    Quote Originally Posted by Tolls View Post
    What version of Netbeans is it, on which OS?
    Any idea if there's been an auto-update to it that might have broken it?
    The latest version (7.1) on Windows Vista 32bit, pretty sure there wasn't an auto update. :|

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

    Default Re: Netbeans Issue

    I don't know what the big deal is. Even if your project templates have somehow got corrupted and you can't automatically create the main class along with the project, what stops you from creating a class and identifying it as the main class?

    If you can't discover from the help file how to do that, then you need a tutor. Anonymous, time-delayed help on a forum just won't cut it.

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

  15. #15
    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 Re: Netbeans Issue

    Quote Originally Posted by Swick View Post
    Well I can't find that default package anywhere. The package isn't named correctly when the project is made.

    I am not talking about the default package. What I am asking is once I you create a package you can see a folder with the same name in /src.

Similar Threads

  1. Replies: 6
    Last Post: 08-16-2011, 10:17 AM
  2. JMS/NetBeans Issue
    By airowe in forum New To Java
    Replies: 1
    Last Post: 06-06-2011, 06:04 AM
  3. [Linux 11.1 and NetBeans 6.9.1] JProgressBar issue
    By soundlord in forum AWT / Swing
    Replies: 2
    Last Post: 04-17-2011, 11:54 PM
  4. Netbeans Issue
    By Doctor Cactus in forum New To Java
    Replies: 0
    Last Post: 02-19-2009, 03:18 PM
  5. Issue using FOR statment with NetBeans
    By Deathmonger in forum Advanced Java
    Replies: 3
    Last Post: 07-30-2008, 01:46 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
  •