|-MainClass.class (must to implement the main method, mandatory) |-MANIFEST.MF (Mandatory Main-class: com.MainClass) The problem occurs when you zip back the folder.Ī valid Runnable/Executable JAR has the next structure: myJAR (Main-Directory) You have a few gotchas (like what to do if files already exist and that kind of thing), but otherwise.This regularly occurs when you change the extension on the JAR for ZIP, extract the zip content and make some modifications on files such as changing the MANIFEST.MF file which is a very common case, many times Eclipse doesn't generate the MANIFEST file as we want, or maybe we would like to modify the CLASS-PATH or the MAIN-CLASS values of it. As long as I get the results I was looking for, it would be great. Thanks!ĮDIT: If you know a way to get the same results, and it's not the way that I was looking for, please let me know how to do so. Help would be appreciated, ranting about anything I did wrong would get me mad. I do know what the imports needed are, but that's about it. JProgressBar bar = new JProgressBar(0, 100) Īs you can see, I have no idea what I'm doing. SetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) This is all I have so far import java.io.* I'm doing this because I want a really easy way to install mods for that game, minecraft, where you can just select your minecraft.jar, and make sure the files for the mod are in a folder, and wait a bit, as indicated by a JProgressBar. jar file, and then take all that and package it back up again. Then, take all the files from another directory, add it to the directory with the extracted. jar file, selected with a JFileChooser, extract it and put it into a new directory. I was wondering whether there is a way to take a given.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |