Windows 环境变量
- 格式:docx
- 大小:16.75 KB
- 文档页数:9
Windows cmd 中的环境变量配置与管理指南在Windows操作系统中,环境变量是一种非常重要的配置项,它们可以为系统和应用程序提供必要的信息和路径。
环境变量的配置和管理对于系统的正常运行和应用程序的顺利使用至关重要。
本文将为大家介绍Windows cmd中的环境变量配置与管理指南。
一、什么是环境变量?环境变量是操作系统为了方便用户和应用程序的使用而设置的一些全局变量。
它们存储了一些系统路径、配置信息和临时数据等。
通过环境变量,我们可以在任何地方轻松访问这些信息,而不需要输入完整的路径或配置参数。
二、环境变量的分类在Windows系统中,环境变量可以分为系统变量和用户变量两类。
1. 系统变量:系统变量是对所有用户都可见的变量,它们存储了系统的一些重要路径和配置信息。
例如,系统变量"Path"存储了系统的可执行文件路径,系统变量"TEMP"存储了临时文件的存放路径。
2. 用户变量:用户变量是针对每个用户的个性化配置,每个用户可以根据自己的需要设置自己的用户变量。
例如,用户变量"JAVA_HOME"可以指定Java的安装路径,用户变量"PYTHON_HOME"可以指定Python的安装路径。
三、环境变量的配置与管理1. 配置环境变量:要配置环境变量,首先需要打开系统的环境变量配置界面。
可以通过以下步骤打开:a. 右键点击"此电脑"(或"我的电脑"),选择"属性"。
b. 在系统属性窗口中,点击"高级系统设置"。
c. 在弹出的窗口中,点击"环境变量"按钮。
2. 管理系统变量:在环境变量配置界面中,可以添加、编辑和删除系统变量。
如果需要添加一个新的系统变量,点击"新建"按钮,在弹出的对话框中输入变量名和变量值即可。
利用Windows CMD命令进行环境变量配置在Windows操作系统中,环境变量是一种非常重要的配置,它们定义了系统和应用程序运行所需的路径和设置。
通过正确地配置环境变量,可以提高系统的性能和效率。
本文将介绍如何使用Windows CMD命令来进行环境变量配置。
一、了解环境变量在开始配置环境变量之前,我们需要了解一些基本的概念。
在Windows中,环境变量分为系统变量和用户变量两种类型。
系统变量适用于所有用户,而用户变量只适用于当前登录用户。
环境变量的配置是通过设置变量名和变量值来实现的。
变量名是一个唯一的标识符,用于在系统中引用该变量。
变量值是与变量名关联的具体数值或路径。
二、查看和编辑环境变量在Windows中,我们可以使用CMD命令行工具来查看和编辑环境变量。
首先,我们需要打开CMD命令行工具。
可以通过按下Win+R键,然后输入“cmd”并按下回车键来打开CMD窗口。
要查看当前的环境变量,可以使用“echo %变量名%”命令。
例如,要查看系统的Path变量,可以输入“echo %Path%”。
要编辑环境变量,可以使用“setx 变量名变量值”命令。
例如,要将一个新的路径添加到系统的Path变量中,可以输入“setx Path "%Path%;新路径"”。
请注意,这里的双引号是必需的,以防止路径中包含空格或特殊字符。
三、配置系统变量系统变量适用于所有用户,对整个系统起作用。
配置系统变量可以为系统提供全局的设置和路径。
要配置系统变量,我们可以使用“setx”命令。
例如,要将一个名为JAVA_HOME的系统变量设置为Java安装目录的路径,可以输入“setxJAVA_HOME "C:\Program Files\Java\jdk"”。
配置完系统变量后,需要重新启动计算机才能使其生效。
四、配置用户变量用户变量只适用于当前登录用户,对其他用户无效。
配置用户变量可以为当前用户提供个性化的设置和路径。
Windows CMD命令中的环境变量管理方法在Windows操作系统中,环境变量是一种非常重要的系统配置信息,它们用于存储一些系统路径、程序路径、临时文件路径等。
环境变量的设置对于系统的正常运行和应用程序的顺利执行起着至关重要的作用。
本文将介绍一些常用的Windows CMD命令中的环境变量管理方法,帮助读者更好地了解和掌握这一方面的知识。
一、查看环境变量在CMD命令行中,可以通过输入"set"命令来查看当前系统的所有环境变量。
这些环境变量将按照字母顺序依次列出,并显示其对应的值。
通过查看环境变量,我们可以了解系统中已经设置的环境变量,并能够对其进行进一步的管理和修改。
二、设置环境变量1. 临时设置环境变量在CMD命令行中,可以使用"set"命令来临时设置环境变量。
例如,要将一个名为"PATH"的环境变量设置为"C:\Program Files\Java\jdk1.8.0_221\bin",可以输入以下命令:```set PATH=C:\Program Files\Java\jdk1.8.0_221\bin```这样就临时将"PATH"环境变量设置为指定的路径。
这种设置只在当前CMD窗口中有效,关闭窗口后将失效。
2. 永久设置环境变量要永久设置环境变量,需要在系统的"高级系统设置"中进行操作。
具体步骤如下:- 右击"计算机"(或"此电脑")图标,选择"属性"。
- 在左侧导航栏中,点击"高级系统设置"。
- 在弹出的窗口中,点击"环境变量"按钮。
- 在"用户变量"或"系统变量"下方的列表中,点击"新建"按钮。
- 在弹出的对话框中,输入环境变量的名称和值,点击"确定"按钮。
利用Windows CMD命令管理系统环境变量在Windows操作系统中,环境变量是一种非常重要的配置项,它可以影响系统的行为和功能。
通过合理配置环境变量,我们可以为系统提供更好的运行环境,提高工作效率。
而Windows CMD命令是管理和配置环境变量的一种常用方式。
本文将介绍如何利用Windows CMD命令来管理系统环境变量。
1. 查看系统环境变量首先,我们需要了解当前系统的环境变量配置情况。
在CMD命令行中,输入“set”命令,即可列出当前用户的所有环境变量及其对应的值。
这些环境变量包括系统级别和用户级别的。
系统级别的环境变量对所有用户生效,而用户级别的环境变量仅对当前用户生效。
2. 添加新的环境变量如果我们需要添加一个新的环境变量,可以使用“setx”命令。
例如,我们要添加一个名为“MY_PATH”的环境变量,其值为“C:\Program Files\MyApp”,可以使用以下命令:setx MY_PATH "C:\Program Files\MyApp"请注意,使用“setx”命令添加的环境变量需要重新启动CMD窗口才能生效。
如果想要立即生效,可以使用“set”命令设置当前会话的环境变量,但该设置仅对当前CMD窗口有效。
3. 修改环境变量的值如果我们需要修改一个已存在的环境变量的值,可以使用“setx”命令或“set”命令。
使用“setx”命令修改环境变量的值,与添加新的环境变量类似,只需将新的值赋给环境变量即可。
使用“set”命令修改环境变量的值,可以直接在CMD命令行中输入“set 环境变量名=新值”的形式,例如:set MY_PATH=C:\NewPath这样就将“MY_PATH”环境变量的值修改为“C:\NewPath”。
4. 删除环境变量如果我们需要删除一个环境变量,可以使用“setx”命令或“set”命令。
使用“setx”命令删除环境变量,只需将环境变量的值设置为空即可,例如:setx MY_PATH ""使用“set”命令删除环境变量,可以使用“set 环境变量名=”的形式,例如:set MY_PATH=5. 环境变量的作用范围在Windows操作系统中,环境变量的作用范围有系统级别和用户级别之分。
解析Windows cmd命令中的环境变量用法在Windows操作系统中,环境变量是一种非常重要的概念。
它们是操作系统用来存储和访问各种系统和用户相关信息的方法。
通过环境变量,我们可以轻松地获取系统路径、用户名、计算机名称等信息。
在cmd命令行中,我们可以使用一些特殊的命令和符号来操作环境变量,这些操作对于系统管理和脚本编写非常有帮助。
1. 查看环境变量要查看当前系统的环境变量,可以使用命令"set"。
在命令行中输入"set",系统会列出所有的环境变量及其对应的值。
这对于了解系统的配置和调试脚本非常有用。
2. 设置环境变量要设置一个新的环境变量,可以使用命令"set 变量名=值"。
例如,要设置一个名为"MYVAR"的环境变量,可以输入"set MYVAR=value"。
设置环境变量后,可以通过"%变量名%"的方式来引用它。
例如,"%MYVAR%"将返回该环境变量的值。
3. 使用系统默认的环境变量在cmd命令中,系统提供了一些默认的环境变量,可以直接使用。
其中一些常用的环境变量包括:- %USERPROFILE%:当前用户的个人文件夹路径。
- %USERNAME%:当前用户的用户名。
- %TEMP%:临时文件夹的路径。
- %SYSTEMROOT%:Windows系统文件夹的路径。
通过使用这些环境变量,我们可以方便地引用一些系统相关的路径和信息,而不需要硬编码它们。
4. 扩展环境变量有时候,我们可能需要在环境变量的值中引用其他的环境变量。
在cmd命令中,可以使用"%"符号来扩展环境变量。
例如,"%PATH%"将返回系统的路径变量的值。
这对于编写复杂的脚本和命令非常有用。
5. 环境变量的作用范围在Windows操作系统中,环境变量分为用户级别和系统级别两种。
Windows CMD命令的环境变量设置与使用技巧在Windows操作系统中,CMD命令是一种非常强大的工具,它可以通过命令行操作来完成各种任务。
而环境变量则是CMD命令中的一个重要概念,它可以帮助我们更方便地使用CMD命令。
本文将介绍Windows CMD命令的环境变量设置与使用技巧,帮助读者更好地掌握CMD命令。
一、什么是环境变量环境变量是一种在操作系统中定义的一些变量,它们存储着一些系统运行所需的信息。
在Windows中,环境变量可以用来存储一些常用的路径、配置信息等。
通过设置环境变量,我们可以在CMD命令中直接使用这些变量,而不需要输入完整的路径或配置信息。
二、设置环境变量要设置环境变量,首先需要打开“控制面板”,然后点击“系统和安全”,再点击“系统”,在弹出的窗口中点击“高级系统设置”。
接着,在弹出的窗口中点击“环境变量”按钮,即可进行环境变量的设置。
在环境变量设置窗口中,有两个列表,分别是“用户变量”和“系统变量”。
用户变量只对当前用户有效,而系统变量对所有用户有效。
我们可以根据需要选择在哪个列表中添加环境变量。
要添加一个环境变量,只需要点击对应列表下方的“新建”按钮,然后输入变量名和变量值即可。
变量名是一个用来标识环境变量的名称,而变量值则是该环境变量的具体内容。
设置好后,点击“确定”按钮保存设置。
三、使用环境变量设置好环境变量后,我们就可以在CMD命令中使用这些变量了。
在CMD命令中,我们可以通过%变量名%的方式来引用环境变量。
例如,如果我们设置了一个名为“JAVA_HOME”的环境变量,它的值是Java的安装路径,那么我们可以在CMD命令中使用%JAVA_HOME%来表示这个路径。
使用环境变量可以帮助我们简化命令的输入,提高工作效率。
例如,如果我们需要经常使用Java的编译器(javac)来编译Java源代码,我们可以将Java的安装路径设置为一个环境变量,然后在CMD命令中使用%JAVA_HOME%\bin\javac来调用编译器,而不需要输入完整的路径。
windows环境变量path的常用值1. C:\Windows\system32这个路径是Windows系统的核心组件所在的目录。
它包含了许多重要的系统文件,例如命令行工具、系统服务和设备驱动程序。
这个路径在Path中的作用是让系统能够快速找到并运行这些文件。
2. C:\Program Files这个路径是用于安装应用程序的默认目录。
当我们在Windows上安装一个软件时,它通常会将自己的可执行文件和相关资源文件放在这个目录下。
将这个路径加入到Path中可以让系统在任意位置访问到这些程序。
3. C:\Program Files\Common Files这个路径是用于存放多个程序共享的文件和资源的目录。
许多软件都会使用这个目录来存放共享的库文件、配置文件和其他资源。
将这个路径加入到Path中可以让系统在任意位置找到这些共享文件。
4. C:\Windows这个路径是Windows操作系统的安装目录。
它包含了系统的核心文件和配置文件。
将这个路径加入到Path中可以让系统在任意位置找到这些系统文件,以便正常运行和维护。
5. C:\Windows\System32\Wbem这个路径是Windows系统管理和监控工具的目录。
Wbem是Windows Management Instrumentation(WMI)的一部分,它提供了管理和监控Windows系统的功能。
将这个路径加入到Path 中可以让系统在任意位置找到WMI工具,并使用它们来管理系统。
6. C:\Windows\System32\WindowsPowerShell\v1.0这个路径是Windows PowerShell的安装目录。
Windows PowerShell是一种强大的命令行工具,用于自动化和管理Windows系统。
将这个路径加入到Path中可以让系统在任意位置运行PowerShell命令。
7. C:\ProgramData\Oracle\Java\javapath这个路径是Java运行环境(JRE)的安装目录。
Windows使⽤cmd命令⾏中查看、修改、删除与添加环境变量您可以在cmd中使⽤SET,显⽰或设置环境变量。
⼀、查看环境变量1、查看当前所有可⽤的环境变量输⼊ set 即可查看。
2、查看某个环境变量输⼊ “set 变量名”即可。
⽐如想查看path变量的值,即输⼊ set path⼆、修改环境变量注意:所有的在cmd命令⾏下对环境变量的修改只对当前窗⼝有效,不是永久性的修改。
也就是说当关闭此cmd命令⾏窗⼝后,将不再起作⽤。
永久性修改环境变量的⽅法有两种:⼀种是直接修改注册表,另⼀种是通过我的电脑-〉属性-〉⾼级,来设置系统的环境变量(查看详细)。
1、修改环境变量输⼊ “set 变量名=变量内容”即可。
⽐如将path设置为“d:\nmake.exe”,只要输⼊set path="d:\nmake.exe"。
注意,此修改环境变量是指⽤现在的内容去覆盖以前的内容,并不是追加。
⽐如当我设置了上⾯的path路径之后,如果我再重新输⼊set path="c",再次查看path路径的时候,其值为“c:”,⽽不是“d:\nmake.exe”;“c”。
2、设置为空:如果想将某⼀变量设置为空,输⼊“set 变量名=”即可。
如“set path=” 那么查看path的时候就为空。
注意,上⾯已经说了,只在当前命令⾏窗⼝起作⽤。
因此查看path的时候不要去右击“我的电脑”——“属性”........3、给变量追加内容输⼊“set 变量名=%变量名%;变量内容”。
(不同于3,那个是覆盖)。
如,为path添加⼀个新的路径,输⼊“ setpath=%path%;d:\nmake.exe”即可将d:\nmake.exe添加到path中,再次执⾏"set path=%path%;c:",那么,使⽤set path语句来查看的时候,将会有:d:\nmake.exe;c:,⽽不是像第3步中的只有c:。
环境变量的配置方法环境变量是操作系统中存储的一组特定值,用于指定应用程序的运行环境、系统配置和用户配置等。
在不同的操作系统中,环境变量的配置方法也有所不同。
本文将详细介绍环境变量的配置方法,并以Windows、Linux和Mac三个常见的操作系统为例。
1. Windows 环境变量的配置方法:-打开“控制面板”,选择“系统”或“系统和安全”。
-点击“系统”,再点击左侧的“高级系统设置”。
-在弹出的对话框中,点击“环境变量”按钮。
-在“系统变量”区域,点击“新建”按钮。
-在弹出的对话框中,输入变量名和变量值,然后点击“确定”。
-在“用户变量”区域,也可以添加用户级别的环境变量。
-点击“确定”关闭对话框,并重启计算机使变量生效。
2. Linux 环境变量的配置方法:- 在文件的末尾添加类似于“exportVARIABLE_NAME=variable_value”的行,定义环境变量。
- 在终端中运行“source .bashrc”或“source .profile”命令,使新的环境变量生效。
- 可以在/etc/environment文件中设置全局环境变量,但需要root 权限。
3. Mac 环境变量的配置方法:- 在文件的末尾添加类似于“exportVARIABLE_NAME=variable_value”的行,定义环境变量。
- 在终端中运行“source .bash_profile”或“source .bashrc”命令,使新的环境变量生效。
除了以上操作系统的配置方法外,还有一些其他的配置方式:- 几乎所有的操作系统都支持在命令行中使用“set”或“export”命令来设置临时环境变量。
- 在一些开发工具中,还可以通过图形界面来设置环境变量,如Eclipse、IntelliJ IDEA等。
- 在一些软件的安装过程中,会提示设置环境变量,如Java、Python等。
需要注意的是,设置环境变量时需要谨慎,避免设置错误引起系统或应用程序的异常。
Windows System Environment VariablesThese system environment variables are automatically created by Windows upon boot-up in Windows Registry key HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\ Session Manager\ EnvironmentVariable Sample Typical Value%SystemDrive% C:%SystemRoot% C:\WINDOWSC:\WINNT%WinDir% C:\WINDOWSC:\WINNT%SystemDirectory% C:\WINDOWS\System32C:\WINNT\System32%ComSpec% C:\WINDOWS\system32\cmd.exeThe path including the command interpreter program.%programfiles% C:\WINDOWS\Program Files%Temp% C:\Users\W\AppData\Local\Temp on Windows Vista & 2008C:\DOCUME~1\Usr\LOCALS~1\Temp (compressed form of)C:\Documents and Settings\Usr\Local Settings\Temp%Tmp%%HOMEDRIVE% C: The drive letter associated with the user's home directory%HOMEPATH% The path to the user's home directory as defined in UMD/AD (excluding drive):\Users\<USERNAME> on Windows Vista & 2008\Documents and Settings\Guest on Windows XP%OS% Windows_NT (even on Windows Vista & XP machinesThe operating system the user is running%USERDOMAIN% The name of the domain that contains the user's account. On a stand-alone machine, the same as the machine name.%USERNAME% The user's name%USERPROFILE% C:\Users\<USERNAME> — The user's root folder%USERPROFILE%\Desktop The user's desktop folderIf you have the permissions, invoke, then open my DOS batch file 1envvars.bat which lists the values of these variables on your computerWindows resolves commands typed in the start/run box first from files in %SYSTEMDRIVE%, then files in %SYSTEMROOT%. This is regardless of the systemdrive (such as E:) being later in the path. This means that a rogue file can be invoked instead of a good file (such as cmd.exe) if it's in the %SYSTEMDRIVE%.Below are dynamic environment variables:Variable Sample Typical Value%CD% The current directory.%DATE% Current date in the format set by the Date command%TIME% Current time in the format set by the Time command%ERRORLEVEL% A number defining exit status of a previous command or called executable.%RANDOM% A random number between 0 and 32767.You can quickly reach the folder specified within an environment variable by typing that variable on the Address bar of Windows Explorer:User Environment Variables Added by ApplicationsUser environment variables are stored in Windows Registry HKEY_CURRENT_USER\EnvironmentWithin a command batch file, to list Oracle Environment Variablesecho ORACLE_SID = %ORACLE_SID%echo ORACLE_HOME = %ORACLE_HOME%echo ORA_NLS = %ORA_NLS%echo.echo PATH = %PATH%echo.echo Machine Name to messenger service:net nameNovell adds these environment variables during installation.Variable%USER%%NWUSERNAME%%NWLANGUAGE%Creating Variables on WindowsEnvironment Variables can be created and changed using several mechanisms:By Windows automatically upon boot-up.By application programs using Windows OS API functions. This is commonly done by application installation programs.Manually using GUI in System Properties, Advanced tab, Environment Variable button. Get to this one of two ways:a). right-click My Computer icon, select Properties,b). click Start > Control Panel > System iconClick the Advanced tab, New for a new variable or Edit for an existing variable listed.System variables are available to all users.Manually using commands typed into the DOS Command Window obtained one of two ways:a). click Programs | Accessories | Command Promptb). click Run..., type cmd and press Enter.To see all variables, type:SETWindows uses a tilde ~ character to substitute for parts of file and folder names longer than 8 characters.To use the SET command to define a single variable:SET CLASSPATH=.;path1The dot specifies the current directory. The semicolon separates two folders. If the variable was already established, this will replace its value.To add a value in front of the existing value, refer to itself:SET CLASSPATH=path1;%CLASSPATH%Variables created with SET are only valid for the current session and will not be available after the command window is closed or the computer reboots.By commands executed from within an AUTOEXEC.BAT file or host script filerun this sample logon.bat file. (Click Open when prompted. Your firewall may -- rightfully -- block this.)MS PATHThe operating system looks for executables down the list of folders listed in the PATH User variable. The operating system uses the first occurance it finds. So watch out for multiple versions of the same program. For example, the Oracle install automatically adds:Program Files\Oracle\JRE\1.1.7\Bin;To enable command line invocation of compiler program csc.exe of the Microsoft .NET Framework, add this to the end of your PATH environment variable.ClickRight-click on "My Computer" to select Properties.Click the "Advanced" tab.Click the "Environment Variable" button.Scroll down the "System variables" list to the "Path" variable.Double click on "Path"Press the "End" keyType (beginning with a semicolon separator) ;%systemroot%\Framework\v1.1.4322Click "OK"Click "OK" to close the System Properties window.Verify the change:ClickClick Run... for a Run window.Type "cmd" in the Open: field.Click "OK"Type a command such as "csc"You are unsuccessful if you get back a response such as'csc' is not recognized as an internal or external command,operable program or batch file.To spare its users, most commercial applications provide an installer which does this automatically. For example, Microsoft .NET Framework SDK has a vcvars32.bat file to update paths on Windows 9x machines.Avoid spaces in path names (for backward compatibility and to avoid trouble) by using the 8 character equivalents.For example, to reachC:\Program Files\Mercury Interactive\Mercury LoadRunner\binspecifyC:\PROGRA~1\MERCUR~1\MERCUR~1\binThe sequence in my PATH:C:\PROGRA~1\Java\jdk1.5.0_02\bin;C:\PROGRA~1\MERCUR~1\MERCUR~1\classes;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%systemroot%\\Framework\v1.1.4322;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin;c:\program files\microsoft platform sdk for windows xp sp2\includeUNIX Environment VariablesIn UNIX/Linux systems, to list environment variables:envIn UNIX/Linux systems, add a dollar sign ($) in front of each variable name in all caps:echo $LOGNAME user name used for loginecho $USER user name (sudo)echo $UID user name Solarisecho $SHELL directory containing OS shell executablesecho $PATH directories containing executables, searched to find applications when no absolutepath is specified on the command line.echo $LD_LIBRARY_PATH path to system and user librariesecho $MANPATH directory containing manualsecho $HOME directory of user's home directoryecho $TZ time zone, such as "US/Mountain"In UNIX systems, the colon (:). In Windows systems, the semi-colon (;) is used. So to list each path in a separate line:echo $PATH | tr ':' '\n'Solaris systems have additional ones, including:echo $BASH path to the shell on the file system.echo $HOSTNAME name of the current system.echo $PPID parent process IDecho $WINDOWMANAGER name of the X11 window managerecho $COLUMNS The column width for the terminalecho $DISPLAY The display variable used for X11 graphics.Creating Variables on LinuxTo update an environment variable that lives until the next reboot:#export PATH=�/usr/local/XXX/bin:$PATH�#echo $PATHNotice that colons are used to separate path items.To create an environment variable that lives forever, update your .bash_profile file:XXXPATH=�/usr/local/XXX/bin�export XXXPATHFor a list of environment settings (arguments) for a process with PID 23141 (on Solaris):pargs -ae 23141Java Environment VariablesJDK versions 1.2 and 1.3 require variables Xrunmic_supp and Xbootclasspath %mic_class%The Java interpreter searches the PATH for a class by name and loads the first one it finds. So specify your own library and the most recent library first (especially if you use the same name as a class in a standard library).Also, for best performance, place the most-often used libraries at the front of the path. This applies to LIBPATH and LD_LIBRARY_PATH variables for most often used JNI libraries.Java 1.4 Documentation on Classpath notes that the preferred method for command-line tools such as java, javac, or javadoc is to NOT use environment variables but instead specify -classpath as part of the command invoking a Java program.The System environment variable CLASSPATH must be in upper case (not “classpath”). CLASSPATH is used to specify the full path and file name of every jar file used by java programs. Thus CLASSPATH could be quite long.C:\jdk1.3.1_01\src.jar;C:\jdk1.3.1_01\lib\dt.jar;C:\jdk1.3.1_01\lib\tools.jar;C:\jdk1.3.1_01\jre\lib\il8n.jar;C:\jdk1.3.1_01\jre\lib\jaws.jar;C:\jdk1.3.1_01\jre\lib\rt.jar;C:\jdk1.3.1_01\jre\demo\sound\JavaSound.jar;C:\jdk1.3.1_01\demo\jfc\SwingSet2\SwingSet2.jar;C:\jdk1.3.1_01\demo\jfc\SwingApplet\SwingApplet.jar;Sun's JDK adds:C:\jdk1.3.1_01\;C:\jdk1.3.1_01\Bin;C:\jdk1.3.1_01\Lib;A common mistake with CLASSPATH is to specify only folder paths and leave out jar file names. Semicolons should separate each jar file specification.On client machines, Microsoft's VM CLASSPATH is, by default:%windows%\Java\Classes\Classes.zip;This string is stored in environment variable CLASSPATH or Windows registry keyHKLM\Software\Microsoft\Java VM\ClasspathWindows 95/98 computers should limit CLASSPATH to less than 400 characters.Dick Baldwin notes in his tutorial that if you want the CLASSPATH to point to class files that belong to a package, you should specify a path name that includes the path to the directory one level above the directory having the name of your package.For example, suppose you want the Java interpreter to be able to find classes in the package mypackage. If the path to the mypackage directory is C:\java\MyClasses\mypackage, you would set the CLASSPATH variable as follows:set CLASSPATH=C:\java\MyClassesThe purpose of the package directive is to identify a particular class (or group of classes contained in a single source file (compilation unit)) as belonging to a specific package.NOTE: Training connection also offers some great tutorials on Java programs, Dreamweaver training, and Flex software.In Linux: pCLASSPATH=/usr/local/java/jre/binMy CLASSPATH:C:\PROGRA~1\MERCUR~1\MERCUR~1\classes;C:\PROGRA~1\MERCUR~1\MERCUR~1\classes\srv;C:\PROGRA~1\Java\jdk1.5.0_02\lib\rt.jarAmazon EC2 File PathsAmazon EC2 command script users add these environment variables. For example, if EC2 files are located in folder C:\EC2:Variable SampleEC2_HOME C:\EC2 where files are locatedEC2_PRIVATE_KEY C:\EC2\pk.pem full path to fileEC2_CERT C:\EC2\509cert.pem full path to fileWindows Network SharesChanges to variables disappear after reboot.So change the variables in a shell script or Windows network share. This mapdir.bat is an example of allocating the X: drive....This assumes that the loopback IP address has not been changed in the hosts file.。