Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28826
| Path | csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Jeff Higgins <jeff@invalid.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: is that possible to include a small PNG file as part of Java class? |
| Date | Mon, 23 Jun 2014 15:04:59 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 44 |
| Message-ID | <lo9u3i$cmr$1@dont-email.me> (permalink) |
| References | <dd7b4b53-4f46-4b80-9cdb-a6eebac84693@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Mon, 23 Jun 2014 19:10:42 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="b896cb427f8c4d19d14880347aa9d6ce"; logging-data="13019"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0fTXfWVbRi6xGCCXkJokNCV6MKvIJkAQ=" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0 |
| In-Reply-To | <dd7b4b53-4f46-4b80-9cdb-a6eebac84693@googlegroups.com> |
| Cancel-Lock | sha1:AdlNigXuHJELq9ebJeUk7re337E= |
| Xref | csiph.com comp.lang.java.programmer:28826 |
Show key headers only | View raw
On 06/23/2014 12:02 PM, www wrote:
> Hi:
>
> I have a simple Java class: Abc.java. The method within it needs to access a small PNG file(it's an icon picture). Right now, this picture file("abc.png") is located at nonsrc/icons/abc.png
>
> So this class is a bit pain. Abc.class won't work in the absence of abc.png. When I create an executable JAR, this is pain: always need to remember to include abc.png file inside it.
>
> I am wondering if there is a way that I can "convert" abc.png into some sort of Java code and I can put it in Abc.java. So Abc.class alone can perform the job, without the need of presence of abc.png. Is that possible?
>
> Hope I have explained my intention well.
Here is a string that base64 encodes a 16 x 16 "winged coffee bean" png
image.
Thanks to Canadian Mind Products
<http://mindprod.com/jgloss/duke.html>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACo0lEQVR42mNscOP//5+R8Qs
DIyMjMxMTKwPDP5Yvv/gfOkbnT/ZMLOxnIAAY7y8V+Q9mMDL8Z2L6/+3Xb6FPf1UmpcxvyFnX
uu0mNzMzy1+8BvwH2j852/P227snlJmZGRiYmBgY4mvbC2Y197c2b7nFQ9AFIOL/v3/Mj1aK/
IEJsnAJPrv0IoyFlVcrl/HHRyFNO+fdUiqad3EaAAMTM9zOfXh4Rs/Cw2DfxrknrQX/feViAH
rwxmfhl5XzloabuHgcxGsACNy9dUe+1s/+gLvmUwUFJQYGvz4GhjQ1BgZ+OaXrBWsvmlzetyac
R0Dwna5DwEasBlQlxszhurEk2dYKonlaGAPDh7cMDI/e83z5/Ps/k2923pdjm9dy//79l8U+Iq
cSw4BAPeXrBa53NUCaNxUxMPz6wcCwbhsDg5KB7FM9B9VrOgoPtf9JlHR9+6dwe25t5hQMA9ob
O3Lb6ysnbC7+z3T/IQPDrkMMDGxqtnuqG7XuL+tZnZQQx8C8eOk/hohw0efLlr8RRzHgxbV10Z
vnzpl44vLFz3ev/OD4//s3u4aty7aWmXOyHuxrbzq2/6JdgP0Zw4WL/zEkxDF/XbCIgRXFgPYA
jv8RpZ354krWRz8xKd75/fsnu6yM1CuQ3LcvX7i5eHi+Plwu9H/egn8MifEs/+cv+vsNbMDjSy
tjX56qmyAtLyvw9NHTf2ziYZ26njVNjMysv9C9CEozk3O8bvpan1FesOjPF8bLu3urTu/c2eob
6dI0p7murnLDD0aQSwKKZyRq2iYswJZ4QKn3wTLRfwsX/mZg3F4r9d82Z5cTj7jO/re39jvMLv
fYp+5c2eAWkzmTW0D8JcGkPLfY7X9I6WQNfgn1m4QUYzVg/ZSGunf3jzUm9+5iJMcAAJSpGEl+
q1AjAAAAAElFTkSuQmCC
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
is that possible to include a small PNG file as part of Java class? www <xsli2@yahoo.com> - 2014-06-23 09:02 -0700
Re: is that possible to include a small PNG file as part of Java class? Martin Gregorie <martin@address-in-sig.invalid> - 2014-06-23 16:35 +0000
Re: is that possible to include a small PNG file as part of Java class? Donkey Hottie <donkey@fredriksson.dy.fi> - 2014-06-24 15:54 +0300
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-24 10:07 -0400
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-24 10:49 -0400
Re: is that possible to include a small PNG file as part of Java class? Roedy Green <see_website@mindprod.com.invalid> - 2014-06-25 01:25 -0700
Re: is that possible to include a small PNG file as part of Java class? Marcel Müller <news.5.maazl@spamgourmet.org> - 2014-06-23 18:25 +0200
Re: is that possible to include a small PNG file as part of Java class? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-06-23 13:03 -0400
Re: is that possible to include a small PNG file as part of Java class? Wanja Gayk <brixomatic@yahoo.com> - 2014-06-29 11:14 +0200
Re: is that possible to include a small PNG file as part of Java class? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-06-29 08:15 -0400
Re: is that possible to include a small PNG file as part of Java class? markspace <markspace@nospam.nospam> - 2014-06-23 10:39 -0700
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-23 15:04 -0400
Re: is that possible to include a small PNG file as part of Java class? Roedy Green <see_website@mindprod.com.invalid> - 2014-06-25 01:34 -0700
Re: is that possible to include a small PNG file as part of Java class? Joerg Meier <joergmmeier@arcor.de> - 2014-06-23 21:15 +0200
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-23 15:46 -0400
Re: is that possible to include a small PNG file as part of Java class? Joerg Meier <joergmmeier@arcor.de> - 2014-06-23 22:08 +0200
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-23 16:19 -0400
Re: is that possible to include a small PNG file as part of Java class? Joerg Meier <joergmmeier@arcor.de> - 2014-06-23 22:34 +0200
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-23 16:43 -0400
Re: is that possible to include a small PNG file as part of Java class? Joerg Meier <joergmmeier@arcor.de> - 2014-06-24 00:21 +0200
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-23 21:02 -0400
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-23 21:10 -0400
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-23 21:23 -0400
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-24 16:17 -0400
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-23 16:33 -0400
Re: is that possible to include a small PNG file as part of Java class? Jeff Higgins <jeff@invalid.invalid> - 2014-06-24 16:00 -0400
Re: is that possible to include a small PNG file as part of Java class? Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-06-24 17:17 +0000
Re: is that possible to include a small PNG file as part of Java class? Roedy Green <see_website@mindprod.com.invalid> - 2014-06-24 11:11 -0700
csiph-web