Module JDK selection and project language level

I was wondering why these two options are separate? It seems to me that
the selection of a particular JDK would dictate the language level.
What's the point of selecting a Sun 1.5 JDK and then targetting 1.3 or
1.4 language level? Selecting a 1.3 JDK and then targetting 1.4 or 1.5
language level just won't work.

The language level option should be a configuration option of each JDK,
and should be guessed by IDEA when adding a new JDK, like it guess the
JDK version.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://www.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

2 comments

I think it wouldn't make sense to tie it to JDK. There are probably many
installations of IDEA which contain two projects such that:
- Project 1 runs on JDK1.4, but with RetroWeaver, so Java5 source can be used
- Project 2 runs on JDK1.4, but is not weaved, so Java1.4 source must be used

Also, I imagine there are projects which run on JDK5 and use JDK5 API's, but
have many variables called "enum," so migration to Java5 language is not
possible yet.

An issue exists "module-level language level setting" at
http://jetbrains.net/jira/browse/IDEADEV-2450

Gordon Tyler wrote:

I was wondering why these two options are separate? It seems to me that
the selection of a particular JDK would dictate the language level.
What's the point of selecting a Sun 1.5 JDK and then targetting 1.3 or
1.4 language level? Selecting a 1.3 JDK and then targetting 1.4 or 1.5
language level just won't work.

The language level option should be a configuration option of each JDK,
and should be guessed by IDEA when adding a new JDK, like it guess the
JDK version.

Ciao,
Gordon

0

We had a case where we were going to be running on JDK 5, but were not
allowed to use any of the features. This proved invaluable. However,
the language level should default to the JDK version, not 1.3. Then
allow the developer to downgrade if they need to.

Gordon Tyler wrote:

I was wondering why these two options are separate? It seems to me
that the selection of a particular JDK would dictate the language
level. What's the point of selecting a Sun 1.5 JDK and then targetting
1.3 or 1.4 language level? Selecting a 1.3 JDK and then targetting 1.4
or 1.5 language level just won't work.

>

The language level option should be a configuration option of each
JDK, and should be guessed by IDEA when adding a new JDK, like it
guess the JDK version.

>

Ciao,
Gordon

>

0

Please sign in to leave a comment.