180 likes | 196 Views
GETTING READY FOR JAVA. Java SE8 Fundamentals. ABBREVIATIONS & ACRONYMS. actype – actual object’s type at run time assop – assignment operator castype – data type specified inside the parens for an explicit cast comperr – compilation error ctor – constructor dim – dimension
E N D
GETTING READY FOR JAVA Java SE8 Fundamentals
ABBREVIATIONS & ACRONYMS actype – actual object’s type at run time assop – assignment operator castype – data type specified inside the parens for an explicit cast comperr – compilation error ctor – constructor dim – dimension initer – initializer op – operator paramlist – list of formal parameters in a lambda expression preditype – data type specified inside the angle brackets reftype – reference type refvar – reference variable sout – any printing statement such as System.out.println(), etc. stat – statement ternop – ternary operator var – variable AIOOBE – ArrayIndexOutOfBoundsException CCE – ClassCastException ChE – checked exception CSR – the Catch-or-Specify Requirement DTPE – DateTimeParseException E – an exception (regardless of the type) IAE – IllegalArgumentException IOE – IOException IOOBE – IndexOutOfBoundsException LDT – any of the new date/time classes in Java 8 LOC – line of code NFE – NumberFormatException NPE – NullPointerException RTE – RuntimeException SIOOBE – StringIndexOutOfBoundsException TCF – try-catch-finally construct Igor Soudakevitch2017 igor.soudakevitch@mail.ru
OBJECTIVE: SETTING UP STUDY ENVIRONMENT • Objective’s Structure: • Installing JDK SE8 + NetBeans • Checking Functionality • Localizing NetBeans Interface • Java Control Panel • Installing Notepad++ 3
1.1 INSTALLING JDK SE8 & NETBEANS
INSTALLING JDK SE8 & NETBEANS • Download and install: Recommended option: JDK SE8 (ver. 8u_151) + NetBeans 8.2: http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html Problems? Check out Installation Instructions Minimal option: Standalone JDK SE8 (ver. 8u_151): http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html • Online access to SE8 API: https://docs.oracle.com/javase/8/docs/api/index.html • [Recommended]Download the Java documentation Java SE 8 Ecosystem Overview:https://docs.oracle.com/javase/8/docs/index.html 5
1.2 CHECKING FUNCTIONALITY 6
CHECKING FUNCTIONALITY In the command shell, type java –version, then javac -version (this example is for JDK ver.8u_66) 7
CHECKING FUNCTIONALITY, cont’d In NetBeans, click Run Set Project Configuration Customize… Manage Platforms… and make sure the Platform Name is correct. If not, specify folder manually. Perform similar checks on the Sources and Javadoc tabs. 8
CHECKING FUNCTIONALITY, cont’d In NetBeans, click Files New Project, then select Categories: Java and Projects: Java Application: 9
CHECKING FUNCTIONALITY, cont’d Specify Project Name of your choice, e.g. Student, then click Finish: 10
CHECKING FUNCTIONALITY, cont’d The Student.java file should open. Type inside the main() method: sout and press Tab. Now type something inside the double quotes, e.g. “Hello, World!” Shortcuts: psvm + Tab main() sout + Tab System.out.println() 11
CHECKING FUNCTIONALITY, cont’d Press Shift + F6. The program should run and greet the world. 12
1.3 LOCALIZING NETBEANS INTERFACE 13
LOCALIZING NETBEANS INTERFACE If your NetBeans GUI is in Russian, you might wish to switch to English-language version. To do this, open and edit Netbeans configuration file netbeans.conf (lives in the C:\Program Files\NetBeans 8.2\etc folder) and make sure the netbeans_default_options string ends with -J-Duser.language=en -J-Duser.region=US 14
1.4 JAVA CONTROL PANEL 15
JAVA CONTROL PANEL Enable/disable a specific version of Java If one or more of your applications have stopped working correctly as a result of updating Java, you may be able to resolve the problem by disabling the newer version and enabling an older version through the Java Control Panel (click Start Control Panel Java Contrtol Panel Java View): FYI: The javaw.exe is identical to java.exe, except that with javaw there is no associated console window. 16
INSTALLING NOTEPAD++ 1.5 17
INSTALLING NOTEPAD++ • Download and install Notepad++: (this image is clickable and contains a hyperlink to the download page). You might also wish to install the HEX Editor plugin for Notepad++ (Plugins Plugin Manager Show Plugin Manager Available) END 18