• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

When I Run Main Project in NetBeans (F6) It always runs a project that isn't even open

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm new to using NetBeans and Java but am learning lots from the book Head First Java which I love.

However, I am having a problem with NetBeans when I click on the green arrow(Run Main Project F6) button. It keeps trying to run my project and then looks for a class in another completely unrelated project, which isn't even open. I don't understand how that can be happening. This class is not even in my code yet it is trying to compile with it. I have attached a screen print.

I am running the BeatBox application from the book and it keeps looking for the QuizCardBuilder class, which is in another project. This happens even if I open ANY other unrelated projects and try to run them. They all keep asking for the QuizcardBuilder class. It's crazy.
NetBeansIssue2.jpg
[Thumbnail for NetBeansIssue2.jpg]
Net Beans Issue
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you try right clicking on the project you want to execute and click Run, rather than using run main project. I suspect its always running the project that has been set as main project when you hit F6
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If at all possible, don't use IDEs until you are a lot more experienced. You quote the name of the class with your main method at the command line/terminal

javac MyClass.java
java MyClass

Note when you do and don't use extensions.
 
David Ausman
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going to take your advice and stop using the IDE for now. I just started using it for the last few projects because it looked like it made things easier but it's caused more confusion. I wasn't having any problems when I was running things from the DOS prompt.

Thanks again.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic