jdk与tomcat环境变量配置
来源:互联网 发布:女孩子做淘宝客服好吗 编辑:程序博客网 时间:2024/05/16 09:56
1.配置JDK
需要在"http://www.oracle.com/technetwork/java/javase/downloads/index.html" 下载JDK,然后安装在自定义文件夹下面,此处安装在“C:\MYOWN_THINGS\software_install\jdk1.7”,安装好JDK后,再配置JDK的环境变量:
在“我的电脑”上点右键—>“属性”—>“高级”—> “环境变量(N)”。
新建系统变量JAVA_HOME:C:\MYOWN_THINGS\software_install\jdk1.7;
新建系统变量CLASSPATH:.;%JAVA_HOME%/lib;(注意:点号表示当前目录,不能省略)
在系统变量Path的值的前面加入以下内容:%JAVA_HOME%/bin;(注意:这里的分号不能省略)
2.配置Tomcat
在"http://tomcat.apache.org/"下载好tomcat,此处用的是apache-tomcat-7.0.11-windows-x86.zip,这个版本也是免安装的,直接解压到自定义目录就可以了,此处用的是"C:\MYOWN_THINGS\software_install\apache-tomcat-7.0.11",安装好Tomcat后,再配置Tomcat的环境变量:
在“我的电脑”上点右键—>“属性”—>“高级”—> “环境变量(N)”。
新建系统变量CATALINA_HOME:C:\MYOWN_THINGS\software_install\apache-tomcat-7.0.11
在系统变量CLASSPATH的值的后面加入:%CATALINA_HOME%/lib;
在系统变量Path的值中"%JAVA_HOME%/bin;"的后面加入以下内容:%CATALINA_HOME%/bin;
3.测试JDK
打开cmd进行测试JDK是否配置成功:
分别输入java与javac,现在出下面的东西则配置成功,有的人输入javac之后现在的是中文版的,这个是正常的哈。
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for m
ore details.
C:\Documents and Settings\Administrator>javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files and annotati
on processors
-cp <path> Specify where to find user class files and annotati
on processors
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-proc:{none,only} Control whether annotation processing and/or compil
ation is done.
-processor <class1>[,<class2>,<class3>...] Names of the annotation processors
to run; bypasses default discovery process
-processorpath <path> Specify where to find annotation processors
-d <directory> Specify where to place generated class files
-s <directory> Specify where to place generated source files
-implicit:{none,class} Specify whether or not to generate class files for
implicitly referenced files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-Akey[=value] Options to pass to annotation processors
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
-Werror Terminate compilation if warnings occur
@<filename> Read options and filenames from file
4.测试Tomcat
双击bin/startup.dat成功后,在浏览器中输入http://localhost:8080,如果出现tomcat的欢迎页面,则配置成功。
- JDK与TOMCAT环境变量配置
- jdk与tomcat环境变量配置
- JDK与Tomcat环境变量配置
- JDK与Tomcat安装的环境变量配置
- JDK与TOMCAT的环境变量配置
- JDK与tomcat的环境变量配置
- JDK与Tomcat的环境变量配置
- JDK与Tomcat的环境变量配置
- jdk 1.7与Tomcat环境变量配置
- JDK与Tomcat环境变量的配置
- jdk、tomcat环境变量配置
- tomcat jdk环境变量配置
- JDK+tomcat 环境变量配置
- jdk,tomcat环境变量配置
- JDK+tomcat 环境变量配置
- JDK Tomcat 环境变量配置
- JDK+Tomcat 环境变量配置---
- JDK+tomcat 环境变量配置
- Linux awk 命令 说明
- 两个字符串相乘
- php实现自动获取生成文章主题关键词功能-简易分词
- tizen开发(1)- app卸载,启动与源码
- android使用不同的方式弹出窗口
- jdk与tomcat环境变量配置
- 如何安装Windows版Memcache
- Let’s Play Games!
- 2012年10月9号阿里巴巴笔试(c++)(修改)
- ImageButton 屏蔽掉父类click消息
- 一些缓存及用法
- jQuery乱谈(三)
- Apple 企业开发者账号&邓白氏码申请记录
- 实现半透明的popupwindow的源码