public static synchronized File getJarResources ( ) { if ( ! loader . isPresent ( ) ) { throw new LionEngineException ( JAR_LOADER_ERROR ) ; } final Media media = Medias . create ( Constant . EMPTY_STRING ) ; final String path = media . getFile ( ) . getPath ( ) . replace ( File . separator , Constant . SLASH ) ; final String prefix = loader . get ( ) . getPackage ( ) . getName ( ) . replace ( Constant . DOT , Constant . SLASH ) ; final int jarSeparatorIndex = path . indexOf ( prefix ) ; final String jar = path . substring ( 0 , jarSeparatorIndex ) ; return new File ( jar ) ; }
Get the running JAR resources . Load from JAR must be enabled .