zoukankan      html  css  js  c++  java
  • 验证码无法显示:Could not initialize class sun.awt.X11GraphicsEnvironment 解决方案

    解决方案:

       在tomcat配置文件catalina.sh文件中添加 CATALINA_OPTS="-Djava.awt.headless=true"
    

    catalina.sh添加之后如下:

    #   LOGGING_CONFIG  (Optional) Override Tomcat's logging config file
    #                   Example (all one line)
    #                   LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
    #
    #   LOGGING_MANAGER (Optional) Override Tomcat's logging manager
    #                   Example (all one line)
    #                   LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
    #
    # $Id: catalina.sh 1146097 2011-07-13 15:25:05Z markt $
    # -----------------------------------------------------------------------------
     
    JAVA_OPTS="-Xms512m -Xmx19500m"
    CATALINA_OPTS="-Djava.awt.headless=true"
    # OS specific support.  $var _must_ be set to either true or false.
    cygwin=false
    os400=false
    darwin=false
    case "`uname`" in
    CYGWIN*) cygwin=true;;
    OS400*) os400=true;;
    Darwin*) darwin=true;;
    esac
     
    # resolve links - $0 may be a softlink
    PRG="$0"
     
    while [ -h "$PRG" ]; do
    

    ————————————————
    版权声明:本文为CSDN博主「偶尔上线的玩家」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/yibo924/article/details/81456594

  • 相关阅读:
    Merge Sorted Array
    Remove Duplicates from Sorted List
    Integer to Roman
    String to Integer (atoi)
    Valid Parentheses
    3Sum
    Remove Duplicates from Sorted Array
    Swap Nodes in Pairs
    得到一个Object的属性
    在WebGrid中做 批量删除操作
  • 原文地址:https://www.cnblogs.com/jiftle/p/14536510.html
Copyright © 2011-2022 走看看