#248 Added Installing OpenJDK for development + minor changes
Merged 3 years ago by ankursinha. Opened 3 years ago by alciregi.
fedora-docs/ alciregi/quick-docs master  into  master

@@ -1,15 +1,15 @@ 

  [id='installing-openjdk']

- = Installing  OpenJDK

+ = Installing OpenJDK

  

  To install OpenJDK from the Fedora repository:

  

- . Run the following command to list available versions:

+ * Run the following command to list available versions:

  

  ----

- $ dnf search openjdk

+ dnf search openjdk

  ----

  

- . Copy the version of OpenJDK you want to install.

+ * Copy the version of OpenJDK you want to install.

  

  [NOTE]

  Various flavors of OpenJDK are available. For information about these options, search the link:http://openjdk.java.net/[OpenJDK web site].
@@ -17,11 +17,41 @@ 

  * Run the following command to install OpenJDK:

  

  ----

- # dnf install <openjdk-package-name>

+ sudo dnf install <openjdk-package-name>

  ----

  

- For example:

+ Examples:

  

  ----

- # dnf install java-{1.8.0|11|latest}-openjdk.x86_64

+ sudo dnf install java-1.8.0-openjdk.x86_64

+ ----

+ 

+ ----

+ sudo dnf install java-11-openjdk.x86_64

+ ----

+ 

+ ----

+ sudo dnf install java-latest-openjdk.x86_64

+ ----

+ 

+ == Installing OpenJDK for development

+ 

+ In order to install the Java Development Kit, runtime environment and associated development tools.

+ 

+ ----

+ sudo dnf install <openjdk-package-name>-devel

+ ----

+ 

+ Examples:

+ 

+ ----

+ sudo dnf install java-1.8.0-openjdk-devel.x86_64

+ ----

+ 

+ ----

+ sudo dnf install java-11-openjdk-devel.x86_64

+ ----

+ 

+ ----

+ sudo dnf install java-latest-openjdk-devel.x86_64

  ----

@@ -1,7 +1,7 @@ 

  [id='installing-oracle-java-se']

  = Installing Oracle Java SE

  

- include::{partialsdir}/3rdparty-message.adoc[] 

+ include::{partialsdir}/3rdparty-message.adoc[]

  

  To install Oracle Java SE:

  
@@ -17,21 +17,3 @@ 

  ----

  

  Note: Always make sure to download latest version available.

- 

- == Switching between Java Versions                                                        

- 

- You might have installed several versions of Java on your system, you can switch from one 

- 

- After running this command, you will see a a list of all installed Java versions, select t

- 

- ----

- sudo alternatives --config java

- ----

- 

- Simply enter a selection number to choose which java executable should be used by default.

- 

- * verify:                                                                                 

- 

- ----

- java --Versions

- ----

@@ -0,0 +1,17 @@ 

+ = Switching between Java Versions

+ 

+ You might have installed several versions of Java on your system, you can switch from one

+ 

+ After running this command, you will see a a list of all installed Java versions, select t

+ 

+ ----

+ sudo alternatives --config java

+ ----

+ 

+ Simply enter a selection number to choose which java executable should be used by default.

+ 

+ * verify:

+ 

+ ----

+ java --Versions

+ ----

@@ -29,8 +29,9 @@ 

  

  include::{partialsdir}/proc_installing-oracle-java.adoc[leveloffset=+1]

  

- include::{partialsdir}/ref_jdk-tools.adoc[leveloffset=+1]

+ include::{partialsdir}/proc_switching-between-java-versions.adoc[leveloffset=+1]

  

+ include::{partialsdir}/ref_jdk-tools.adoc[leveloffset=+1]

  

  [discrete]

  == Additional resources

Added Installing OpenJDK for development (how to install java-{1.8.0|11|latest}-openjdk-devel)

Modified dnf commands to include "sudo" instead of the "#" character in front of each command.

Minor aesthetic change (* instead of . for the lists).

I see that it tries to say "1.8.0 or 11 or latest" here, right? I'm not sure if end-users will understand that. It's probably better to give the three commands as examples, or just use the one version. What do you think? (Same below for JDK)

Metadata Update from @ankursinha:
- Request assigned

3 years ago

Metadata Update from @ankursinha:
- Pull-request tagged with: needs committer review

3 years ago

I didn't change that. BTW I agree. Also to facilitate copy&paste 😂

@ankursinha sorry but I'm in an endless fight with git.
How I should proceed? How to modify this PR?

Just make the new changes and push a new commit to this branch. It'll get
added to this PR :)

--
Thanks,

Ankur

(Sent from mobile device)

2 new commits added

  • I placed Switching between Java Versions paragraph outside of the Installing Oracle Java SE one.
  • How to install JDK development tools.
3 years ago

Ah, didn't get a notification for the new pushes! Looks good! Merging. Thanks @alciregi !

rebased onto bf8758a

3 years ago

Pull-Request has been merged by ankursinha

3 years ago