Skip to Main Content

New to Java

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!

Integrating a .jpg file in a .class file, possible ? (new to java)

843785Jul 11 2008 — edited Jul 13 2008
Hello,

I am trying to think about integrating all the icons that I need (at the moment differten .gif files) into one big .class file.
Is it possible to do it like that:

===========================================
Icons.class

binary Testvariable = "--- binary code ---";
===========================================

and later on to import this .class File that I can use it like that:

===========================================
test.class

ImageIcon TestintegratedIcon = createImageIcon(Testvariable);

...

Is that possible ?

My Problem: I want to protect the images in my .jar file from outside access and other people who could easily change the design of several buttons that
I use. So I need to integrate the icons in a file like described above.

I am very thankful for your help!

Best Regards, Kai, Germany
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2008
Added on Jul 11 2008
21 comments
195 views