Skip to main content



      Home
Home » Newcomers » Newcomers » Adding images to JAR files
Adding images to JAR files [message #493590] Tue, 27 October 2009 01:40 Go to next message
Eclipse UserFriend
My applet has images which are in the bin/images directory. I'm creating a JAR file by exporting the project. I've tried all combinations of checking the 'Export all output folders of checked projects' vs 'Export generated class files and resources' and 'Add directory entries'. Under none of the combinations do the image files actually wind up in the JAR file (using jar tf ... to search the contents).

1) Is there an appropriate way to associate the image files with the project so they become 'known resources' of the project, and

2) How do I get the images to actually be included in the JAR. Ideally, they would also still be in an 'images' directory in the JAR.

Thanks!
Re: Adding images to JAR files [message #493614 is a reply to message #493590] Tue, 27 October 2009 05:08 Go to previous messageGo to next message
Eclipse UserFriend
Dave Johannsen wrote:
> My applet has images which are in the bin/images directory. I'm
> creating a JAR file by exporting the project. I've tried all
> combinations of checking the 'Export all output folders of checked
> projects'
This works fine for me using File > Export... > JAR file in R3.5: with
'bin' as output folder I get /images/<my images> in the JAR.

Dani
> vs 'Export generated class files and resources' and 'Add directory
> entries'. Under none of the combinations do the image files actually
> wind up in the JAR file (using jar tf ... to search the contents).
>
> 1) Is there an appropriate way to associate the image files with the
> project so they become 'known resources' of the project, and
>
> 2) How do I get the images to actually be included in the JAR.
> Ideally, they would also still be in an 'images' directory in the JAR.
>
> Thanks!
Re: Adding images to JAR files [message #493669 is a reply to message #493590] Tue, 27 October 2009 10:20 Go to previous message
Eclipse UserFriend
Thanks Dani, that fixed it! (I also had to solve the problem of the resource being out of sync, but other posts in the forum helped with that).
Previous Topic:Formatting - Programatically setting style properties
Next Topic:importing a jar file (library) as java project
Goto Forum:
  


Current Time: Tue Nov 04 03:38:19 EST 2025

Powered by FUDForum. Page generated in 0.08443 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top