开发者

how to use java jar in c/c++?

开发者 https://www.devze.com 2022-12-12 16:31 出处:网络
i am a new developer of java swing. i want to pack the GUI program. With the help of neatbeans, i get a file of java jar. But i want to convert the jar to exe file, although i know exe4j, but i need t

i am a new developer of java swing. i want to pack the GUI program. With the help of neatbeans, i get a file of java jar. But i want to convert the jar to exe file, although i know exe4j, but i need the exe file include the jar and o开发者_StackOverflow中文版ther files. Maybe using jar in c/c++ is a solution ?


Are those "other files" just data used by the Java app? If so then you can just include them in the JAR. If you have other executables written in some non-Java language then you might need some other sort of packaging solution.

A JAR file is basically the same as a ZIP file. You can see inside it and edit it easily by renaming its extension to .ZIP and opening it with any program that deals with ZIP files (e.g. 7-zip, or the basic filesystem window on most modern OSes). There are JAR-specific tools but I prefer to just use standard ZIP tools. (Change the extension back to .JAR when you're done, of course.)

The JAR is just a compressed form of the directory structure that you need to run your Java app, plus a Manifest file to give information about what's inside.

0

精彩评论

暂无评论...
验证码 换一张
取 消