jar to zip and back to jar

Hello How do I open and close a .Jar file? I tried opening it with 7zip and using an online site to copy the zip file back into the jar, but after that it stopped working. I wanted to look at the files just out of interest ๐Ÿ™‚
8 Replies
majo24
majo24โ€ข8mo ago
You can find the source code here: https://gitlab.com/jeseibel/distant-horizons
GitLab
James Seibel / Distant Horizons ยท GitLab
This is a mod that adds a Level Of Detail (LOD) system to Minecraft. This implementation renders simplified chunks outside of the normal render distance allowing for an...
majo24
majo24โ€ข8mo ago
It doesn't work like that. What you are trying is to decompress it, but the file was compiled from the source code into the byte code it is
Knusper1337
Knusper1337OPโ€ข8mo ago
Is there a program for this? I want to test something ๐Ÿ™‚
majo24
majo24โ€ข8mo ago
for what? for compiling?
Knusper1337
Knusper1337OPโ€ข8mo ago
from jar to zip (or similar) and back to jar again. or can i edit jar directly with a program?
majo24
majo24โ€ข8mo ago
There are some programms, but I'm not sure if and how they work. They are called Java decompilers. You would need to compile it, to make it into a .jar file again. But I really wouldn't recommend that, you can use the link above to get to the source code, which is like the zip you want
Yeshi
Yeshiโ€ข8mo ago
i believe you can just rename the file from .jar to .zip jar files are just glorified zip files
Knusper1337
Knusper1337OPโ€ข8mo ago
right click, open with WinRar and I can view the jar file like an open zip, swap files and it remains a jar The renaming thing was a good idea, but it didn't work for me, but I found out how to do it during testing. case solved, thank you very much
Want results from more Discord servers?
Add your server