java

位置:IT落伍者 >> java >> 浏览文章

Java如何设置ClassPath路径


发布日期:2018年05月23日
 
Java如何设置ClassPath路径

因为有很多汉字需要编码所以选择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=

~

               

上一篇:java的内部类与匿名内部类

下一篇:java获得当前系统内存及硬盘使用情况