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 51183 - Refactor Main Class breaks manifest
Summary: Refactor Main Class breaks manifest
Status: RESOLVED DUPLICATE of bug 46776
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-05 03:13 UTC by Lareon
Modified: 2004-11-09 23:21 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lareon 2004-11-05 03:13:59 UTC
When you refactor the name of the current main
class, it doesn't change it in the project
properties, thus when you build the project, the
manifest includes the OLD main class name.

Workaround: change the main class manually from
the project properties dialog.
Comment 1 Jan Becicka 2004-11-05 07:22:27 UTC
Reassigning to java/project - there is similar issue 42245. I assume,
that this issue can be fixed in MainClassUpdater. Reassign back if I'm
wrong. Thanks.
Comment 2 Marek Grummich 2004-11-05 08:42:21 UTC
I would say it is a regression. I filled a similar issue 42245 that
was fixed. 
Comment 3 Jan Chalupa 2004-11-05 18:19:30 UTC
A regression? Has it ever worked? Not for me in beta1, beta2 nor the
recent builds.
Comment 4 Jesse Glick 2004-11-06 00:31:09 UTC
Tomas/Jirka please evaluate...
Comment 5 Marek Grummich 2004-11-08 08:40:21 UTC
Honzo Ch., you are right regarding beta 1 and beta2. However, if I
refactor (rename) a project main class in the build 200410070525, then
project main class property is changed to the new name automatically.
Comment 6 Marek Grummich 2004-11-08 09:58:29 UTC
One note yet, the project manifest
(<projectdir>/dist/<projectname>.jar/META-INF/MANIFEST.MF) is updated
as soon as user invokes Build (Clean&Build) action. There is an
inconsistence between project main class property and manifest.mf in
the meantime.
Comment 7 Marek Grummich 2004-11-08 09:59:52 UTC
I clear REGRESSION keyword
Comment 8 Tomas Zezula 2004-11-09 15:23:47 UTC
Will be fixed in NB 4.1
Comment 9 Tomas Zezula 2004-11-09 18:54:43 UTC
I've tried it and it works. The refactoring obviously does not update
the manifest of already built archive (dist.jar)
You should clean and build your project to correct it.
The enhancement is: If the refactoring of main class or changing
project properties should not cause project clean or invalidate the
dist.jar
Comment 10 Jesse Glick 2004-11-09 23:21:51 UTC
Nearly identical request already filed in issue #46776.

*** This issue has been marked as a duplicate of 46776 ***