java - How to leave resources in the jar file to not need external folders? -


i finishing first game in java, called spacewar. build project requires resources folder (where put sprites etc ...) in same place jar file. wanted know way let images inside jar file, because better because prevents user deleting accidentally.

place images part of java packages . example, com.project.images

and may need use following in code :

getclass().getresource("com/project/images/picture.bmp")); 

to access images.

then images part of jar.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -