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

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -