JDK settings per module?

Hi there,

What't the reason behind this? I would expect all the modules in a project
to be compiled/run for the same jdk version...
Am I missing something?

Thx,
Andrei


10 comments
Comment actions Permalink

We make use of this.

We've got a single project that most things use 1.4.2, but has sub module (mainly applets) that use 1.1, 1.2, or 1.4 as needed.

rob.

0
Comment actions Permalink

And do you have any dependencies between modules or you just grouped them
together in a project for convenience?

I'm trying to figure out how things are supposed to work, and I'm not sure I
grasp the whole concept. If I have dependencies between modules, what jdk is
used when running code from one module that depends on code from another one
(presuming the latter is compiled for a different jdk). I guess I could end
up with code that could not be executed this way.

I'd expect to be notified, at least, if I import a module in a project (and
include it in a dependency relationship), and that module had an
incompatible jdk set (say I used it in another project with a newer jdk).
And I'd expect to be able to "force" a jdk from a module, based on the
dependencies.

I'm still not sure I get the whole picture. Any help would be greatly
appreciated.

Thx,
Andrei

"Robert Hedin" <robhedin@hotmail.com> wrote in message
news:23893132.1073427221252.JavaMail.itn@is.intellij.net...

We make use of this.

>

We've got a single project that most things use 1.4.2, but has sub module

(mainly applets) that use 1.1, 1.2, or 1.4 as needed.
>

rob.

>


0
Comment actions Permalink

The majority of projects we're using use a common JDK for all modules, however the case I was mentioning before does break it down. A large portion of this is just to make it easier on us-- since all of the applets go into the WAR, and since we must support JDK 1.1, 1.2+ for applets, but the web app itself runs under 1.4, we can do a single build in a single place to make everything happen as opposed to completely seperate projects that have to be opened and closed individually (and built in the correct order). Actually, that is very close to what we had to do in IDEA 3.0.

However, we do have some interdependencies; the HTML being sent down is common, regardless of client side JDK, the only difference is in applet selection. Because of this many things are common, such as constants (like element names), as well as basic utility and helper classes. The common code is in one module and compiled with 1.1, each applet is in its own module and has a dependency on the common module, and the server module also makes use of some of the common code.

Basically, makes it very easy for us to maintain things by minimizing where changes have to occur.

rob.

0
Comment actions Permalink

What't the reason behind this? I would expect all the modules in a project
to be compiled/run for the same jdk version...


At least it should be possible to easily change this setting for all
modules. We have nearly 30 modules here, so changing every option for
testing with another JDK is a real pain.

0
Comment actions Permalink

We'll add a Project JDK. All modules will use it by default. Still you'll be able to override it by choosing an arbitrary JDK for
particular module.

--

Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"


"Andrei Oprea" <andrei_oprea@hotmail.com> wrote in message news:btf6ij$gld$1@is.intellij.net...

Hi there,

>

What't the reason behind this? I would expect all the modules in a project
to be compiled/run for the same jdk version...
Am I missing something?

>

Thx,
Andrei

>
>


0
Comment actions Permalink

That's great news. Thanks.

Andrei

"Eugene Zhuravlev (JetBrains)" <jeka@intellij.com> wrote in message
news:btk8ge$rc$1@is.intellij.net...

We'll add a Project JDK. All modules will use it by default. Still you'll

be able to override it by choosing an arbitrary JDK for

particular module.

>

--

>

Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>

"Andrei Oprea" <andrei_oprea@hotmail.com> wrote in message

news:btf6ij$gld$1@is.intellij.net...

Hi there,

>

What't the reason behind this? I would expect all the modules in a

project

to be compiled/run for the same jdk version...
Am I missing something?

>

Thx,
Andrei

>
>

>
>


0
Comment actions Permalink

Cool. Will it be for IDEA 4.0 or later?

--
Lars Köhler

0
Comment actions Permalink

Sure for IDEA 4.0 :)


"Lars Köhler" <nomail@nodomain.com> wrote in message news:btm1in$vp7$1@is.intellij.net...

Cool. Will it be for IDEA 4.0 or later?

>

--
Lars Köhler



0
Comment actions Permalink

That'd be wonderful! If a module picks a custom jdk it should also be possible to 'revert' to the project default too.

0
Comment actions Permalink

Sure for IDEA 4.0 :)


Even more cool :D

0

Please sign in to leave a comment.