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 72359 - Need ability to set default Java platform after installation.
Summary: Need ability to set default Java platform after installation.
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker with 2 votes (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 89304 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-07 18:59 UTC by rptmaestro
Modified: 2011-08-31 14:06 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rptmaestro 2006-02-07 18:59:14 UTC
When installing NetBeans 5.0, I select JDK 1.5 as the platform on which to run 
the IDE. However, I need to develop against JDK 1.4. I've defined JDK 1.4 in 
the Java Platform Manager, but I need the ability to select JDK 1.4 as the 
default platform for new projects. Currently, the only way to do this is to 
run the IDE on JDK 1.4, but I see no reason why the default platform for new 
projects has to be the same platform that the IDE uses for its execution.
Comment 1 Milan Kubec 2006-02-08 08:02:30 UTC
Do you have some particular reason for using Default platform? Setting platform
in project properties is not working for you? I mean Project Properties - node
Libraries and then selecting the desired platform in the combobox.
Comment 2 rptmaestro 2006-02-08 18:09:03 UTC
Because my team installs NetBeans to execute on JDK 1.5 (to leverage 
performance improvements), NetBeans automatically assigns that as the default 
platform for new projects. That's fine, but if my team needs new projects to 
use JDK 1.4, they have to go into each project and manually change it from 
using JDK 1.5 to 1.4.

While this is a simple enough process for a single project, it is tedious when 
importing existing code from dozens of existing projects into the IDE. 
Furthermore, it is easy for a developer to forget that the IDE defaults to 
using JDK 1.5 until he deploys the code and discovers that the class files are 
incompatible with the JVM on the target system.

The developer should be able to tell the IDE which of the installed platforms 
he wants to use as the default for new projects. It is counter-intuitive for 
the IDE to *assume* that the JDK used by the IDE be the fixed default.
Comment 3 windli 2007-07-13 00:27:05 UTC
My case I run netbeans with jdk 1.6 but I use jdk 1.5 to build all my projects.
Comment 4 Tomas Zezula 2007-07-13 07:55:39 UTC
OK, makes sense, the similar approach is even used for netbeans api support (nbjdk).
Comment 5 athompson 2008-08-09 14:40:24 UTC
this is a really big problem, because you can't change the platform for Maven projects.  setting to 'defect' for that
reason.
Comment 6 athompson 2008-08-09 14:41:12 UTC
*** Issue 89304 has been marked as a duplicate of this issue. ***
Comment 7 Milos Kleint 2008-08-11 09:19:45 UTC
athompson: the embedded maven builds run within the same JVM as the IDE, therefore the changes in default java platform
are unlikely to take any effects on the maven builds. See #104974

I've started an initiative within maven itself to resolve the issue, see http://docs.codehaus.org/display/MAVEN/Toolchains
Comment 8 Tomas Zezula 2008-08-11 13:11:02 UTC
Still I think this is rather enhancement.
The "default platform" is a bit more than just a platform used when new project is created. The default platform is a platform the IDE runs on, so it's never 
broken, it doesn't need to fork ant tasks, so the build script is simpler (you can compare build-impl.xml for default and non default platform).
What I can add is a option for platform being used when creating a new project but the project type has to use this option.
Not for frozen 6.5