Zeeshan Ahmed
Zeeshan Ahmed

Reputation: 20

How to Hide / Protect Media Folder in Java Project?

I am a beginner Java developer and I have created an application in Java (Netbeans).

I have used buttons icons, backgrouds for jframes etc. When I built the project, they can easily accessible using WinRAR. Anyone can extract my jar file and see all the images that I have used in my program. Even the images used in jpanel that is not accessible without password.

How can I hide or protect these images?

I have created a .exe file also using Launch4j but still facing same problem. When I right click on the .exe file, its easy to extract my whole program.

Upvotes: 0

Views: 473

Answers (1)

Derrops
Derrops

Reputation: 8127

To be honest, if someone wants your picture, they are going to be able to get it. One can simply do a print screen. However you can still do somethings.

  1. Remove the extensions for the picture files and give them crazy names - this will make it harder for people to find your pictures
  2. Encript the files then have the application decript them when loading - I don't know how to do this but shouldn't be too hard to find, for instance you could save the pictures as a byte stream with some alterations then reload it.
  3. Save the picture in some archive which only your application knows how to read.

But anyway even with all these things, I still know how one could get a handle to an open JFrame, look through the components, and then could get your picture. IMHO trying to prevent people for getting your pictures is not worth doing.

Upvotes: 1

Related Questions