How to store images within the application?

Asked

Viewed 51 times

0

I’m starting now in Java and need to finish an application that by clicking on a button show an image, I even managed to do this using the method

Desktop.getDesktop(). open(new File() but I needed this program to work on any computer, would it be possible to put the image inside the application itself or something? Thank you

  • 1

    If the user of your application has the option to register images, save the path where it is, and then when viewing, look for the path you saved.

  • Could you show us what you have already done to capture and/or take the image path? This makes it easier for us to help! We will know which way to go! Obligatory

  • I’m doing this http://imgur.com/Lu2RFPP

1 answer

0

You can place the image in a folder and then when generating the jar generate with the folder as well

  • 2

    but then I put which way in the code? the way where the folder is on my computer?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.