Explanations of Functionalities:

1. PATH env variable

It is used to search the command directory when we use the console type commands. We only can use the javac and java command anywhere after the jdk\bin and jdk\jre\bin directory have been added in to the PATH env variable.

E.g. "C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program Files\Java\jdk1.6.0_21\jre\bin", the ';' is the separator between env variables.

2. CLASSPATH env variable

It is used to search the known classes, which include the default classes used by JVM and the current classes we created. Thus we add '.' directory including the classes in current directory, and the jdk\lib\dt.jar and jdk\lib\tools.jar including the default classes JVM will use.

E.g. ".;C:\Program Files\Java\jdk1.6.0_21\lib\dt.jar;C:\Program Files\Java\jdk1.6.0_21\lib\tools.jar".

3. JAVA_HOME env variable

It is used to indicate the directory of jdk. Many softwares like Eclipse, NetBeans, Tomcat will use this env variable to execute jdk.

E.g, "C:\Program Files\Java\jdk1.6.0_21".

Concrete Steps:

As all the env variables will involve the directory of jdk, we can set the JAVA_HOME first. Then we can use the %JAVA_HOME% make other env variables setting simple.

1. JAVA_HOME=C:\Program Files\Java\jdk1.6.0_21

2. PATH=%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin

3. CLASSPATH=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar

.

Java environment variables and their functionality的更多相关文章

  1. How to set JAVA environment variables in Linux or CentOS

    How to set JAVA environment variables JAVA_HOME and PATH in Linux After installing new java (jdk or ...

  2. Java Environment Setting

    As a non-Java developer, I am quit stuck in Java environment setting because I am not familiar with ...

  3. CVE: 2014-6271、CVE: 2014-7169 Bash Specially-crafted Environment Variables Code Injection Vulnerability Analysis

    目录 . 漏洞的起因 . 漏洞原理分析 . 漏洞的影响范围 . 漏洞的利用场景 . 漏洞的POC.测试方法 . 漏洞的修复Patch情况 . 如何避免此类漏洞继续出现 1. 漏洞的起因 为了理解这个漏 ...

  4. Debian Environment Variables

    原文:EnvironmentVariables General Environment variables are named strings available to all application ...

  5. How to keep Environment Variables when Using SUDO

    The trick is to add environment variables to sudoers file via sudo visudo command and add these line ...

  6. Environment Variables

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx Every process has an ...

  7. [Whole Web, Nods.js, PM2] Passing environment variables to node.js using pm2

    learn how to pass environment variables to your node.js app using the pm2 config file. This is usefu ...

  8. List environment variables from Command Prompt

    Request: List the environment variables from Command Promt To list one varibales , the syntax is lik ...

  9. [NPM] Execute npx commands with $npm_ Environment Variables

    We will incorporate npm specific environment variables when executing various npx commands. In our e ...

随机推荐

  1. A List of Social Tagging Datasets Made Available for Research

    This list is not exhaustive - help expand it! Social Tagging Systems Research Group Source Year Obta ...

  2. Oracle Blob 字段的模糊查询

    原文地址:http://blog.csdn.net/springk/article/details/6866248

  3. debian下使用gitosis+gitweb搭建SSH认证的git服务器

    搭建完成Git服务器后,需要使用两台机器进行测试,一台机器作为服务器端server,一台服务器作为客户端client.整个系统,需要三个计算机账户,这里假设server端的账户名为git,client ...

  4. easyui的datagrid行的某一列添加链接

    通过formatter方法给easyui 的datagrid 每行增加操作链接. 效果图 jsp代码: <th field="url" width="100&quo ...

  5. rdc21n(研发与设计综合讨论)博客开通了!

    rdc21n是“Research and Design Comprehensive discussioN”,其中21表示Comprehensive discussioN中间的21个字母(不包含空格), ...

  6. Teamcenter 2007 "由于某些意外的 DBMS 错误失败"

    PLM系统实施过程中经常需要做整个系统的克隆备份.Teamcenter2007在做基于Oracel的系统克隆时,用exp功能导出数据表,部署在目标机器上时会遇到DBMS错误,导致后续DB写操作无法进行 ...

  7. jdk1.6 webService 客户端代码生成和测试

    参数:测试webService的地址:http://10.113.11.1:9090/enocpService/buildingEngService?wsdl 1,eclipse中新建一个项目, 2, ...

  8. Android学习地址

    Google Android官方培训课程中文版http://hukai.me/android-training-course-in-chinese/

  9. OSD磁盘日常监控

    摘要:对ceph OSD磁盘,做好定期的性能数据采集和通电时长管理,长期的数据积累对磁盘的性能与生命周期管理会有一定帮助,同时也能确保整个集群性能的稳定. 磁盘碎片管理 查看磁盘碎片 # xfs_db ...

  10. wordpress搬家换域名

    很多朋友开始接触wordpress都是在本地安装调试好了,再上传到服务器正常运营,我也是一样当我在本地测试好了准备将网站上线,在搬家到服务器的时候遇到过的一些问题,记录分享一下我是如何为wordpre ...