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 50303 - class does not have a main method
Summary: class does not have a main method
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-13 07:33 UTC by tboerkel
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example source. (17.57 KB, text/plain)
2004-10-13 07:34 UTC, tboerkel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tboerkel 2004-10-13 07:33:47 UTC
NB keeps insisting, that the class, I'd like to
run with shift-F6 does not have a main method. I
can cure this FOR A WHILE by stopping NB, deleting
mdrstorage and starting or by renaming the method
to mainX and renaming it to main again. But, as I
said, the problem keeps coming back.

The are no exceptions in messages.log.

Using NB 20041008, JDK 1.5.0 (but project runs
with platform 1.4.2_05).

Attaching example source.
Comment 1 tboerkel 2004-10-13 07:34:27 UTC
Created attachment 18235 [details]
Example source.
Comment 2 Jan Becicka 2004-10-13 10:43:43 UTC
Attached source example is not valid JDK 1.5 source. It contains
following line:
int count, i, enum;

enum is a keyword since 1.5.
This is the reason why your project runs with 1.4.2_05, but not with
JDK 1.5.0

Comment 3 tboerkel 2004-10-13 12:19:10 UTC
You misunderstood me. NB runs under JDK 1.5.0, but this project ALWAYS
runs with platform JDK 1.4.2_05.

If I would try it with JDK 1.5.0, it wouldn't even compile, that's
right. But I did not try this. Maybe, NB (parser) sometimes "forgets"
about the chosen platform for this project and uses the Default
platform instead.

So, the report is not invalid.

But I should say, that the problem did not appear with NB 20041012, yet.
Comment 4 Jan Becicka 2004-10-14 09:04:10 UTC
Neither I nor reporter is able to reproduce it. Closing as works for
me. Thomas, if this bug happens again, please reopen this issue. Thanks.