OpenJDK

Liunx软件安装之JDK

[亡魂溺海] 提交于 2019-11-28 07:45:19
在安装 jdk 之前我们需要先了解下 openjdk 跟 oracle jdk 的区别。 OpenJDK 是 JDK 的开源码版本,以 GP L 协议的形式发布。在 JDK7 的时候, OpenJDK 已经成为 JDK7 的主干开发版, SUN JDK7 是在 OpenJDK7 的基础上发布的,其大部分源码都相同,只有少部分源码被替换掉。使用 JRL(Java Research License,Java研究授权协议) 发布。 简单来说它们两者的代码基本相同,只不过 oracle jdk 比 open jdk 多了一些功能,而且 open jdk 不能使用 Java 商标 。 一、安装 open 版本 1)查看 yum 中 jdk 安装包 yum -y list java* 2) 安装 jdk 1.8 yum install java-1.8.0-openjdk* 3)验证是否安装成功 [marklogzhu@VM_0_15_centos jvm]$ java -version openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode) [marklogzhu@VM_0_15

CentOS - 安装jdk(卸载openjdk)

空扰寡人 提交于 2019-11-28 07:24:09
文章目录 一、卸载openjdk 1. 查看openjdk版本 2. 卸载openjdk 二、下载jdk1.8 三、安装jdk1.8 方法一、手动配置 1. 准备jdk文件 2. 配置`/etc/profile` 3. 使`/etc/profile`生效 方法二、安装二进制包 1. 安装rpm包 2. 配置`/etc/profile` 3. 使`/etc/profile`生效 题外话:安装openJDK 一、卸载openjdk 1. 查看openjdk版本 [ nangy@nangy-vm ~ ] $ java -version openjdk version "1.8.0_222" OpenJDK Runtime Environment ( build 1.8.0_222-b10 ) OpenJDK 64-Bit Server VM ( build 25.222-b10, mixed mode ) [ nangy@nangy-vm ~ ] $ rpm -qa | grep java java-1.7.0-openjdk-headless-1.7.0.231-2.6.19.1.el7_6.x86_64 javapackages-tools-3.4.1-11.el7.noarch java-1.8.0-openjdk-headless-1.8.0.222.b10-0.el7_6

Deepin - 安装jdk(卸载openjdk)

孤街浪徒 提交于 2019-11-28 07:24:07
文章目录 一、卸载openjdk 1. 查看openjdk版本 2. 卸载openjdk 二、下载jdk1.8 三、安装jdk1.8 方法一、手动配置 1. 准备jdk文件 2. 配置`/etc/profile` 3. 使`/etc/profile`生效 一、卸载openjdk 1. 查看openjdk版本 # nangy @ nangy-vm in ~ [22:07:46] $ java -version zsh: command not found: java # nangy @ nangy-vm in ~ [22:09:22] C:127 $ dpkg -l | grep openjdk 2. 卸载openjdk # 本机没有,那就不用卸载,直接安装jdk 二、下载jdk1.8 官网下载 | JDK 8u211 三、安装jdk1.8 方法一、手动配置 1. 准备jdk文件 先下载 .tar.gz 压缩包 # nangy @ nangy-vm in ~ [22:09:35] C:1 $ cp /mnt/hgfs/VMware共享文件/software/jdk-8u211-linux-x64.tar.gz -R /home/nangy/Downloads # 以下操作切换成root用户 # nangy @ nangy-vm in ~ [22:16:31] $ su # root

update-alternatives: warning: /etc/alternatives/java is dangling

浪尽此生 提交于 2019-11-28 05:28:05
I am facing the problem while running the java program from command line. I have openjdk-6-jdk installed in my linux system and still shows the error relates with the openjdk-7-jdk. Initially i have jdk 7 installed in my system but ater i have removes it but still facing problem while running the application. after running the cammand sudo update-alternatives --config java it shows warning as follows update-alternatives: warning: /etc/alternatives/java is dangling, it will be updated with best choice. There is only one alternative in link group java: /usr/lib/jvm/java-7-openjdk/jre/bin/java

Difference between openjdk-6-jre, openjdk-6-jre-headless, openjdk-6-jre-lib

醉酒当歌 提交于 2019-11-28 05:12:44
I am having trouble understanding some of the basics of Java JRE. I need to run Java code in an embedded system and for this I need a minimal Java Runtime Environment installed in a Linux kernel, that is to say, the minimum package necessary for executing Java binaries. I think it is not possible to do this only with a JVM (the JRE package is necessary, am I wrong here?) The thing is, when looking at the Debian repositories I don't quite understand the differences between the packages openjdk-6-jre , openjdk-6-jre-headless and openjdk-6-jre-lib . Will Java programs run only with the former? or

Appengine DevMode : access denied (“java.lang.RuntimePermission” “accessClassInPackage.sun.security.util”)

十年热恋 提交于 2019-11-28 02:20:50
I upgraded my PC to Ubuntu 12.04 and restored the backup of my workspace and Eclipse afterwards. Now when I try to start my AppEngine/GWT application I run into a problem with the java security manager. Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.security.util") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366) at java.security.AccessController.checkPermission(AccessController.java:555) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at com.google.appengine

How do I update the timezone information for the OpenJDK?

末鹿安然 提交于 2019-11-28 00:57:27
How do I update the timezone information for the OpenJDK? Oracle puts out tzupdater but that is bound by their license so I don't want to use it. I'm looking for an open source alternative that will allow me to just update the timezone information and not the entire JRE. Azul recently published an open source tool to update TZ data: https://www.azul.com/products/open-source-tools/ziupdater-time-zone-tool/ It works similar to Oracle tzupdater, but has open source (GPLv2 License) license. Usage: apply it to IANA data package using Java which you want to update: $JAVA_HOME/bin/java -jar ziupdater

源码编译OpenJdk 8,Netbeans调试Java原子类在JVM中的实现(Ubuntu 16.04)

雨燕双飞 提交于 2019-11-27 21:42:46
一、前言 今天事不是很多,正好在Java交流群里,看到一个比较有意思的问题,于是花了点时间研究了一下,这里做个简单的分享。 先贴一份测试代码,大家可以先猜测一下,执行结果会是怎样的: 2 3 import java.util.concurrent.TimeUnit; 4 5 6 public class TestClassLoading { 7 public static class A{ 8 static { 9 System.out.println("class A init"); 10 try { 11 TimeUnit.SECONDS.sleep(1); 12 } catch (InterruptedException e) { 13 e.printStackTrace(); 14 } 15 new B(); 16 } 17 18 public static void test() { 19 System.out.println("aaa"); 20 } 21 } 22 23 public static class B{ 24 static { 25 System.out.println("class B init"); 26 new A(); 27 } 28 29 30 public static void test() { 31 System.out.println(

What's the location of the JavaFX runtime JAR file, jfxrt.jar, on Linux?

不问归期 提交于 2019-11-27 19:58:14
I'm trying to run some JavaFX code with Eclipse Kepler, with e(fx)clipse plugin installed, on a Linux machine, using: java version "1.7.0_21" OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-5) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) My understanding is that although JavaFX has been included with the standard JDK since version JDK 7u6, the JavaFX runtime JAR file, jfxrt.jar, was left off of the Java runtime path on purpose until further testing between JavaFX and rest of the java infrastructure has been completed. For this reason you must manually add it to the project