Chinaunix首页 | 论坛 | 博客
  • 博客访问: 751414
  • 博文数量: 160
  • 博客积分: 2516
  • 博客等级: 大尉
  • 技术积分: 1511
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-24 17:58
文章分类

全部博文(160)

文章存档

2019年(2)

2018年(3)

2017年(15)

2016年(3)

2015年(11)

2014年(3)

2013年(1)

2012年(3)

2011年(17)

2010年(25)

2009年(17)

2008年(13)

2007年(14)

2006年(21)

2005年(10)

2004年(2)

分类: Java

2016-02-16 16:29:54

问题描述:
     Tomcat第一次随机自动次启动时没有问题,启动后service tomcat stop后再执行service tomcat start,此时不能识别中文文件和中文路径名。
解决方案:
        $CATALINA_HOME/bin/setenv.sh :

点击(此处)折叠或打开

  1. JAVA_HOME=/da/jdk
  2. JAVA_OPTS="-server -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
  3. # -Duser.language=zh -Duser.country=CN -Duser.region=CN
        /etc/init.d/tomcat:(主要因素)

点击(此处)折叠或打开

  1. #!/bin/sh

  2. # chkconfig: 35 30 70
  3. # description: Starts and Stops the Tomcat daemon.

  4. LANG="zh_CN.UTF-8"
  5. LC_ALL="zh_CN.UTF-8"
  6. export LANG LC_ALL

  7. JAVA_HOME=/da/jdk
  8. CATALINA_HOME=/da/tomcat
  9. TOMCAT_USER=tomcat

  10. # resolve links - $0 may be a softlink
  11. ARG0="$0"
  12. ......
    附:查看linux进程环境变量:

点击(此处)折叠或打开

  1. cat /proc/2405(pid)/environ | tr '\0' '\n'
    


阅读(1356) | 评论(0) | 转发(0) |
0

上一篇:linux 网卡

下一篇:Centos yum 更换 aliyun

给主人留下些什么吧!~~