What is correct location of src.zip file in JDK?

1.6k views Asked by At

What should be the correct location of src.zip in JDK?

Should it be JAVA_HOME/lib/src.zip?

or

Should it be JAVA_HOME/src.zip?

Which one is correct?

JDK version - openjdk11

2

There are 2 answers

2
Elliott Frisch On BEST ANSWER

It depends on the version of Java you are using, with

  • Java 9+ it should be $JAVA_HOME/lib/src.zip1
  • Java 8 and earlier it should be $JAVA_HOME/src.zip

1See also Project Jigsaw. More specifically, JEP 201 and JEP 220.

3
AudioBubble On

mostly, the JDK source code is named src. zip , and located at the root folder of the JDK installed path. in your question Java 11, it is $JAVA_HOME/lib/src.zip and it will be different in other versions. stating the Java version that you are currently using in the question will help you to find a better answer