JAVA概述!

1991 年Sun公司的詹姆斯·高斯林(James Gosling)等人开始开发名称为 Oak 的语言,希望用于控制嵌入在有线电视交换盒、PDA等的微处理器;

1994年将Oak语言更名为Java;

 

Java的三种技术架构:

JAVAEEJava Platform Enterprise Edition,开发企业环境下的应用程序,包含的技术如 Servlet、Jsp等.主要针对web程序开发;

JAVASEJava Platform Standard Edition,完成桌面应用程序的开发,是其它两者的基础;

JAVAMEJava Platform Micro Edition,开发电子消费产品和嵌入式设备,如手机中的程序;

 

1,JDK:Java Development Kit,java的开发和运行环境,java的开发工具和jre。

2,JRE:Java Runtime Environment,java程序的运行环境,java运行的所需的类库+JVM(java虚拟机)。

1.环境变量配置:

让java jdk\bin目录下的工具,可以在任意目录下运行,原因是,将该工具所在目录告诉了系统,当使用该工具时,由系统帮我们去找指定的目录。

计算机-右键属性-高级系统设置-高级-环境变量-系统变量,

创建新的变量名称:JAVA_HOME

为JAVA_HOME添加变量值:JDK安装目录

在path环境变量最前面添加如下内容 :  %JAVA_HOME%\bin;

classpath的配置:

    创建新的变量名称:classpath

值设定为指定的还有class文件的目录,多个目录间使用分号(;)分割

 .;%JAVA_HOME%\lib;%JAVA_HOME%\lib/tools.jar

 

注意:在定义classpath环境变量时,需要注意的情况

如果没有定义环境变量classpath,java启动jvm后,会在当前目录下查找要运行的类文件;

如果指定了classpath,那么会在指定的目录下查找要运行的类文件。

还会在当前目录找吗?两种情况:

    1):如果classpath的值结尾处有分号,在具体路径中没有找到运行的类,会默认在当前目录再找一次。

    2):如果classpath的值结果出没有分号,在具体的路径中没有找到运行的类,不会再当前目录找。

    一般不指定分号,如果没有在指定目录下找到要运行的类文件,就报错,这样可以调试程序。

2.javac命令和java命令做什么事情呢?

要知道java是分两部分的:一个是编译,一个是运行。

    javac负责的是编译的部分,当执行javac时,会启动java的编译器程序。对指定扩展名的.java文件进行编译。 生成了jvm可以识别的字节码文件。也就是class文件,也就是java的运行程序。

    java负责运行的部分.会启动jvm.加载运行时所需的类库,并对class文件进行执行.

    一个文件要被执行,必须要有一个执行的起始点,这个起始点就是main方法

Overview Module Package Class Use Tree Deprecated Index Help Java SE 9 & JDK 9 Prev Next Frames No Frames All Classes SEARCH: Java® Platform, Standard Edition & Java Development Kit Version 9 API Specification This document is divided into three sections: Java SE The Java Platform, Standard Edition (Java SE) APIs define the core Java platform for general-purpose computing. These APIs are in modules whose names start with java. JDK The Java Development Kit (JDK) APIs are specific to the JDK and will not necessarily be available in all implementations of the Java SE Platform. These APIs are in modules whose names start with jdk. JavaFX The JavaFX APIs define a set of user-interface controls, graphics, media, and web packages for developing rich client applications. These APIs are in modules whose names start with javafx. Java SE Module Description java.activation Defines the JavaBeans Activation Framework (JAF) API. java.base Defines the foundational APIs of the Java SE Platform. java.compiler Defines the Language Model, Annotation Processing, and Java Compiler APIs. java.corba Defines the Java binding of the OMG CORBA APIs, and the RMI-IIOP API. java.datatransfer Defines the API for transferring data between and within applications. java.desktop Defines the AWT and Swing user interface toolkits, plus APIs for accessibility, audio, imaging, printing, and JavaBeans. java.instrument Defines services that allow agents to instrument programs running on the JVM. java.logging Defines the Java Logging API. java.management Defines the Java Management Extensions (JMX) API. java.management.rmi Defines the RMI connector for the Java Management Extensions (JMX) Remote API. java.naming Defines the Java Naming and Directory Interface (JNDI) API. java.prefs Defines the Preferences API. java.rmi Defines the Remote Method Invocation (RMI) API. java.scripting Defines the Scripting API. java.se Defines the core Java SE API. java.se.ee Defines the full API of the Java SE Platform. java.security.jgss Defines the Java binding of the IETF Generic Security Services API (GSS-API). java.security.sasl Defines Java support for the IETF Simple Authentication and Security Layer (SASL). java.sql Defines the JDBC API. java.sql.rowset Defines the JDBC RowSet API. java.transaction Defines a subset of the Java Transaction API (JTA) to support CORBA interoperation. java.xml Defines the Java API for XML Processing (JAXP), the Streaming API for XML (StAX), the Simple API for XML (SAX), and the W3C Document Object Model (DOM) API. java.xml.bind Defines the Java Architecture for XML Binding (JAXB) API. java.xml.crypto Defines the API for XML cryptography. java.xml.ws Defines the Java API for XML-Based Web Services (JAX-WS), and the Web Services Metadata API. java.xml.ws.annotation Defines a subset of the Common Annotations API to support programs running on the Java SE Platform. JDK Module Description jdk.accessibility Defines JDK utility classes used by implementors of Assistive Technologies. jdk.attach Defines the attach API. jdk.charsets Provides charsets that are not in java.base (mostly double byte and IBM charsets). jdk.compiler Defines the implementation of the system Java compiler and its command line equivalent, javac, as well as javah. jdk.crypto.cryptoki Provides the implementation of the SunPKCS11 security provider. jdk.crypto.ec Provides the implementation of the SunEC security provider. jdk.dynalink Defines the API for dynamic linking of high-level operations on objects. jdk.editpad Provides the implementation of the edit pad service used by jdk.jshell. jdk.hotspot.agent Defines the implementation of the HotSpot Serviceability Agent. jdk.httpserver Defines the JDK-specific HTTP server API. jdk.incubator.httpclient Defines the high-level HTTP and WebSocket API. jdk.jartool Defines tools for manipulating Java Archive (JAR) files, including the jar and jarsigner tools. jdk.javadoc Defines the implementation of the system documentation tool and its command line equivalent, javadoc. jdk.jcmd Defines tools for diagnostics and troubleshooting a JVM such as the jcmd, jps, jstat tools. jdk.jconsole Defines the JMX graphical tool, jconsole, for monitoring and managing a running application. jdk.jdeps Defines tools for analysing dependencies in Java libraries and programs, including the jdeps, javap, and jdeprscan tools. jdk.jdi Defines the Java Debug Interface. jdk.jdwp.agent Provides the implementation of the Java Debug Wire Protocol (JDWP) agent. jdk.jfr Defines the API for Java Flight Recorder. jdk.jlink Defines the jlink tool for creating run-time images, the jmod tool for creating and manipulating JMOD files, and the jimage tool for inspecting the JDK implementation-specific container file for classes and resources. jdk.jshell This module provides support for Java Programming Language 'snippet' evaluating tools, such as Read-Eval-Print Loops (REPLs), including the jshell tool. jdk.jsobject Defines the API for the JavaScript Object. jdk.jstatd Defines the jstatd tool for starting a daemon for the jstat tool to monitor JVM statistics remotely. jdk.localedata Provides the locale data for locales other than US locale. jdk.management Defines JDK-specific management interfaces for the JVM. jdk.management.agent Defines the JMX management agent. jdk.management.cmm Defines the Management Interface for Cooperative Memory Management. jdk.management.jfr Defines the Management Interface for Java Flight Recorder. jdk.management.resource Defines the Resource Management API. jdk.naming.dns Provides the implementation of the DNS Java Naming provider. jdk.naming.rmi Provides the implementation of the RMI Java Naming provider. jdk.net Defines the JDK-specific Networking API. jdk.pack Defines tools for transforming a JAR file into a compressed pack200 file and transforming a packed file into a JAR file, including the pack200 and unpack200 tools. jdk.packager.services Defines the services used by the Java packager tool. jdk.policytool Defines the GUI tool for managing policy files called policytool. jdk.rmic Defines the rmic compiler for generating stubs and skeletons using the Java Remote Method Protocol (JRMP) and stubs and tie class files (IIOP protocol) for remote objects. jdk.scripting.nashorn Provides the implementation of Nashorn script engine and the runtime environment for programs written in ECMAScript 5.1. jdk.sctp Defines the JDK-specific API for SCTP. jdk.security.auth Provides implementations of the javax.security.auth.* interfaces and various authentication modules. jdk.security.jgss Defines Java extensions to the GSS-API and an implementation of the SASL GSSAPI mechanism. jdk.snmp Defines the SNMP management agent. jdk.xml.dom Defines the subset of the W3C Document Object Model (DOM) API that is not part of the Java SE API. jdk.zipfs Provides the implementation of the zip file system provider. JavaFX Module Description javafx.base Defines the base APIs for the JavaFX UI toolkit, including APIs for bindings, properties, collections, and events. javafx.controls Defines the UI controls, charts, and skins that are available for the JavaFX UI toolkit. javafx.fxml Defines the FXML APIs for the JavaFX UI toolkit. javafx.graphics Defines the core scenegraph APIs for the JavaFX UI toolkit (such as layout containers, application lifecycle, shapes, transformations, canvas, input, painting, image handling, and effects), as well as APIs for animation, css, concurrency, geometry, printing, and windowing. javafx.media Defines APIs for playback of media and audio content, as part of the JavaFX UI toolkit, including MediaView and MediaPlayer. javafx.swing Defines APIs for the JavaFX / Swing interop support included with the JavaFX UI toolkit, including SwingNode (for embedding Swing inside a JavaFX application) and JFXPanel (for embedding JavaFX inside a Swing application). javafx.web Defines APIs for the WebView functionality contained within the the JavaFX UI toolkit. Other Modules Module Description java.jnlp Defines the API for Java Network Launch Protocol (JNLP). java.smartcardio Defines the Java Smart Card I/O API. Skip navigation links Overview Module Package Class Use Tree Deprecated Index Help Java SE 9 & JDK 9 Prev Next Frames No Frames All Classes
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IT枫斗者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值