Java Jar For Mac
How to Check Java Version on a Mac. This wikiHow will teach you how to check what version of Java you have installed on your Mac by checking the System Preferences, using the Java website, or by using your Mac's Terminal.
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; sv-se) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5) There are really three phases: extraction, modification and assembling it back together. Extracting is easy: right click and click unarchieve (afaik). Modification: if it's the manifest (whick class to run and so forth) then it's easy, however the java files are compiled into.class files and will need disassembling before modification.
To piece everything together google the 'jar' command for the terminal. If it's FOSS it's better and easier to compile from source; if not then I don't think it's 100% legit.
I need to change a line in a.js file contained in the.jar file. But your reply clarifies my question: I made this change many, many times under Windows (namely every time I downloaded an upgrade, which, of course, wiped out my previous change). The person who recommended the change also recommended an (un)archiver called IZArc, in which the whole process could be done from inside IZArc -- open (unarchive) the.jar file, find the.js file, edit the line. And then clicking Quit would return everything to its archived state.
I understand that I can unarchive the.jar with any unarchiver and edit the.js with any text editor. I guess my worry is that, not being a programmer, I might do something harmful in re-archiving -- not archive all the relevant files, or archive too many files, or something. So my question is: Is there an archiver (hopefully in the OS) which will do all the above from within itself, so that I know that the final.jar contains exactly the files that it should contain? Or, failing that, what do I need to do to make sure that I have re-archived it properly? I realize that in this forum this is a complete newbie question.
PilotError's method was straightforward and successful -- no software errors, newbie errors, or even pilot errors. But it still had more steps than I used to need in Windows: switching from Terminal after unarchiving, to the desktop to use an editor (my fault, admittedly, for not knowing the unix editor(s) which I assume Terminal has access to), then back to Terminal to rearchive -- plus the more keystrokes needed for the unix commands. I'd still like to find an editor which does it *all* inside one program, like IZArc did in Windows: ctrl-open, edit, ctrl-close -- zip-zip (pun intended)! PilotError's method was straightforward and successful -- no software errors, newbie errors, or even pilot errors. But it still had more steps than I used to need in Windows: switching from Terminal after unarchiving, to the desktop to use an editor (my fault, admittedly, for not knowing the unix editor(s) which I assume Terminal has access to), then back to Terminal to rearchive -- plus the more keystrokes needed for the unix commands. I'd still like to find an editor which does it *all* inside one program, like IZArc did in Windows: ctrl-open, edit, ctrl-close -- zip-zip (pun intended)! Code: jar -xvf jarfile.jar ## Extracts the files open -e path/to/fileYouWantToEdit.itsExtension jar -cvf jarfile.jar ## Create the new Jar file You should obviously change the jarfile.jar to the actual jar file you have.
I've shown ## because those are the actual comment character for bash. I've also shown an 'open -e' command with a pathname you will have to substitute. Bootable windows 7 usb for mac.
The open -e will open the named file in TextEdit.app. If you have another editor you prefer instead, you can tell 'open' to use it instead. Here's the man page for the 'open' command: Look at the -a and -b options in particular. Finally, you can put other commands in there, such as a 'cd someDir' or whatever else you want. You could probably write a 'sed' script to do the replacement, so you wouldn't have to manually edit the file at all. Then you could make the whole thing into a shell script, wrap that into an AppleScript and save it as a droplet.