Hello, I am new to live code and I was wondering if anyone knew any way to edit a .jar file (specifically the minecraft.jar, which is the file within the source-code for the game Minecraft that controls everything that is in any way important).
If you can help with this I would be very appreciative!
Thank You!
Can you edit a jar file with live code?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Can you edit a jar file with live code?
Hi Nano,
1. welcome to the forum!
2. Not out of the box!
You may be able to write a parser for these JAR files in Livecode,
but that will be a lot of work.
Best
Klaus
1. welcome to the forum!

2. Not out of the box!
You may be able to write a parser for these JAR files in Livecode,
but that will be a lot of work.
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 328
- Joined: Mon Dec 05, 2011 5:34 pm
- Contact:
Re: Can you edit a jar file with live code?
In theory you could actually modify a jar file with the LC ZIP functions. A Jar file (such as mine craft.jar) is just a zip/rar (not sure which) file with a different extension.
You could therefore open it with LC, do stuff and save it (close it) as long as you can do so without losing the .jar extension on the way. You could rename the file temporarily if needed.
Look in the dictionary for: revZipOpenArchive, revZipAddUncompressedItemWithFile, revZipDeleteItem and revZipCloseArchive. There are more than these, but you should check these first.
LC cannot modify the compiled Java files inside though - that is not something you can do unless you have the actual sources.
But, while testing, DEFINITELY make a BACKUP. Don't even play with the jar without one. If it breaks then it's not likely you can glue it together again.
With the minecraft.jar you are probably wanting to delete and replace files inside it (for modding) and then remove the META.INF file too
As you can probably guess, I'm also a MC player 
Let us know how it works if you get anywhere.
Cheers,
Dave
You could therefore open it with LC, do stuff and save it (close it) as long as you can do so without losing the .jar extension on the way. You could rename the file temporarily if needed.
Look in the dictionary for: revZipOpenArchive, revZipAddUncompressedItemWithFile, revZipDeleteItem and revZipCloseArchive. There are more than these, but you should check these first.
LC cannot modify the compiled Java files inside though - that is not something you can do unless you have the actual sources.
But, while testing, DEFINITELY make a BACKUP. Don't even play with the jar without one. If it breaks then it's not likely you can glue it together again.
With the minecraft.jar you are probably wanting to delete and replace files inside it (for modding) and then remove the META.INF file too


Let us know how it works if you get anywhere.
Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.
Visit http://electronic-apps.info for released App information.