In order to get rid of the windows constraints, I erased the MBP disk and reinstalled mountain lion, still think the old version of the system looks good, the new system is too flat, and now many software requirements are about 10.7 (lowest or highest), wait until forced to upgrade it.
Java development requires two things, one is the JRE Java Runtime Environment can be seen, this is a Java operating environment, whether you want to develop, you want to execute Java program, you need to have this thing. So, this thing is a cross-platform mobile phone computer, as long as there is a Java program to run the place there is it.
Enter under Terminal: The output from Java-version is as follows
Java Version "1.6.0_65"
Java (TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11m4716)
Java HotSpot (TM) 64-bit Server VM (build 20.65-b04-466.1, Mixed mode)
If you do not have the JRE installed, you can go to http://support.apple.com to search Java for OSX.
The other is the JDK for developers (Java Development Kit), which is the Java language Software Development Kit (SDK). Java programs cannot be compiled without a JDK. Kit shows that it's just a package, and we need something else like Editor editor, compiler compiler, debugger debugger, GUI, etc. to apply the functionality in this package.
Eclipse is an IDE (Integrated development environment, integrated development environment) that encompasses all the tools the developer needs, including the underlying kit and top-level GUI. To http://eclipse.org/download the corresponding Mac 64 bit, specific installation please Niang.
Write down the first program, which is about the degree of Fahrenheit converted to degrees Celsius calculation
Where cast is used to ensure that C is an integer
Notice the initialization of the variable.
Import Java.util.scanner;public class Main {public static void Main (string[] args) {int f=0,c=0;//defines the variables for degrees Fahrenheit and Celsius Scanner in = New Scanner (system.in); F = In.nextint (); C = (int) ((F-32) *5/9); System.out.println (C);}}
Getting Started with Java 1 installation of the MAC OS X integrated development environment eclipse