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.
If the IDE is running on Java 6 and user creates a Web Application with target server that runs on Java 5 execution can fail. example error message: "java.lang.UnsupportedClassVersionError: PWC1651: Class webapplication37.ApplicationBean1 has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.5.0_12 " Better to prevent users from creating projects in the New Project dialog
Do you mean any kind of warning?
This should be resolved similarly to Java platform selection in J2SE project (e.g. changing Java platform warns user that source level is incompatible). In web project case whenever app server is chosen or changed we should make sure that Java sources have compatible compilation target/source level. That of course has precondition that we know version of Java runtime server is running in. So if IDE runs 1.6 and target server runs in 1.5 we should tell user that choosing this server will result also in changing Java source level and target to 1.5.
Sounds like an enhancement - or not?
No, users need to be warned or prevented from creating projects where the compilation target is Java 6 and the target server uses Java 5. Applications will fail to execute: "java.lang.UnsupportedClassVersionError: PWC1651: Class webapplication37.ApplicationBean1 has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.5.0_12 "
Why is the target release marked as future?
> Why is the target release marked as future? That's because when you changed it back from ENHANCEMENT to DEFECT the TM staid. And now the reasons why I think that this issue is enhancement: - the Web application is not able to find out which JDK the target server is running on (no API) - if such API would exist I still prefer just some simple warning dialog that there could be a *potential* problem while changing JDK version for Web application - but we definitely cannot forbid user to do so. Why potential? That's because user can start the target server from command line (with any JDK) or the target server registered in the IDE can be just the server for development and can be physically different from the production one (that will be the typical case I guess) David, Petr - any comments?
Re. "Why is the target release marked as future?" - we are past NB6beta2; there is missing API; this is minor issue IMO, this is sort of theoretical issue. In practice you know what server you are going to deploy to and what JDK it is running on as one of the prerequisites of your project. App server JDK is not a factor which changes quickly and often.
Aside all of that - it is late UI change too, imo.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss