jar

How to distribute Java Application

荒凉一梦 提交于 2020-12-28 07:50:44
问题 I would like to know about the various options for distributing a Java application. I know that you can Distribute the Source Code and let users compile it themselves, or provide make files, etc.. Package it into a JAR, and have self extracting archives and (I'm sure, myriad other ways) I'm hoping for some explanations about the most common options (and one's I haven't thought of) and in particular, do they require a user to have a JVM, or can it be bundled with one - personally I'm not too

Why does this code displaying an image give an “”error“” when build into jar?

♀尐吖头ヾ 提交于 2020-11-29 09:46:52
问题 I want to display an Image in a JLabel by drawing a BufferedImage on it. The x/yOffset is to draw a smaller image in the middel of the JLabel. If I run the code in my IDE it works fine and displays the image on my JFrame. If I now build the Class into a jar file it does not work anymore. I tried it with setting the Image as an icon for the JLabel without using BufferedImage but thats not what I want to do. Here is the Code of my Image Class: public class ImageHQ extends JLabel { BufferedImage