Http://download.java.net/java/jdk9-alpine/archive/181/binaries/jdk-9-ea+181_linux-x64-musl_bin.tar.gz not found

hi, i am following the instructions of the following webpage:
labs/ch03-build-image-java-9.adoc at master · docker/labs (github.com)

but this http://download.java.net/java/jdk9-alpine/archive/181/binaries/jdk-9-ea+181_linux-x64-musl_bin.tar.gz, is 404 not found.

may you advise? thx

That is an old git repository. If the Alpine variant is not available anymore for jdk 9, there is not much you can do. You cans till use the Debian variant or find other projects like adoptopenjdk/openjdk9

and use their source: Releases · AdoptOpenJDK/openjdk9-binaries · GitHub
if you trust it.

Releases · AdoptOpenJDK/openjdk9-binaries (github.com)

so the source code above is secured? thx

by the way when i follow the instructions from the following page:
labs/ch03-build-image-java-9.adoc at master · docker/labs (github.com), i encounter the following problems, may you advise? thx

I just found it, I don’t know it. This is why I wote

You can try to find the jdk version somewhere else.

You are working on Windows. Tutorials are usually for Linux. Working with Docker on Windows and Linux are similar, but not always the same. If you tried it in the old command line (cmd.exe) it doesn’t use variables starting with the dollar character. You can try in PowerShell but I don’t remember if $PWD works there as a variable. If it doesn’t, use $(pwd) instead. That will probably work.

thx, i change to %cd% instead of $(pwd) and it works.

however i encounter another problem,

i consulted online and some say it could be the bug of docker, may you advise? thx

It is certainly not. It may be a bug in the Docker image, but not in Docker. I think the error message is clear. jlink was not found. I don’t know if it is the part of the standard jdk package and where it should be. I searched for the file after I built the image and it was not in the image.

thx rimelek, not only jlink, jdeps is also not found

but they are present in the jdk package

And i confirm they are included in the $PATH variable

by the way i try to locate the image but can’t find it at the C:\ProgramData\DockerDesktop
, may you advise? thx
Where are Docker Images Stored? Docker Container Paths Explained (freecodecamp.org)

(duplicate post deleted by rimelek)

Sorry, I could not get back to your post until know.

Please, don’t send your questions again if you don’t get an answer. You can just leave a short message to ask if we forgot about it. I deleted the content of your last post. I don’t have permission to delete it completely.

How exactly did you try to build the image? Because I did it now and it has jlink, jdeps and everything.

If you have the jdk-9/bin directory, you have to see that jlink is there. But don’t compare your jdk version with the one that the tutorial mentions.

What do you expect to find there? As the site mentions, that directory contains the image of the virtual machine. The actual content and directory structure can change in time. I have a different directory structure on my Mac compared to the one on freecodecamp. IThe VM image is in a subdirectory I guess, but you won’t find the Docker images on the Windows filesystem and you don’t need that either.

And more importantly, please don’t ask everything in this topic :slight_smile: (yes, I know you have an other) your original question was about missing jdk version on download.java.net. If we are discussing multiple questiones here, those discussions will be lost in the forest of words. Just to be poetic :slight_smile:

nevermind

ok, sorry for the inconvenience caused.

I executed the following commands:
1.) docker image build -t jdk-9-debian-slim -f jdk-9-debian-slim.Dockerfile .
2.) docker container run --volume %cd%:/helloworld-java-9 --workdir /helloworld-java-9 -it --rm openjdk:9-jdk-slim ./mvnw package
3.) docker container run -it --rm helloworld-jdk-9 jdeps --list-deps /opt/helloworld/helloworld-1.0-SNAPSHOT.jar

And then “docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “jdeps”: executable file not found in $PATH: unknown.”

by the way i use jdk-17 and i confirm that jdeps and jlink are in JAVA_HOME/bin

Understand, thx

OK, this is gonna be my last message in this topic, thx