win7 jdk 安装 环境变量 配置 javahome

 

 

在“系统变量”中,设置3属性JAVA_HOME、CLASSPATH、Path(不区分大小写),若已存在则点击“编辑”,不存在则点击“新建”;

b)、JAVA_HOME指明JDK安装路径,就是刚才安装时所选择的路径C:\Program Files\Java\jdk1.7.0_09,此路径下包括lib,bin,jre等文件夹(此变量最好设置,因为以后运行tomcat,eclipse等都需要依*此变量);

 

c)、Path使得系统可以在任何路径下识别java命令,这里,要注意下,path应该是本来就存在的,就不要新建了,找到path,点击“编辑”;在值的最前面加上下面的语句即可。如果覆盖了path变量,将导致的cmd下有些基本的命令会找不到。 
%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin;

 

d)、CLASSPATH为java加载类(class or lib)路径,只有类在classpath中,java命令才能识别,设为: 
.;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar (要加.表示当前路径) 
%JAVA_HOME%就是引用前面指定的JAVA_HOME;

4、检验安装配置是否正确

点击“开始”,键入“cmd”;

运行“java -version”、“java”、“javac”三个命令

 

Last modified onSaturday, 05 January 2013 13:06

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0001403808{main}( ).../index.php:0
20.03491321624Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.03491321624Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.14412979864Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.14463004448Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.14553059776Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.14563076832require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.15143220920K2ControllerItem->execute( ).../k2.php:64
90.15153220920K2ControllerItem->display( ).../BaseController.php:710
100.15603490000K2ControllerItem->display( ).../item.php:78
110.15603490000K2ControllerItem->display( ).../controller.php:19
120.15723508520Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.15893528936K2ViewItem->display( ).../ViewController.php:102
140.20584061952K2ViewItem->display( ).../view.html.php:742
150.20584061952K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.20724236352include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0001403808{main}( ).../index.php:0
20.03491321624Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.03491321624Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.14412979864Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.14463004448Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.14553059776Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.14563076832require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.15143220920K2ControllerItem->execute( ).../k2.php:64
90.15153220920K2ControllerItem->display( ).../BaseController.php:710
100.15603490000K2ControllerItem->display( ).../item.php:78
110.15603490000K2ControllerItem->display( ).../controller.php:19
120.15723508520Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.15893528936K2ViewItem->display( ).../ViewController.php:102
140.20584061952K2ViewItem->display( ).../view.html.php:742
150.20584061952K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.20724236352include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top