简体   繁体   English

如何在Java Project中隐藏/保护媒体文件夹?

[英]How to Hide / Protect Media Folder in Java Project?

I am a beginner Java developer and I have created an application in Java (Netbeans). 我是Java初学者,并且已经用Java(Netbeans)创建了一个应用程序。

I have used buttons icons, backgrouds for jframes etc. When I built the project, they can easily accessible using WinRAR. 我使用了按钮图标,jframe的背景等。构建项目时,可以使用WinRAR轻松访问它们。 Anyone can extract my jar file and see all the images that I have used in my program. 任何人都可以解压缩我的jar文件,并查看我在程序中使用过的所有图像。 Even the images used in jpanel that is not accessible without password. 即使没有密码也无法访问jpanel中使用的图像。

How can I hide or protect these images? 如何隐藏或保护这些图像?

I have created a .exe file also using Launch4j but still facing same problem. 我也使用Launch4j创建了一个.exe文件,但仍然遇到相同的问题。 When I right click on the .exe file, its easy to extract my whole program. 当我右键单击.exe文件时,它很容易提取我的整个程序。

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. 但是无论如何,尽管如此,我仍然知道如何获得打开的JFrame的句柄,查看组件,然后获得图片。 IMHO trying to prevent people for getting your pictures is not worth doing. 恕我直言,试图阻止人们获取您的照片是不值得的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM