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
Post a Comment