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 186747 - Can't Build and Run with Different Java Versions
Summary: Can't Build and Run with Different Java Versions
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 normal (vote)
Assignee: Tomas Zezula
Depends on: 107071
  Show dependency tree
Reported: 2010-05-26 14:39 UTC by bccomp
Modified: 2010-05-27 13:35 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description bccomp 2010-05-26 14:39:39 UTC
There is no way to configure a project to use one JDK to build and another to run. This is important if a product must use a standard build version yet support newer versions at runtime.
Comment 1 Peter Pis 2010-05-27 08:23:27 UTC
Comment 2 Jesse Glick 2010-05-27 13:01:18 UTC
Possible to override targets in build.xml to run against a newer JDK, though debugger breakpoints etc. would then be wrong. Could override targets to build against an older JDK, but then the editor would be wrong. (See blocking issue.)

Best is probably to build & run against newer JDK, but also inject a build step to verify that newer APIs are not being used accidentally. With a Maven project this is trivial, using the Animal Sniffer plugin. For an Ant-based project this would not be so easy. Probably WONTFIX but Tomáš can evaluate.
Comment 3 Tomas Zezula 2010-05-27 13:35:57 UTC
When time permits we can add a runtime platform.