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. <转>exe & dll自我更新

    exe & dll自我更新 分类: c/c++ 2008-10-16 22:07 756人阅读 评论(1) 收藏 举报 exedlldelayapi游戏 exe与dll的自我更新     在改 ...

  2. Codeforces #380 div2 E(729E) Subordinates

    E. Subordinates time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...

  3. DFS security warning and use group policy to set up internet security zones

    Opening a file from a DFS domain share shows a security warning while openning from the server share ...

  4. Hyper-V初涉:Hyper-V虚拟机常规操作

    a. 连接到虚拟机与开机 在Hyper-V管理器中双击待启动的虚拟机或在待启动的虚拟机上右键选择"启动"即可完成连接虚拟机的操作. 若此时虚拟机正在运行则直接进入虚拟机界面,若虚拟 ...

  5. C#学习之Stream

    上节课老师主要讲了stream及其一些运用和实例,下面我们就来讨论讨论Stream. 我们知道,C#中常用的stream有文件流(FileSteam),内存流(MemoryStream),压缩流(GZ ...

  6. java war包加载提示jar not loaded

    今天在开发的时候,项目需要加载Guvnor的war包.War包部署后,启动tomcat提示jar not load 后来查阅资料后发现是Jar包冲突导致的,冲突的Jar包在tomcat中已经存在,然后 ...

  7. postfix下dovecot查收邮件连接错误

    [root@localhost ~]# telnet mail.izyno.com 110 Trying 192.168.199.133... Connected to mail.izyno.com. ...

  8. mfc

    (1)编写mfc程序的基本步骤: 1.资源编辑: 2.关联控件变量: 3.编写新的类和成员函数: 4.添加消息处理函数. (2)消息映射机制: (3)常用控件: (4)界面美化:

  9. php+redis window

    http://download.csdn.net/detail/qwfy326/6572443 wampserver2.2e-php5.3.13-httpd2.2.22-mysql5.5.24-x64

  10. js中的深复制和浅复制

    在实际情况中经常会遇到对对象复制的问题.比如在处理项目中的一笔多结构的数据存储或者调用,这个时候你就要对对象(json)进行操作,而不同的操作根据不同的需求来定义.其中最常见最普遍的是对对象的复制,重 ...