images in a jar

When simply packaging a one class application

e.g

jar cmf manifest.mf run.jar myPackage

manifest.mf:

Manifest-Version: 1.0

Main-Class: myPackage.MyClass

If the class used images, how do u add the images to the jar?

currently the jar needs to be in the same folder as the images 4 them to work

[341 byte] By [schmeagola] at [2007-11-27 3:57:19]
# 1
To put the images in the jar just specify their file namesjar cmf manifest.mf run.jar myPackage images/*.jpg But to utilize those images you will need to modify your code to use URLs instead of Files. Something likeUrl image = getClass().getResource("image/pict1.jpg");
atmguya at 2007-7-12 9:01:38 > top of Java-index,Desktop,Deploying...