This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 27489 - NetBeans forgets project main class
Summary: NetBeans forgets project main class
Status: VERIFIED DUPLICATE of bug 26171
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker with 1 vote (vote)
Assignee: issues@projects
URL:
Keywords: RANDOM
: 28924 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-20 17:46 UTC by gholmer
Modified: 2005-07-15 07:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide.log with problem when loading project options (25.55 KB, text/plain)
2002-09-25 11:37 UTC, tkellerer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gholmer 2002-09-20 17:46:08 UTC
Sometimes, when I hit ctrl-shift-F6 for "execute
project", NetBeans prompts me to select the
project's main class even though I had previously
set it.  Don't know how to reproduce reliably.
Comment 1 tkellerer 2002-09-25 11:34:04 UTC
I'm experiencing this as well. I think that it happens when I change
the project in the IDE. After a restart the IDE tries to load the main
class from the previous project instead of the current. When you open
the project settings they are completely blank, no properties at all.

I have attached an ide.log which shows the problem.

You can see that there is a problem while loading the project options
(Line 215 in ide.log)

After that you will see an exception reporting an
org.openide.loaders.DataObjectNotFoundException

WbManager.java could not be loaded because that was the main class
from the previous project NOT the current one.

The current project's main class is a JSP page if that matters.
Comment 2 tkellerer 2002-09-25 11:37:09 UTC
Created attachment 7504 [details]
ide.log with problem when loading project options
Comment 3 Milan Kubec 2003-01-08 11:01:45 UTC
Another comment from Nice Max:

Reproducing this behavior is straightforward:

1. Create a new project
2. Mount an existing directory
3. Create a single class with main() method
4. Add the directory to the project ("Tools"->"Add to 
Project")
5. Set the newly created class as project main class.
6. Execute the project - should work fine
7. Exit Netbeans
8. Restart Netbeans and execute the project again.

At this point Netbeans shows the "Set Project Main Class" 
dialog.

This happens on every newly created project.

I just made a test with an existing project where NB 
remembers the project main class. I have created a new 
class and marked this one as project main class. After 
restarting, NB has forgotten about the new main class and 
starts the old one when executing the project. I think, 
somehow NB is unable to save its settings correctly.

Comment 4 Milan Kubec 2003-01-08 11:05:01 UTC
*** Issue 28924 has been marked as a duplicate of this issue. ***
Comment 5 Milan Kubec 2003-01-20 09:49:42 UTC
Marking as random since I'm not able to reproduce according to your steps.
Comment 6 Vitezslav Stejskal 2003-01-22 17:33:31 UTC
This is the same problem like issue #26171 and it's already fixed.

*** This issue has been marked as a duplicate of 26171 ***
Comment 7 Marian Mirilovic 2005-07-15 07:44:02 UTC
closed