views:

44

answers:

1

I created runner.bat to launch one java test it contains : path to java,classpath org.junit.runner.JUnitCore package.class when I launch it :

FAILURES Tests run: 1, Failures: 1

Exception in thread "Thread-0" java.lang.IllegalStateException: Shutdown in progress
        at java.lang.ApplicationShutdownHooks.add(Unknown Source)
        at java.lang.Runtime.addShutdownHook(Unknown Source)
        at com.sun.imageio.stream.StreamCloser$2.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.imageio.stream.StreamCloser.addToQueue(Unknown Source)
        at javax.imageio.stream.FileCacheImageInputStream.<init>(Unknown Source)
        at com.sun.imageio.spi.InputStreamImageInputStreamSpi.createInputStreamInstance(Unknown Source)
        at javax.imageio.ImageIO.createImageInputStream(Unknown Source)
        at javax.imageio.ImageIO.read(Unknown Source)
        at com.polyspace.util.guicomponent.CompositePanel.setBufferedImage(Unknown Source)
        at com.polyspace.util.guicomponent.CompositePanel.<init>(Unknown Source)
A: 

Runtime.addShutdownHooks() will throw an IllegalStateException if the JVM is already shutting down when the method is called.

Could something be causing your test to end before the construction of your CompositePanel has completed? (e.g. something running in a separate thread.)

Richard Miskin
how to launch the same test from Linux?a shell, perl script ?
Is there something platform specific in your Java code that is stopping it running on Windows? If that's the problem you might want to update your question.If all you need to do is call Java then a shell script with the same basic commands as you used on Windows would do it.
Richard Miskin