json - Java Application not working after Packaging into jar file -


i had java app working intellij idea not working after packaging jar file

what possible causes ? , how can find mistake ?

the app gradle project (libgdx) , packaged command line gradlew desktop:dist

it give me this

exception in thread "lwjgl application" com.badlogic.gdx.utils.gdxrun timeexception: error reading file: json\levels.json <absolute> @ com.badlogic.gdx.files.filehandle.read<filehandle.java:144> 

after packaging application jar file, json file part of jar? have change way of accessing file. can't access file through absolute file path, instead should use

inputstream in = classloader.getsystemresourceasstream("path/to/file/in/jar") 

Comments

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

javascript - Why Selenium can't find an element that is graphically visible -

qt - Microsoft FTP Service 451 The parameter is incorrect -