abhiCR7 / reflections

Automatically exported from code.google.com/p/reflections
Do What The F*ck You Want To Public License
0 stars 0 forks source link

Windows - jar files wrapped into exe - could not create Dir using jarFile from url #168

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make static block in which you scan for class sub types
2. Use maven-shade-plugin and launch4j-maven-plugin to wrap java jar files into 
executable launcher.exe
3. Start the launcher.exe under Windows and check the error

What is the expected output? 

Finding all sub types of a class without any errors.

What do you see instead?

WARN  org.reflections.Reflections - could not create Dir using jarFile from url 
file:/C:/Users/win/Development/test/my-module-1-1.2-SNAPSHOT.jar. skipping.
java.lang.NullPointerException: null
    at java.util.zip.ZipFile.<init>(Unknown Source) ~[na:1.7.0_45]
    at java.util.zip.ZipFile.<init>(Unknown Source) ~[na:1.7.0_45]
    at java.util.jar.JarFile.<init>(Unknown Source) ~[na:1.7.0_45]
    at java.util.jar.JarFile.<init>(Unknown Source) ~[na:1.7.0_45]
    at org.reflections.vfs.Vfs$DefaultUrlTypes$1.createDir(Vfs.java:207) ~[launcher.exe:na]
    at org.reflections.vfs.Vfs.fromURL(Vfs.java:99) [launcher.exe:na]
    at org.reflections.vfs.Vfs.fromURL(Vfs.java:91) [launcher.exe:na]
    at org.reflections.Reflections.scan(Reflections.java:231) [launcher.exe:na]
    at org.reflections.Reflections.scan(Reflections.java:204) [launcher.exe:na]
    at org.reflections.Reflections.<init>(Reflections.java:129) [launcher.exe:na]
.........

What version of the product are you using? On what operating system?
0.9.8 and 0.9.9-RC1 (i tried an older ones as well)

Please provide any additional information below.

If i start the shaded jar file from the command line, it is working correctly 
under windows, but if it is from exe file it is not.

Original issue reported on code.google.com by Dimitar....@cayetanogaming.com on 3 Feb 2014 at 2:39