Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Image Storage help

929985Apr 11 2012 — edited Apr 11 2012
Hi,

I am creating a text based java adventure using a java swing client that shows images at certain events during the game. Is there a way of storing the image in a way that when transferring the game from one laptop to another, you do not need to change the path to the image within the code.

eg.
C:\\Users\\user1\\Desktop\\New folder\\OOProj\\images\\sherlock.jpg

i want to move it to
C:\\Users\\user2\\OOProj\\images\\sherlock.jpg



this is the path to the image in my game. can the image file itself maybe be stored within a jar file so that you will always reference it in the game.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2012
Added on Apr 11 2012
3 comments
147 views