Difference between revisions of "Package:Java SE Development Kit (JDK)"

From Funtoo
Jump to navigation Jump to search
m (insert media)
m
Line 5: Line 5:
|Homepage=http://www.oracle.com/technetwork/java/javase/overview/index.html
|Homepage=http://www.oracle.com/technetwork/java/javase/overview/index.html
}}
}}
You can install the free icedtea jdk or Oracle's version.
You can install the free icedtea jdk or Oracle's version.
Therefore we have a virtual package called ''virtual/jdk''. By default it will install the Oracle version.
Therefore we have a virtual package called ''virtual/jdk''. By default it will install the Oracle version.  Jdk is {{package|dev-java/oracle-jre-bin}} & additional software for development.


== Installation ==
== Installation ==
<console>
{{console|body=
###i## emerge -a virtual/jdk
###i## emerge -a virtual/jdk
</console>
}}


If you receive a message similar to the following, you will have to accept the Oracle java license to emerge the <code>oracle-jdk-bin</code>:
If you receive a message similar to the following, you will have to accept the Oracle java license to emerge the {{c|oracle-jdk-bin}}:
<console>
{{console|body=
###i## emerge virtual/jdk
###i## emerge virtual/jdk
Calculating dependencies... done!
Calculating dependencies... done!
Line 27: Line 28:
# required by oracle-jdk-bin (argument)
# required by oracle-jdk-bin (argument)
##g##>=dev-java/oracle-jdk-bin-1.8.0.11 Oracle-BCLA-JavaS##!g##
##g##>=dev-java/oracle-jdk-bin-1.8.0.11 Oracle-BCLA-JavaS##!g##
</console>
}}


To accept the required license, create the directory <code>/etc/portage/package.license</code> if it does not already exist.  
To accept the required license, create the directory {{c|/etc/portage/package.license}} if it does not already exist.  
<console>
{{console|body=
###i## mkdir /etc/portage/package.license
###i## mkdir /etc/portage/package.license
</console>
}}


After we create this directory, portage will read files that we create inside of it to see that we have accepted licenses required to install certain packages. To accept the license for <code>oracle-jdk-bin</code>, create a file called something like <code>/etc/portage/package.license/oracle-jdk-bin</code> and add the line <code>dev-java/oracle-jdk-bin Oracle-BCLA-JavaS</code> to it:
After we create this directory, portage will read files that we create inside of it to see that we have accepted licenses required to install certain packages. To accept the license for {{c|oracle-jdk-bin}}, create a file called something like {{c|/etc/portage/package.license/oracle-jdk-bin}} and add the line {{c|dev-java/oracle-jdk-bin Oracle-BCLA-JavaS}} to it:
<console>
{{console|body=
###i## tee /etc/portage/package.license/oracle-jdk-bin <<< "dev-java/oracle-jdk-bin Oracle-BCLA-JavaS"
###i## tee /etc/portage/package.license/oracle-jdk-bin <<< "dev-java/oracle-jdk-bin Oracle-BCLA-JavaS"
</console>
}}


Now you can emerge <code>oracle-jdk-bin</code>
Now you can emerge {{c|oracle-jdk-bin}}
<console>
{{console|body=
###i## emerge virtual/jdk
###i## emerge virtual/jdk
</console>
}}


After the installation finishes, you may want to check and see if you can use the jdk. You can do so by issuing the following command:
After the installation finishes, you may want to check and see if you can use the jdk. You can do so by issuing the following command:
<console>
{{console|body=
$##i## java
$##i## java
</console>
}}


== media ==
== media ==

Revision as of 11:33, January 30, 2015

Java SE Development Kit (JDK)

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


You can install the free icedtea jdk or Oracle's version. Therefore we have a virtual package called virtual/jdk. By default it will install the Oracle version. Jdk is dev-java/oracle-jre-bin & additional software for development.

Installation

root # emerge -a virtual/jdk

If you receive a message similar to the following, you will have to accept the Oracle java license to emerge the oracle-jdk-bin:

root # emerge virtual/jdk
Calculating dependencies... done!
[ebuild  N     ] dev-java/java-config-wrapper-0.16 
[ebuild  N     ] sys-apps/baselayout-java-0.1.0 
[ebuild  N     ] app-admin/eselect-java-0.1.0 
[ebuild  N     ] dev-java/java-config-2.2.0-r1000   PYTHON_ABIS="2.7 3.3 -2.6 -3.1 -3.2 -3.4 (-3.5)" 
[ebuild  N     ] dev-java/oracle-jdk-bin-1.8.0.11  USE="X alsa fontconfig nsplugin (-aqua) -derby -doc -examples -jce -pax_kernel (-selinux) -source" 

The following license changes are necessary to proceed:
 (see "package.license" in the portage(5) man page for more details)
root # required by oracle-jdk-bin (argument)
root ##g##>=dev-java/oracle-jdk-bin-1.8.0.11 Oracle-BCLA-JavaS##!g##

To accept the required license, create the directory /etc/portage/package.license if it does not already exist.

root # mkdir /etc/portage/package.license

After we create this directory, portage will read files that we create inside of it to see that we have accepted licenses required to install certain packages. To accept the license for oracle-jdk-bin, create a file called something like /etc/portage/package.license/oracle-jdk-bin and add the line dev-java/oracle-jdk-bin Oracle-BCLA-JavaS to it:

root # tee /etc/portage/package.license/oracle-jdk-bin <<< "dev-java/oracle-jdk-bin Oracle-BCLA-JavaS"

Now you can emerge oracle-jdk-bin

root # emerge virtual/jdk

After the installation finishes, you may want to check and see if you can use the jdk. You can do so by issuing the following command:

user $ java

media