熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> Java核心技術 >> 正文

Java如何設置ClassPath路徑

2022-06-13   來源: Java核心技術 

  因為有很多漢字需要編碼所以選擇gbk

  ============================================================================

  URIEncoding=GBK

  /etc/profile

  =============================================================================

  export PATH

  export JAVA_HOME=/usr/lib/jvm/javasun

  export CLASSPATH=:$JAVA_HOME/lib/dtjar:$JAVA_HOME/lib/toolsjar:$JAVA_HOME/lib/mysqlconnectorjavabinjar

  umask

  export APACHE_RUN_USER=wwwdata

  export APACHE_RUN_GROUP=wwwdata

  export APACHE_PID_FILE=/var/run/apachepid

  serverxml

  ==============================================================================

  <Host name=www** appBase=/opt/sites

  unpackWARs=true autoDeploy=true

  xmlValidation=false xmlNamespaceAware=false>

  <Alias>**</Alias>

  <Context path=/ docBase=** workDir=/opt/sites/**/work

  debug= reloadable=true crossContext=true>

  </Context>

  </Host>

  sitesenabled

  =================================================================================

  <VirtlHost *:>

  ServerName www**

  ServerAlias *** **

  ServerAdmin webmaster@localhost

  DocumentRoot /opt/sites/**

  <Directory /opt/sites/**>

  Options Indexes FollowSymLinks MultiViews

  AllowOverride None

  Order allowdeny

  allow from all

  </Directory>

  ScriptAlias /cgibin/ /usr/lib/cgibin/

  <Directory /usr/lib/cgibin>

  AllowOverride None

  Options +ExecCGI MultiViews +SymLinksIfOwnerMatch

  Order allowdeny

  Allow from all

  </Directory>

  ErrorLog /var/log/apache/***accesserrorlog

  # Possible values include: debug info notice warn error crit

  # alert emerg

  LogLevel warn

  CustomLog /var/log/apache/***accesslog combined

  Alias /doc/ /usr/share/doc/

  <Directory /usr/share/doc/>

  Options Indexes MultiViews FollowSymLinks

  AllowOverride None

  Order denyallow

  Deny from all

  Allow from / ::/

  </Directory>

  #       Alias /examples /usr/share/tomcatexamples/examples/

  #       <Directory /usr/share/tomcatexamples/examples/>

  #       Options Indexes MultiViews FollowSymLinks

  #       AllowOverride None

  #       Order denyallow

  #       Allow from all

  #       </Directory>

  #       #禁止訪問WEBINF文件夾

  #       <Directory /usr/share/tomcatexamples/examples/WEBINF>

  #       Order allowdeny

  #       </Directory>

  JkMount /*jsp ajp_worker

  JkMount /*jspx ajp_worker

  JkMount /*/servlet/* ajp_worker

  JKMount /*do ajp_worker

  </VirtualHost>

  =================================================================================

  # Sample mod_jk configuration

  # for Apache

  #

  # for all commands/options available see the manual

  # provided in libapachemodjkdoc package

  # The location where mod_jk will find the workers definitions

  JkWorkersFile   /etc/libapachemodjk/workersproperties

  # The location where mod_jk is going to place its log file

  JkLogFile       /var/log/apache/mod_jklog

  # 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 ajp_worker

  JkMount /*jsp ajp_worker

  # send all requests ending /servlet to ajp_worker

  JkMount /*/servlet/ ajp_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 ajp_worker

  #JkUnMount /servlet/*gif ajp_worker

  # JkMount / JkUnMount directives can also be used inside <VirtualHost>

  # sections of your file

  =================================================================================

  workersproperties

  #Defining a worker named worker and of type ajp

  workerlist=worker

  # Set properties for worker

  workerworkertype=ajp

  workerworkerhost=localhost

  workerworkerport=

  workerworkerlbfactor=

  workerworkercachesize=

  workerworkercache_timeout=

  workerworkersocket_keepalive=

  workerworkersocket_timeout=

  ~


From:http://tw.wingwit.com/Article/program/Java/hx/201311/26600.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.