Build a Java development environment under Mac
MAC Configuration Java Development environment: Eclipse + jdk1.8
Objective
Before you build your development environment, take a look at some concepts: JAVA,JAVASE,JAVAEE,JVM,JDK,JRE
Java Development history
The relationship between Javase, Javame and Java EE
Javase (J2SE): (Java2 Platform standard Edition,java Platform Standards Edition)
EE: (Java 2 platform,enterprise Edition,java Platform Enterprise Edition)
Javame (J2ME): (Java 2 Platform Micro Edition,java Platform mini version)
Jvm
Written in the Java language good. Java source code files, compiled by the compiler, generate. class bytecode files, bytecode files and platform-independent, which is the reason for Java cross-platform, when running a Java program, the interpreter to interpret the bytecode file, and the JVM contains this interpreter, that is, Java across platform, which is implemented by the JVM.
Jdk,jre
JDK contains the JVM,JRE, so as long as the installation of the JDK can be Java development, just for the convenience of development, need to use some IDE development tools
1. Installing the JDK
The Mac comes with a JDK, and the console input java -version
can view the installed JDK version, as shown in the 1.6.0_65
To install a different version, such as the current version of jdk1.8, proceed as follows:
:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Download the JDK for Mac OSX under Javase and tick accept license Agreement
Once downloaded, simply double-click the installation.
After installation, enter java -version
view JDK version in terminal
2. Install Eclipse
:
Http://www.eclipse.org/downloads/download.php?file=/oomph/epp/mars/R1a/eclipse-inst-mac64.tar.gz
After download is a compressed file eclipse-java-mars-1-macosx-cocoa-x86_64.tar.gz, after decompression is a eclipse.app, directly double-click Run
Create a new HelloWorld program
Under MA Java Development Environment Construction