#how to make zip into jar
1 messages · Page 1 of 1 (latest)
<@&987246652869971988> please have a look, thanks.
Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
To convert a ZIP file into a JAR file, you can follow these steps:
-
Make sure you have Java Development Kit (JDK) installed on your system.
-
Rename the ZIP file extension to .jar.
-
Open Command Prompt (CMD) or Terminal.
-
Use the following command to convert the ZIP to JAR:
jar cf yourfilename.jar -C yourzipfile.zip . -
Press Enter and wait for the process to complete.
If you are still facing issues with the conversion, double-check that you have correctly renamed the file extension and that there are no errors in the command syntax. Additionally, ensure that you are running the command in the correct directory where your ZIP file is located. If you continue to encounter problems, feel free to ask for further assistance on this Discord server or seek help from online resources. Remember, making mistakes is a part of learning, so don't be too hard on yourself!
oh maybe i dont have the development kit
what did you do and what is not working
maybe i just installed normal java
then you would miss the jar command iirc
i found the command on their wiki it just said java command for cmd
well it depends if you have jre (runtime environment) or jdk (development kit)
yeah i might have jre i didnt realise there was a difference
no it is jdk darn
but i might have figured it out acc
well you still didnt say why its failing
what exact command are you trying to do with jar
just make a file a jar dw i figured it out u just rename the file lol
idk what i was reading
A jar isn't zipping up your java files and renaming it from .zip to .jar.
it kinda is
show the error please
also why do you have a zip
it makes no sense
you are supposed to create a jar from class files
I would say not to use jar cf
not because its wrong
but because
jar \
--create \
--file out.jar \
-C build/classes .
sure is easier to read
Well it now works in minecraft like the other files so idk
Ty :)
I already fixed just renamed the .zip to .jar and now it works
Is there a way to edit my post to show it is solved
you shouldn't do that but instead use jar command
also it won't work if you are trying to run it
and
you shouldn't do any of that at the first place and instead use a build tool
Yeah I was editing a mod for minecraft
Yeah an nbt file was crashing my game so I extracted it, removed the file, zipped, renamed to jar and now it works
If they compile the files sure, but it sounded like they just zipped .java files.
Hmm, now I wonder how it's handling that file not found.
It was a pond, so now I just won't have ponds
A mushroom pond or smth
then this is definitelly wrong
They weren't .java, don't remember what it was but it was just like a normal file that I made it into, which I zipped and then named jar
they must have been .class
Idk I just know it worked lol
Since when is it not?
Well they have to be compiled obviously but
ik you can rename .jar to .zip and it works
The second bit. And also if you have external dependencies to embed, shading, possible generated classes, ...