Do you put resources in or out of the .jar?

I do it outside of the jar, since it is easier to access the files, and you don’t need to troubleshoot with streams.

What do you do?

EDIT:
And why?

I always put my resources in the jar (unless they are of a really large size).

I put my resources inside the jar, unless there’s modding. In which case I do both.

I put mine inside just so the user has less to worry about when trying to start the game. If you have a folder your game relies on, what happens if a user thinks its ok to delete it or move it to a different directory? Sure, I guess you could put it in a secret directory people have never heard of so they can’t mess with it, but I still like containing my resources I guess. Looks much nicer to me!

it depends on how you access it, if you access a static link to a directory stored on the persons computer then it should be outside and needs to be referenced directly , if it is inside the jar then it can b referenced without setting a directory outside the jar

I try to do it depending on the skill/knowledge of the potential user and on how much chance there is that I’d need to change the resources on the fly, or whether the users should be able to.

That said, I think that the ‘inside’ works best for any case where you’re planning on writing an installation system or something like that. The less that the user has to do themselves the better. So an installer (Point it at a directory) or a .jar with everything in it seems best. If your expecting your Use to understand the jargon and the like? Well detailed instructions with an outside resource might work as well. Hah.

If I want resources to be edited even after building the application, I put them outside. If resources are constant, I put them in the jar file.

As @UprightPath says, its probably best to think of the user’s experience when making this decision. The choice for including resources inside a jar or not then depends on how you plan to distribute & deploy your game:

  • Download & run a .jar file: include resources inside the jar, as this makes it easier to move the game to another location
  • Download an installer that installs the game in some directory and makes links to the start menu: doesnt really matter as the file location will not change
  • Download an installer that automatically updates then game (e.g. minecraft style): better keep resources seperate, as otherwise you will have to download all resouces (even ones that have not changed) every single update, wasting bandwidth

Both! Well, for my latest project anyway.

I plan to add a “Run external mode” setting in my game’s config default to false. When flagged to true the resources will unpack out of the .jar, that way people who want to edit files can, or just for those people who want the microscopic performance boost. But, it still leaves the jar in it’s default state as mobile as possible.

My end-goal is to make the game “Thumb drive compatible”, AKA: Storing all the settings/resources/save files encapsulated in whatever folder the user puts the jar in. That way the game can be played “anywhere” easily. (AKA: On school and work computers, muwhahaha)