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

Summary: Can't Build and Run with Different Java Versions
Product: java Reporter: bccomp
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 107071    
Bug Blocks:    

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
Reassigning.
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.