当前所在位置:珠峰网资料 >> 计算机 >> 计算机等级考试 >> 正文
Java如何设置ClassPath路径
发布时间:2010/10/13 10:53:47 来源:城市学习网 编辑:ziteng

  因为有很多汉字需要编码所以选择gbk
  =========================================================
===================
  URIEncoding="GBK"
  /etc/profile
  =========================================================
====================
  export PATH
  export JAVA_HOME=/usr/lib/jvm/java-6-sun
  export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/mysql-connector-java-5.1.12-bin.jar
  umask 022
  export APACHE_RUN_USER=www-data
  export APACHE_RUN_GROUP=www-data
  export APACHE_PID_FILE=/var/run/apache2.pid
  server.xml
  =========================================================
=====================
  <Host name="www.***.com" appBase="/opt/sites"
  unpackWARs="true" autoDeploy="true"
  xmlValidation="false" xmlNamespaceAware="false">
  <Alias>***.com</Alias>
  <Context path="/" docBase="***.com" workDir="/opt/sites/***.com/work"
  debug="5" reloadable="true" crossContext="true">
  </Context>
  </Host>
  sites-enabled
  =======================================================
==========================
  <VirtlHost *:80>
  ServerName www.***.com
  ServerAlias *.***.com ***.com
  ServerAdmin webmaster@localhost
  DocumentRoot /opt/sites/***.com
  <Directory /opt/sites/***.com>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Order allow,deny
  allow from all
  </Directory>
  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  <Directory "/usr/lib/cgi-bin">
  AllowOverride None
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all
  </Directory>
  ErrorLog /var/log/apache2/***.access.error.log
  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn
  CustomLog /var/log/apache2/***.access.log combined
  Alias /doc/ "/usr/share/doc/"
  <Directory "/usr/share/doc/">
  Options Indexes MultiViews FollowSymLinks
  AllowOverride None
  Order deny,allow
  Deny from all
  Allow from 127.0.0.0/255.0.0.0 ::1/128
  </Directory>
  #       Alias /examples "/usr/share/tomcat6-examples/examples/"
  #       <Directory "/usr/share/tomcat6-examples/examples/">
  #       Options Indexes MultiViews FollowSymLinks
  #       AllowOverride None
  #       Order deny,allow
  #       Allow from all
  #       </Directory>
  #       #禁止访问WEB-INF文件夹
  #       <Directory "/usr/share/tomcat6-examples/examples/WEB-INF">
  #       Order allow,deny
  #       </Directory>
  JkMount /*.jsp ajp13_worker
  JkMount /*.jspx ajp13_worker
  JkMount /*/servlet/* ajp13_worker
  JKMount /*.do ajp13_worker
  </VirtualHost>
  ========================================================
=========================
  # Sample mod_jk configuration
  # for Apache 2
  #
  # for all commands/options available see the manual
  # provided in libapache-mod-jk-doc package.
  # The location where mod_jk will find the workers definitions
  JkWorkersFile   /etc/libapache2-mod-jk/workers.properties
  # The location where mod_jk is going to place its log file
  JkLogFile       /var/log/apache2/mod_jk.log
  # The log level:
  # - info log will contain standard mod_jk activity (default).
  # - warn log will contain non fatal error reports.
  # - error log will contain also error reports.
  # - debug log will contain all information on mod_jk activity
  # - trace log will contain all tracing information on mod_jk activity
  JkLogLevel      info
  # Assign specific URLs to Tomcat. In general the structure of a
  # JkMount directive is: JkMount [URL prefix] [Worker name]
  # send all requests ending in .jsp to ajp13_worker
  JkMount /*.jsp ajp13_worker
  # send all requests ending /servlet to ajp13_worker
  JkMount /*/servlet/ ajp13_worker
  # JkUnmount directive acts as an opposite to JkMount and blocks access
  # to a particular URL. The purpose is to be able to filter out the
  # particular content types from mounted context.
  # do not send requests ending with .gif to ajp13_worker
  #JkUnMount /servlet/*.gif ajp13_worker
  # JkMount / JkUnMount directives can also be used inside <VirtualHost>
  # sections of your httpd.conf file.
  ==========================================================
=======================
  workers.properties
  #Defining a worker named worker1 and of type ajp13
  worker.list=worker1
  # Set properties for worker1
  worker.worker1.type=ajp13
  worker.worker1.host=localhost
  worker.worker1.port=8009
  worker.worker1.lbfactor=50
  worker.worker1.cachesize=10
  worker.worker1.cache_timeout=600
  worker.worker1.socket_keepalive=1
  worker.worker1.socket_timeout=300
  ~

广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved