zoukankan      html  css  js  c++  java
  • JDK

    安装 JDK 环境

    在 Mac 下

    # 安装 JDK 8
    brew tap caskroom/versions
    brew cask install java8
    
    # 安装最新版本
    brew cask install java
    
    # 使用 jenv 管理 JDK 版本
    brew install jenv
    ls -1 /Library/Java/JavaVirtualMachines 
    mkdir ~/.jenv/versions
    jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/
    jenv versions
    jenv global 1.8
    java -version
    
    # 检测 jenv 是否正常安装
    jenv doctor
    
    # 在 zsh 中启用
    vim ~/.zshrc
    ## 在末尾追加
    export JENV_ROOT="/usr/local/opt/jenv"
    if which jenv > /dev/null; then eval "$(jenv init -)"; fi
    ## 使其生效
    source ~/.zshrc
    
    # 设置 Java Home
    jenv enable-plugin export
    exec $SHELL -l
    echo ${JAVA_HOME}
    

    What is the Limit to the Number of Threads You Can Create?

    The time it takes to create a thread increases as you create more thread. For the 32-bit JVM, the stack size appears to limit the number of threads you can create. This may be due to the limited address space. In any case, the memory used by each thread's stack add up. If you have a stack of 128KB and you have 20K threads it will use 2.5 GB of virtual memory.

    Bitness Stack Size Max threads
    32-bit 64K 32,073
    32-bit 128K 20,549
    32-bit 256K 11,216
    64-bit 64K stack too small
    64-bit 128K 32,072
    64-bit 512K 32,072

    参考:Java: What is the Limit to the Number of Threads You Can Create?

    更新 Amazon Linux JDK 从 7 到 8

    sudo yum install java-1.8.0
    sudo yum remove java-1.7.0-openjdk
    sudo yum install java-1.8.0-devel
    
    写在后面:

    1. 子曰:「学而不思则罔,思而不学则殆」。
    2. 站点地图
    2. 本作品作者为 Lshare,采用知识共享署名 4.0 国际许可协议进行许可。
  • 相关阅读:
    Angular @Input讲解及用法
    跨浏览器窗口通讯 ,7种方式
    map和forEach的区别
    纯CSS圆环与圆
    如何理解时间复杂度和空间复杂度
    毁灭
    P1631 序列合并
    plotly dash
    Tkinter
    mysql 和 sqlalchemy 的一个测试环境
  • 原文地址:https://www.cnblogs.com/lshare/p/11334353.html
Copyright © 2011-2022 走看看