Help me install Java on Linux

manpaint

̴̘̈́ ̵̲̾ ̸̯̎ ̴͓̀ ̸̳͝ ̸͈͑ ̴̡̋ ̸̞̂ ̴̰̚ ̵̨̔ ̸̭̎
Gold
Joined
Aug 11, 2022
Messages
903
Reaction score
1,697
Awards
202
Website
manpaint.neocities.org
I never would have thought I would ever ask for help installing a program, but here we are...

Due to extremely specific circumstances I will not linger on, I need to extract a corrupted ZIP archive with the "jar xvf" command. I tried to do so on my trust Windows 7 machine, but it was unable to extract the whole thing as it contains filename symbols that Windows do not like (the archive was made on MacOS). As such, I need to install Java on a Linux installation.

Sounds easy right? I fucking wish it was.

I downloaded the latest version of Linux Mint and tried to download Java using the terminal command ("sudo apt install default-jre"). It told me it could not find a URL. At first I was like "fine, I will just download the .deb file manually" and I did. Except when I tried to install it was the missing a dependency. So I downloaded another .dep file. This time, the missing dependecy was itself which is ???

I switched to Linux Elive, thinking that maybe there was something horribly wrong with either Linux Mint or the Ubuntu repo. The thing could not fetch .deb files either, but unlike Mint, it gave me a list of everything it failed to download. When trying to fetch the .deb files, I found to my dismay that some dependencies where not archived, hence limiting my chances.

Oh I tried Fedora and bog standard Debian but it did not work in a VM. My ability to use Linux on real hardware is limited as no distro can detect my WIFI antenna correctly. I am not fucking with the drivers.

I have been trying to open this ZIP file for nearly 7 days now. I want to know the following:

  • Is there any equivalent of a .exe setup on Linux where every dependencies can be found in ome neat package?
  • How do one find which packages is suitable for his Linux distro manually?
  • How can I find a list of the order of dependencies?

I can't tell you how much I hate Linux right now. Please help me.
 

shinobu

Jack of all trades
Joined
Dec 17, 2021
Messages
360
Reaction score
2,637
Awards
187
tried to download Java using the terminal command ("sudo apt install default-jre"). It told me it could not find a URL
Post the error. I've had similar things happen but without more info there's not much I can do
Or try running sudo apt-get update and then try to install default-jre again (a recently installed VM probably doesn't have up-to date mirrors and whatnot)

Is the zip file something that contains private details? Otherwise you could post it directly
Also, try using binwalk on the zip file. I think it could help
 
Virtual Cafe Awards

manpaint

̴̘̈́ ̵̲̾ ̸̯̎ ̴͓̀ ̸̳͝ ̸͈͑ ̴̡̋ ̸̞̂ ̴̰̚ ̵̨̔ ̸̭̎
Gold
Joined
Aug 11, 2022
Messages
903
Reaction score
1,697
Awards
202
Website
manpaint.neocities.org
Post the error. I've had similar things happen but without more info there's not much I can do
Or try running sudo apt-get update and then try to install default-jre again (a recently installed VM probably doesn't have up-to date mirrors and whatnot)

Is the zip file something that contains private details? Otherwise you could post it directly
Also, try using binwalk on the zip file. I think it could help

sudo apt-get update

As mentionned, the error are bog standard 404 error like this:

Code:
W: Failed to fetch http://repo.wheezy.debian.elivecd.org/debian/pool/main/j/java-atk-wrapper/libatk-wrapper-java-jni_0.30.4-3_i386.deb
  Unable to connect to repo.wheezy.debian.elivecd.org:http:

I will try the commands suggested and I will report back tomorrow or later today.

Edit: Oh and the archive is also 55 GB and full of private info, not very postable.
 

vulonkaaz

Pure Love
Bronze
Joined
Jun 29, 2023
Messages
297
Reaction score
2,107
Awards
145
Website
vulonkaaz.zip
As mentionned, the error are bog standard 404 error like this:

Code:
W: Failed to fetch http://repo.wheezy.debian.elivecd.org/debian/pool/main/j/java-atk-wrapper/libatk-wrapper-java-jni_0.30.4-3_i386.deb
  Unable to connect to repo.wheezy.debian.elivecd.org:http:
what I think happened is that apt tried to download an old version of java that isn't on the repo anymore, that is because your local apt database is like outdated or something and apt update fix that it refreshes the local database

I used to have this error a lot back when I was on soybuntu
 
Virtual Cafe Awards

RisingThumb

Imaginary manifestation of fun
Joined
Sep 9, 2021
Messages
715
Reaction score
1,761
Awards
173
Website
risingthumb.xyz
Code:
Unable to connect to repo.wheezy.debian.elivecd.org:http:
Server's fucking dead mate. If that's what you get after upgrading, the distro or its repos are fucking dead mate.

Use Arch linux. Install it by following the arch wiki steps on installation. OR, if you're ok with the defaults, archinstall. Alternatively use an arch-based distro, that's already easy to install, like EndeavourOS. Follow the steps on Java here. Literally download the java jre you want to use, and then archlinux-java set the one you want to be used, and then do your java stuff.
Sounds easy right? I fucking wish it was.
It is easy though. I have Java on my machine and sometimes change between Java versions when I need a different version. It's as easy as sliced pie
 
Virtual Cafe Awards
As mentionned, the error are bog standard 404 error like this:

Code:
W: Failed to fetch http://repo.wheezy.debian.elivecd.org/debian/pool/main/j/java-atk-wrapper/libatk-wrapper-java-jni_0.30.4-3_i386.deb
  Unable to connect to repo.wheezy.debian.elivecd.org:http:

I will try the commands suggested and I will report back tomorrow or later today.

Edit: Oh and the archive is also 55 GB and full of private info, not very postable.
Basically everything screams "non-updated apt database" , sudo apt-get update most likely would fix it. If you get compatibility issues afterwards sudo apt-get install, do a sudo apt-get upgrade. the install one installs newest apt database into your system and upgrade installs the newest versions of the software you have.
 
Virtual Cafe Awards

vulonkaaz

Pure Love
Bronze
Joined
Jun 29, 2023
Messages
297
Reaction score
2,107
Awards
145
Website
vulonkaaz.zip
http://repo.wheezy.debian.elivecd.org/ Server's fucking dead mate. If that's what you get after upgrading, the distro or its repos are fucking dead mate.
please don't scare manpaint away from linux it's probably nothing, the apt database thing is just outdated meaning it got a few dead links, nothing that a good old apt update can't fix

(I agree that pacman is insanely superior to apt tho)
 
Virtual Cafe Awards

Bob Jones

Traveler
Joined
Sep 2, 2021
Messages
75
Reaction score
160
Awards
34
As mentionned, the error are bog standard 404 error like this:

Code:
W: Failed to fetch http://repo.wheezy.debian.elivecd.org/debian/pool/main/j/java-atk-wrapper/libatk-wrapper-java-jni_0.30.4-3_i386.deb
  Unable to connect to repo.wheezy.debian.elivecd.org:http:

Several people have told you what's wrong, but I'll try to provide more of an explanation, since I know that Linux can be frustrating for people without much technical inclination.

Basically, this isn't an error you'd receive from apt update. Maybe you'd get another error when you ran it, but this looks like an error you'd get when trying to install a package.

How Debian and derived distros (e.g. Ubuntu, Linux Mint) work is that "apt update" refreshes the local list of installable packages. If you run a command like "apt install...", apt uses package lists from whenever "apt update" was run last. If you've never run "apt update" before then your local list of packages might be years old, and apt will attempt to fetch a version that's not being kept around in the remote repository anymore.


  • Is there any equivalent of a .exe setup on Linux where every dependencies can be found in ome neat package?

It's called Appimage, but I'm not sure anyone's tried to package Java that way.

As far as "easier" ways of installing software go, most of these distros provide GUIs for installing software. I think Mint's is called "Software Manager" or something. If you use that, you don't need to enter any terminal commands manually. These are made for users like you, who don't know how to use the terminal/apt, and though they don't always have all software users may want to install, it should work in your case. You may try using this program to install it instead of the terminal.
 
Last edited:
Virtual Cafe Awards

RisingThumb

Imaginary manifestation of fun
Joined
Sep 9, 2021
Messages
715
Reaction score
1,761
Awards
173
Website
risingthumb.xyz
please don't scare manpaint away from linux it's probably nothing, the apt database thing is just outdated meaning it got a few dead links, nothing that a good old apt update can't fix
Not scaring him away. He's competent. He's mentioned trying different distros to do this, and he's provided error logs and been informative.
As far as "easier" ways of installing software go, most of these distros provide GUIs for installing software. I think Mint's is called "Software Manager" or something. If you use that, you don't need to enter any terminal commands manually. These are made for users like you, who don't know how to use the terminal/apt, and though they don't always have all software users may want to install, it should work in your case. You may try using this program to install it instead of the terminal.
Not all software managers are complete, or even necessarily good. It's very distribution dependent, far more than just using the terminal. I don't know if it's my past experience with Solus, but shitty package managers and shitty GUI frontends for them will blow up in your face when you're not expecting it. It even does this on Arch(which is part of why I subscribe to the Arch linux RSS feed to know about breaking changes before I update).
I agree with the sentiment of "easier". There's no correct way to install or run software. Flatpacks, pip, npm, pacman etc are all different ways of installing software, and even Windows has its exes and some attempts at package management(pip, npm, chocolatey). It's not "easier", it's just the Linux way of doing things.

I also think encouraging users new to Linux to stick to the GUI betrays the benefits of Linux(but I know manpaint is ok with CLIs), but to each their own.
 
Virtual Cafe Awards

manpaint

̴̘̈́ ̵̲̾ ̸̯̎ ̴͓̀ ̸̳͝ ̸͈͑ ̴̡̋ ̸̞̂ ̴̰̚ ̵̨̔ ̸̭̎
Gold
Joined
Aug 11, 2022
Messages
903
Reaction score
1,697
Awards
202
Website
manpaint.neocities.org
Alright, so I sucessfully manage to install Java-jdk using "sudo apt-get update". The installation of the Java JDK initially froze Linux Mint, but turns out that this was because I was doing this in a live preview. Installing the OS in the VM fixed that issue easily. Thanks to everyone who helped me.

Although I was able to run "jar xvf", it sadly returned the same error as on Windows, so I am back on square one.

The specific error of the zip file according to "zipfile" is as follow:

Code:
warning [damaged.zip]:  55834574848 extra bytes at beginning or within zipfile

Things I tried so far:

  • Latest version of 7zip (GUI) (do not work)
  • File Roller (GUI) (only manage to extract some files)
  • "unzip" command (only manage to extract some files)
  • Winrar (GUI) (do not work)
  • "jar xvf" command (only manage to extract some files)
  • *F" and "FF" command (produces an unreadable zip file)
  • "binwalk -e" command (only output an empty folder, and endlessly write into an archive called "0.zip")
  • Zip2fix (GUI) (do not work)
  • PeaZip (GUI) (do not work)
The strangest thing is that File Roller, "unzip" and "jar xvf" all do not agree on what the archive contains. They all seem to be only be able to extract specific sections of it with some minor files overlap. For example File Roller is able to extract folder 1-4, unzip folder 6 and 8 etc. In File Roller, I am able to see the "table of content/folder structure" of the archive.

Has anyone got any idea of wtf is going on or any method to try to fix it?
 

RisingThumb

Imaginary manifestation of fun
Joined
Sep 9, 2021
Messages
715
Reaction score
1,761
Awards
173
Website
risingthumb.xyz
Has anyone got any idea of wtf is going on or any method to try to fix it?
There's a lot of zip formats as you'll see on wikipedia, and you're fighting against a corrupted file. I wouldn't have loads of faith it's all recoverable. Do you know what *type* of zip this is? If you do, you'll have better luck looking into zip fixing software for that specific type.
You've mentioned trying zip -F and zip -FF right? As this would tell you, this can fix corrupted archives a bit.
Alternatively try the solutions listed here, about using 7za or 7z.
 
Virtual Cafe Awards

shinobu

Jack of all trades
Joined
Dec 17, 2021
Messages
360
Reaction score
2,637
Awards
187
If all of your subsequent attempts don't work (remember to try those fixes on a copy, not on the original), you can try busting out the zip specification and a hex editor, and manually take a look (if you know how to program you can write some Python scripts to automate some of that). Best case scenario is the header is all that's corrupted, and all your data is intact.
And last resort is paying someone. There are many data recovery companies that do this kind of work.
 
Virtual Cafe Awards

manpaint

̴̘̈́ ̵̲̾ ̸̯̎ ̴͓̀ ̸̳͝ ̸͈͑ ̴̡̋ ̸̞̂ ̴̰̚ ̵̨̔ ̸̭̎
Gold
Joined
Aug 11, 2022
Messages
903
Reaction score
1,697
Awards
202
Website
manpaint.neocities.org
There's a lot of zip formats as you'll see on wikipedia, and you're fighting against a corrupted file. I wouldn't have loads of faith it's all recoverable. Do you know what *type* of zip this is? If you do, you'll have better luck looking into zip fixing software for that specific type.
You've mentioned trying zip -F and zip -FF right? As this would tell you, this can fix corrupted archives a bit.
Alternatively try the solutions listed here, about using 7za or 7z.
Yeah I tried "F" and "FF", it just gave me a ZIP file that was completely unreadable. According to my notes, I did tried "7za x", but it gave me the same thing: an unreadable archive.

As for the ZIP format, I am not very sure. I know that the archive was made on macOS Mojave 10.14.6 machine using the GUI. Is there an easy way to detect which ZIP format it uses? I know that the "file" command on Linux just tells me it's a ZIP file.

I putted the zip in HxD and got this result:

header.png


This look like a "basic" zip file header to me, but I am no expert in this field. I compared the file with another archive made under the same circumstance. The header and ender is slightky different, but it still seem to be the same thing. Then again something I have seen claim that macOS use lz7 and lz8 so idk.
 

RisingThumb

Imaginary manifestation of fun
Joined
Sep 9, 2021
Messages
715
Reaction score
1,761
Awards
173
Website
risingthumb.xyz
This look like a "basic" zip file header to me, but I am no expert in this field. I compared the file with another archive made under the same circumstance. The header and ender is slightky different, but it still seem to be the same thing. Then again something I have seen claim that macOS use lz7 and lz8 so idk.
Should be your standard PKZip file. Looking at the PKZip file format for what you expect from headers here(double check it makes sense to you), it's a pretty standard zip file, so if zip repairing doesn't work, I'm not very optimistic about recovering all the data on it. Have you tried running the repairs on the output zips from -F or -FF? Unlikely to solve anything, but maybe worth a try.
If all of your subsequent attempts don't work (remember to try those fixes on a copy, not on the original), you can try busting out the zip specification and a hex editor, and manually take a look (if you know how to program you can write some Python scripts to automate some of that). Best case scenario is the header is all that's corrupted, and all your data is intact.
And last resort is paying someone. There are many data recovery companies that do this kind of work.
Agreed. There's also probably better forums to ask this sort of question on? Only a handful of people on Agora are actually experienced with this sort of technical detail. Try asking on >redditcostanzayeahrightsmirk, here's the subreddit
 
Virtual Cafe Awards

manpaint

̴̘̈́ ̵̲̾ ̸̯̎ ̴͓̀ ̸̳͝ ̸͈͑ ̴̡̋ ̸̞̂ ̴̰̚ ̵̨̔ ̸̭̎
Gold
Joined
Aug 11, 2022
Messages
903
Reaction score
1,697
Awards
202
Website
manpaint.neocities.org
Have you tried running the repairs on the output zips from -F or -FF? Unlikely to solve anything, but maybe worth a try.
I already tried that, according to the archives, it resulted in a "zipfile structure invalid" error.

The most ind-boggling this how I have like 5 different backups of this file all created a different point in time that all exhibits the same error.
 

manpaint

̴̘̈́ ̵̲̾ ̸̯̎ ̴͓̀ ̸̳͝ ̸͈͑ ̴̡̋ ̸̞̂ ̴̰̚ ̵̨̔ ̸̭̎
Gold
Joined
Aug 11, 2022
Messages
903
Reaction score
1,697
Awards
202
Website
manpaint.neocities.org
probably need open-jdk or whatever its called.
I did indeed install open-jdk. The jar command technically worked as it managed to extract a few files from the damaged archive. Sadly, it did not worked as much as I would have liked to.
 

Captain

CEO of America Online
Joined
Jun 14, 2022
Messages
283
Reaction score
1,305
Awards
114
Legend has it if you try to force Java to install...Richard Stallman comes to your house to remind you that it's not fReE sOfTwArE. It's not worth the risk!
 
Virtual Cafe Awards

Similar threads