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 45374 - Source/target level should always be explicit in a j2seproject
Summary: Source/target level should always be explicit in a j2seproject
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
: 50435 53564 (view as bug list)
Depends on:
Blocks: 41537
  Show dependency tree
Reported: 2004-06-22 16:35 UTC by Jesse Glick
Modified: 2005-01-26 11:46 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-06-22 16:35:45 UTC
It seems it would be better if a j2seproject
always kept in its desired
source and target levels, to avoid a possible
source of errors when running builds without The source level (and probably
target level) of a project is really intrinsic to
the project and should not be sensitive to the
build environment, even if the selection of a
physical JDK to build and run against might have
to passed in from the environment.

Suggest that we modify these values in only in response to the user
explicitly changing the platform in the project
customizer, and at no other time.

I.e. a user running the IDE on JDK 1.5 would
always have 1.5 source level as the initial
setting for new projects. If the user changed the
explicit platform to be a 1.4 JDK, would be changed to use 1.4
source and target levels.

Needs to be analyzed with a full set of use cases
to be sure that the behavior would be rational in
all circumstances.

May no longer be feasible for D, but we can think
about it for E.
Comment 1 jrojcek 2004-12-08 17:30:01 UTC
The UI spec is in the URL field.
Comment 2 David Konecny 2004-12-09 08:31:06 UTC
Comment 3 David Konecny 2005-01-18 16:06:23 UTC
Petr said he will fix this issue.
Comment 4 Milan Kubec 2005-01-19 09:20:17 UTC
*** Issue 53564 has been marked as a duplicate of this issue. ***
Comment 5 Jesse Glick 2005-01-20 16:45:46 UTC
Wasn't this just fixed in CVS? Or was that something else?
Comment 6 Jesse Glick 2005-01-20 16:46:56 UTC
*** Issue 50435 has been marked as a duplicate of this issue. ***
Comment 8 Jesse Glick 2005-01-25 20:44:04 UTC
Not working properly. I run the IDE on JDK 1.6.0, make a j2seproject
main app, and build and run it. Error occurs as in issue #52127, since
the default level for this platform is (erroneously) listed as 1.6.
Now I go into the properties dialog and set Source Level to 1.5. I get


This is no good as is now still set to 1.6, which is an
invalid value (and what causes the error in #52157). The target should
be set to the same value as the source (at least when using the GUI).
I believe this needs to happen in J2SEProjectProperties.
Comment 10 Tomas Zezula 2005-01-26 11:46:22 UTC
Checking in
new revision: 1.5; previous revision: 1.4