Different Classpaths in Run Configuration

I'm using IDEA 4.5.4.
I have one project with one module.
I have different classes i want to start and every class has it's own
working directory.
My problem is that IDEA does not find property-Files or Resource-Bundles
when they are not in my classpath.
So i put them all in my classpath for my module and it works.
But I have property files and Bundles with the same name in different
working directories and JAVA/IDEA always takes the first one it finds
and not the one from my current working directory.

In eclipse you can simple add directories to the classpath in the "run
dialog". Why isn't that possible in IDEA ?
In IDEA you can only select classpath for modules.
Do i have to create a module for every class i want to run ?


If i could put the working directory (.) in my classpath for my module
everything should be run as i want.
Is this possible ?


mfg
Carsten

3 comments
Comment actions Permalink

if I correctly understand your post, your problem isn't with IDEA or Esclipse, but rather in incorrect handling of resource loading. Please read this article for details: http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html

0
Comment actions Permalink

Dmitry Beransky schrieb:

if I correctly understand your post, your problem isn't with IDEA or Esclipse, but rather in incorrect handling of resource loading. Please read this article for details: http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html


No.
In IDEA you can only select a classpath that belongs to a module in the
run dialog.
I have only one module. So there is only one classpath.
In eclipse you have also one classpath for your project but for every
class you want to run you can define your own classpath by adding
directories or jars to the standard classpath of your project.
So you can have your own classpath for every run Dialog.

In IDEA this is not possible (or i must define a module for every class
i want to run, which is a pain)

Carsten

0
Comment actions Permalink

I guess it depends on the definition of a module - in IDEA it seems to involve a main class and a classpath. If you want more than one classpath used in a project, you need to define a module for each. As long as the appropriate main class is in each module classpath, they can be just skeleton modules (i.e. nothing to build). Then you can select the appropriate classpath and JDK for each run/debug configuration by selecting from the module list in the 'Edit Configurations' dialog.

0

Please sign in to leave a comment.