how to use java jar in c/c++?
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.
精彩评论