Eclipse Environment variables

86 views
Skip to first unread message

Steve Christou

unread,
Nov 16, 2011, 5:28:17 PM11/16/11
to infinitest-dev
Is there a way we can set environment variables if it depends on an
environment variable to run?

David Gageot

unread,
Nov 17, 2011, 1:39:24 AM11/17/11
to infinit...@googlegroups.com
Hi Steve.

If you mean settings system properties, take a look at http://infinitest.github.com/user_guide.html, "Setting JVM Options" section.

David.

Steve Christou

unread,
Nov 18, 2011, 2:35:04 PM11/18/11
to infinitest-dev
I set up an environment variable called PMD_SCAN_SRC which this
program will use PMD to scan. This is the only system property that is
in the infinitest.args file.

java.lang.NoClassDefFoundError: PMD_SCAN_SRC=C:\pmd-test\src\java
Caused by: java.lang.ClassNotFoundException: PMD_SCAN_SRC=C:\pmd-test
\src\java
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: PMD_SCAN_SRC=C:\pmd-test\src\java.
Program will exit.
Exception in thread "main"

On Nov 17, 12:39 am, David Gageot <dgag...@gmail.com> wrote:
> Hi Steve.
>

> If you mean settings system properties, take a look athttp://infinitest.github.com/user_guide.html, "Setting JVM Options" section.
>
> David.

David Gageot

unread,
Nov 19, 2011, 3:37:08 PM11/19/11
to infinit...@googlegroups.com
Have you tried this syntax :

-DPMD_SCAN_SRC=...


David.

Steve Christou

unread,
Nov 21, 2011, 5:22:50 PM11/21/11
to infinitest-dev
That didn't work. :(

On Nov 19, 2:37 pm, David Gageot <dgag...@gmail.com> wrote:
> Have you tried this syntax :
>
> -DPMD_SCAN_SRC=...
>
> David.
>

David Gageot

unread,
Nov 22, 2011, 2:42:38 AM11/22/11
to infinit...@googlegroups.com
I'm afraid that what you want is an Environment variable, not a System property. Only System properties
can be defined through infinitest.args

David.

hervé DARRITCHON

unread,
Jul 23, 2014, 8:56:35 AM7/23/14
to infinit...@googlegroups.com, da...@gageot.net
Hi,

Since Nov 2011, is there a way now to set environment variables with Infinitest ?

I have project where we have a Spring PropertyPlaceholderConfigurer with a parameter :
<value>file:${repertoire.parametrages}config-batch.properties</value>

The variable is set using a JVM variable : -Drepertoire.parametrages=${workspace_loc}/bsc/bsc-parametrages/LOCAL/

Running the project using maven or junit, all the tests run well but with Infinitest I have an error because the variable is not set properly.

I have tried to set the variable in the infinitest.args (ie. -Drepertoire.parametrages=${workspace_loc}/bsc/bsc-parametrages/LOCAL/) with no success.

thanks for answering,

Hervé
> > infinitest.github.com/user_guide.html , "Setting JVM Options" section.
Reply all
Reply to author
Forward
0 new messages