poidasmith / winrun4j

WinRun4J Java Application Launcher
http://winrun4j.sourceforge.net
212 stars 63 forks source link

java.class.path property empty with embedded jar #90

Open bdw429s opened 5 years ago

bdw429s commented 5 years ago

When embedding the jar into the exe with RCEdit.exe, Java behaves differently. Firstly, this

System.getProperty( "java.class.path" )

returns an empty string. Additionally,

Thread.currentThread().getContextClassLoader().getResourceAsStream("foo.gif")

returns null. Also code like this:

LoaderCLIMain.class.getProtectionDomain().getCodeSource().getLocation().getPath() ).getParentFile()

also returns null.

I assume these are all related, but it is really screwing up my console app which needs to detect what directory it's running out of.