Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] problem with getClass().getResource(...)

Does the test work as expected from PDE or any other OSGi-aware dev tool?

--
Regards,
Igor

On 12-05-09 4:49 PM, Matthew O'Connor wrote:
Hello,

getClass().getResource("/resource/file") fails when running `mvn
integration-test`. This appears to be related to running in an OSGi
container. Attached is a sample project.

The exception thrown is:

java.lang.NullPointerException
at tycho.demo.itp01.tests.ITP01Test.sampleAction(ITP01Test.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Is there an accepted way to load a file from a classpath resource in
Tycho tests?

Thanks,
Matt


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top