zoukankan      html  css  js  c++  java
  • 部署基于Dragonwell的Java运行环境

    http://dragonwell-jdk.io/?spm=a2c6h.13858378.0.0.63fa3931RHbFiR

     wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/8/8.6.5-GA/Alibaba_Dragonwell_8.6.5_GA_Linux_x64.tar.gz

    tar  -xvf Alibaba_Dragonwell_8.6.5_GA_Linux_x64.tar.gz

    [root@iZbp1jf0fjkrh2jhr6j215Z data]# ./jdk8u282-b1/bin/java -version
    openjdk version "1.8.0_282"
    OpenJDK Runtime Environment (Alibaba Dragonwell 8.6.5) (build 1.8.0_282-b1)
    OpenJDK 64-Bit Server VM (Alibaba Dragonwell 8.6.5) (build 25.282-b1, mixed mode)
    [root@iZbp1jf0fjkrh2jhr6j215Z data]#

    配置环境变量

    cat >> ~/.bashrc << EOF
    export JAVA_HOME=/data/jdk8u282-b1
    export PATH=$PATH:$JAVA_HOME/bin
    EOF

    export JAVA_HOME=/data/jdk8u282-b1
    export PATH=$PATH:$JAVA_HOME/bin

    测试

    cat > Hello.java <<EOF
    public class Hello {
        public static void main(String[] args) {
            System.out.println("Hello World!");
        }
    }
    EOF


    [root@iZbp1jf0fjkrh2jhr6j215Z data]# javac Hello.java
    [root@iZbp1jf0fjkrh2jhr6j215Z data]# java Hello
    Hello World!

    查看程序的字节码文件

    [root@iZbp1jf0fjkrh2jhr6j215Z data]# javap -c Hello
    Compiled from "Hello.java"
    public class Hello {
    public Hello();
    Code:
    0: aload_0
    1: invokespecial #1 // Method java/lang/Object."<init>":()V
    4: return
    public static void main(java.lang.String[]);
    Code:
    0: getstatic #2 // Field java/lang/System.out:Ljava/io/PrintStream;
    3: ldc #3 // String Hello World!
    5: invokevirtual #4 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
    8: return
    }

    菜鸟的自白
  • 相关阅读:
    C# dynamic使用
    Linq简介二
    遇事处理方式
    为什么select关键字没有放到前面而是放到了后面
    decimal、float、double区别
    ViewBag、ViewData、TempData区别
    CommandBehavior.CloseConnection的使用
    LINQ简介一
    ViewBag、ViewData使用
    SQL Server 使用WriteText 存储大容量数据
  • 原文地址:https://www.cnblogs.com/lzjloveit/p/14408786.html
Copyright © 2011-2022 走看看