一、JDK、JRE

术语名 缩写 解释
Java Development Kit JDK Java程序员用的工具包
Java Runtime Enviroment JRE Java程序的运行环境

二、下载、安装JDK

官网下载链接:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

百度网盘下载链接:http://pan.baidu.com/s/1bLnANG

鼠标右键双击运行.exe,将会弹出引导程序安装JDK和JRE,

点击next,继续安装

点击change..选择你安装的路径,然后点击next

等待一会儿,会弹出安装jre的向导

可以选择安装路径,点击change选择安装路径,然后点击next

点击next steps去查看官网文档API等,点击close完成安装

三、环境变量配置

安装完成,cd到你的安装路径下

安装路径如下图:

那两个文件夹分别是JDK和JRE的安装位置,cd到JDK\bin中执行Java命令

F:\Java\JDK\bin>dir
 Volume in drive F has no label.
 Volume Serial Number is 692A-C80C

 Directory of F:\Java\JDK\bin

//  :    <DIR>          .
//  :    <DIR>          ..
//  :            , appletviewer.exe
//  :            , extcheck.exe
//  :            , idlj.exe
//  :            , jabswitch.exe
//  :            , jar.exe
//  :            , jarsigner.exe
//  :            , java-rmi.exe
//  :           , java.exe
//  :            , javac.exe
//  :            , javadoc.exe
//  :           , javafxpackager.exe
//  :            , javah.exe
//  :            , javap.exe
//  :           , javapackager.exe
//  :           , javaw.exe
//  :           , javaws.exe
//  :            , jcmd.exe
//  :            , jconsole.exe
//  :            , jdb.exe
//  :            , jdeps.exe
//  :            , jhat.exe
//  :            , jinfo.exe
//  :            , jjs.exe
//  :           , jli.dll
//  :            , jmap.exe
//  :           , jmc.exe
//  :                jmc.ini
//  :            , jps.exe
//  :            , jrunscript.exe
//  :            , jsadebugd.exe
//  :            , jstack.exe
//  :            , jstat.exe
//  :            , jstatd.exe
//  :           , jvisualvm.exe
//  :            , keytool.exe
//  :            , kinit.exe
//  :            , klist.exe
//  :            , ktab.exe
//  :           , msvcr100.dll
//  :            , native2ascii.exe
//  :            , orbd.exe
//  :            , pack200.exe
//  :            , policytool.exe
//  :            , rmic.exe
//  :            , rmid.exe
//  :            , rmiregistry.exe
//  :            , schemagen.exe
//  :            , serialver.exe
//  :            , servertool.exe
//  :            , tnameserv.exe
//  :           , unpack200.exe
//  :            , wsgen.exe
//  :            , wsimport.exe
//  :            , xjc.exe
               File(s)      ,, bytes
                Dir(s)  ,,, bytes free

F:\Java\JDK\bin>java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) -Bit Server VM (build 25.111-b14, mixed mode)

F:\Java\JDK\bin>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 used
  -classpath <path>          Specify where to find user class files and annotation processors
  -cp <path>                 Specify where to find user class files and annotation 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 compilation 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
  -parameters                Generate metadata for reflection on method parameters
  -d <directory>             Specify where to place generated class files
  -s <directory>             Specify where to place generated source files
  -h <directory>             Specify where to place generated native header 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

这样做比较麻烦,没次要用的时候,都需要到这个安装位置下来 我们需要添加安装的bin目录到系统环境变量中,

复制路径后,在系统环境变量中找到path,然后添加进去

之前安装的路径的JDK的bin路径就添加到系统环境变量中啦 F:\Java\JDK\bin

在cmd下验证一下,任意路径

C:\Windows\system32>java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) -Bit Server VM (build 25.111-b14, mixed mode)

C:\Windows\system32>E:

E:\>java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) -Bit Server VM (build 25.111-b14, mixed mode)

E:\>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 used
  -classpath <path>          Specify where to find user class files and annotation processors
  -cp <path>                 Specify where to find user class files and annotation 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 compilation 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
  -parameters                Generate metadata for reflection on method parameters
  -d <directory>             Specify where to place generated class files
  -s <directory>             Specify where to place generated source files
  -h <directory>             Specify where to place generated native header 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
  -profile <profile>         Check that API used is available in the specified profile
  -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

四、编写hello world程序运行一下, 创建文件HelloWorld.java, 文件名字与类名对应,文件类型.java

public class HelloWorld{
    public static void main(String[] args)
    {
         System.out.println("Hello World");
    }
}

cd到helloworld.java路径下

E:\Java>dir
 Volume in drive E has no label.
 Volume Serial Number is 35EE-5207

 Directory of E:\Java

2017/01/14  12:49    <DIR>          .
2017/01/14  12:49    <DIR>          ..
2017/01/14  12:49               130 HelloWorld.java
2016/07/12  09:18    <DIR>          httpcomponents-client-4.5.2
2016/07/12  09:17         3,047,752 httpcomponents-client-4.5.2-bin.zip
2016/07/12  08:59         1,643,553 httpcomponents-client-4.5.2-src.zip
2015/12/14  08:35    <DIR>          sqljdbc_4.2
               3 File(s)      4,691,435 bytes
               4 Dir(s)  40,363,429,888 bytes free

E:\Java>javac HelloWorld
error: Class names, 'HelloWorld', are only accepted if annotation processing is explicitly requested
1 error

E:\Java>javac HelloWorld.java

E:\Java>java HelloWorld
Hello World

Java开发工具箱-JDK的安装与配置的更多相关文章

  1. Java基础--JDK的安装和配置

    一.Java平台简述 1.1 Java语言简介 Java是一门面向对象的编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承.指针等概念,因此Java语言具有功能强大和简单易用两 ...

  2. [java笔记]JDK的安装和配置

    1.JDK安装下载java JDK:点击下载(http://www.oracle.com/technetwork/java/javase/downloads/index.html )JDK(Java ...

  3. Java学习---JDK的安装和配置

    控制面板\系统和安全\系统 CLASSPATH %JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar; JAVA_HOME C:\Program Files ...

  4. Java开发第一步:JDK 7 安装及配置

    JDK 7 安装及配置1. 打开网页http://www.oracle.com 下载对应平台的合适 JDK. 2. 双击下载的 exe,如 jdk-7u7-windows-i586.exe.3. 进入 ...

  5. jdk的安装及配置

    前几天重新了下系统,所以JDK也要重新安装,顺带温故了安装及配置的过程,记录下来.(安装的版本是JDK1.7.0) 后面基本都是点下一步(i第一步选:开发工具),路径我改为E:/java/jdk 1. ...

  6. Win7 32位系统下Java开发环境的安装及配置

    目录: Java JDK安装. Java JDK系统环境的配置. 配置常见问题的解决. Java JDK的安装 Java Jdk(Java Development Kit)Java开发不可缺少的环境, ...

  7. 操作手册(1)JDK的安装与配置

    1 JDK的安装与配置 1.1 背景 JDK(Java SE Development Kit)是 Java 语言开发工具包的简称,是开发和运行 Java 程序的基础环境. 更多描述 | 百度百科: → ...

  8. JDK的安装以及配置

    JDK的安装以及配置 JDK(Java Development Kit),顾名思义,是 Java 语言的软件开发工具包(SDK). Android发开使用Java语言,所以装JDK是Android开发 ...

  9. 3.1 Java以及Lucene的安装与配置

    Lucene是Java开发的一套用于全文检索和搜索的开源程序库,它面向对象多层封装,提供了一个低耦合.与平台无关的.可进行二次开发的全文检索引擎架构,是这几年最受欢迎的信息检索程序库[1].对Luce ...

随机推荐

  1. C++ Primer 学习笔记_63_重载运算符和转换 --转换和类类型【上】

    重载运算符和转换 --转换与类类型[上] 引言: 在前面我们提到过:能够用一个实參调用的位 unsignedchar 相同范围的值,即:0到255. 这个类能够捕获下溢和上溢错误,因此使用起来比内置u ...

  2. JavaScipt中对DOM的理解

    一.理解DOM 浏览器通过文档对象模型DOM使JavaScript程序可以访问页面上的元素,而DOM是页面上XHTML中文档正文标题.段落.列表.样式ID.class以及所有其他出现的数据的一个内部表 ...

  3. Asp.Net MVC页面静态化功能实现一:利用IHttpModule和ResultFilter

    由于公司现在所采用的是一套CMS内容管理系统的框架,所以最近项目中有一个需求提到要求实现页面静态化的功能.在网上查询了一些资料和文献,最后采用的是小尾鱼的池塘提供的 利用ResultFilter实现a ...

  4. Windows下MYSQL自动备份批处理

    windows下MYSQL自动备份批处理 2011-05-04 09:16:45|  分类: mysql|举报|字号 订阅     按系统时间进行备份 注意mysql安装路径中如果有空格.就要把,.b ...

  5. SQL面试题1

    SQL面试题 Sql常用语法 下列语句部分是Mssql语句,不可以在access中使用. SQL分类: DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE) DML—数据操纵语言 ...

  6. div高度自适外层div高度随里层div高度自适

    尝试过许多办法 其中一网友的最靠谱就是在外层div样式添加两个标签(不能少) clear:both;  overflow:auto;

  7. innerText与innerHTML的区别

    innerText与innerHTML的区别:1.innerText将所有文本内容作为普通的文本2.innerHTML会识别文本内容中是否含有html标签,它能够把html标签的效果显示出来3.inn ...

  8. Ubuntu下的截图工具

    转载自:http://os.yesky.com/88/8733088.shtml 相信大家对于屏幕截图(或称抓图)应该不会陌生,在Windows平台上,我们可以使用许多第三方的专业抓图软件如SnagI ...

  9. Word2Vec在中文的应用

    google最近新开放出word2vec项目,该项目使用deep-learning技术将term表示为向量,由此计算term之间的相似度,对term聚类等,该项目也支持phrase的自动识别,以及与t ...

  10. soket.io.js + angular.js + express.js(node.js)

    soket.io.js + angular.js + express.js(node.js) 今天搭建个soket.io.js + angular.js + express.js的环境, 采坑无数,特 ...