Date post: | 14-Jul-2015 |
Category: |
Software |
Upload: | javafxpert |
View: | 108 times |
Download: | 4 times |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Java 101A primer on the most used development platform in the world
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 2
About the presenter
• James Weaver
– Java Technology Ambassador– Oracle Corporation– Twitter: @JavaFXpert– Email: [email protected]
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
About the presenterAuthor of several Java/JavaFX books
4 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
What is Java?
5 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
What is Java?
6 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Java - Computer Science
• Java (programming language), an object-oriented high-level programming language
• Java (software platform), a technology developed by Sun Microsystems for machine-
independent software
– Java Platform, Standard Edition, targets desktop environment
– Java Platform, Enterprise Edition, targets server environment
– Java Platform, Micro Edition, targets mobile devices and embedded systems
– Java Card, targets smart cards and other small memory footprint devices
– Java Class Library, a collection of reusable pieces of software that software developers can use in their
software
– Java Development Kit (JDK), a software bundle from Sun Microsystems aimed at Java developers
– Java Virtual Machine (JVM), part of the Java Platform that is responsible for running software created with
Java
• Java applet, allows software to run in web browers, and is accessible on most PCs
• JavaScript, a web language with no direct relationship to the Java platform
According to Wikipedia
7 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Java
public class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
Programming Language
8 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Life of Java Program
HelloWorld.javajavac
HelloWorld.classHelloWorld.jar
Java Virtual
Machine
9 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Java is Everywhere!
10 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Java Virtual Machine
• Software that runs Java bytecode
11 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Java Virtual Machine
Without changing anything or redeploying your app get:
• Performance Improvements
• Security Updates
• New platforms support
• Enhanced Monitoring Capabilities
Other Advantages of JRE
12 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Developers Love Java!
13 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Java Development Kit
(JDK) Java Runtime Environment
(JRE)
JDK and JRE
javac
Java Virtual
MachineStandard
Libraries
Other
Developer
Tools
14 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Integrated Development Environments
• Several options for Integrated Development Environment
– Commercial and Free products available
Choice is good
15 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Great Performance
• Performance was not a goal for initial release (15+years
ago) but…
• Now performance at par with a well written native
language
• Much better than a poorly written native app (and its
much easier to write a good program in Java)
16 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
You can use Java (VM) if you don’t like Java
• Lots of the advantages, just use another JVM
language and you are still part of the "family”
Many other JVM languages out there and growing
17 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Easy to deploy
• Oracle distributes and updates the runtime on desktops,
you can use applet or webstart to get your program
launched from a website.
• Packager creates self-contained apps and installers for
various platforms.
18 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Java History
1.1
• 1997
• JDBC
1.3
• 2000
• Hotspot
5.0
• 2004
• Generics
7
• 2011
• Oracle Stewardship
1.0
• 1996
1.2
• 1998
• Collections
1.4
• 2002
• JCP
6
• 2006
• JVMTI
19 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.19
Lambda (JSR 335)
Date/Time API (JSR 310)
Type Annotations (JSR 308)
Compact Profiles
Lambda-Form Representation for Method Handles
Remove the Permanent Generation
Improve Contended Locking
Generalized Target-Type Inference
DocTree API
Parallel Array SortingBulk Data Operations
Unicode 6.2
Base64
Prepare for Modularization
Parameter Names
TLS Server Name Indication
Configurable Secure-Random Number Generation
Java 8Nashorn
Enhanced Verification Errors
Fence Intrinsics
Repeating Annotations
HTTP URL Permissions
Limited doPrivileged
20 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
JDK 8 - Highlights
• Lambda (AKA Closures)
– Largest update to the Java Language ever
• 10-30% Performance Improvement “normal” without
changing code for multicore systems/programs
• New APIs like Date and Time
• Nashorn – JavaScript engine for JVM
• Java Mission Control in JDK
© 2014 Oracle
21 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Lambda Expressions
• Lambda expressions represent anonymous functions
– Like a method, has a typed argument list, a return type, a set of
thrown exceptions, and a body
– Not associated with a class
• We now have parameterized behaviour, not just values
Some Details
double highestScore = students.stream().
filter(Student s -> s.getGradYear() == 2011)
mapToDouble(Student s -> s.getScore())
max();
What
How
22 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
New graphics stack - JavaFX
23 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
JavaFX 8
• Predefined shapes
– Box
– Cylinder
– Sphere
• User-defined shapes
– TriangleMesh, MeshView
• PhongMaterial
• Lighting
• Cameras
3D Support
24 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.24
Creating Primitive Shapes and Materials
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Using Java Mission ControlAnother cool feature of Java SE Advanced
26 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Built for monitoring, profiling and troubleshooting Java
applications, Java Mission Control consists of:
26
JVM
Java Mission Control
JMX Agent
MBean Server
VM Instrumentation App Instrumentation
• JMX Console for monitoring JVM and application in real time
• Java Flight Recorder for collecting data about JVM and application
• Optional tools via plug-ins (e.g. heap dump analysis, DTrace recording)
27 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Fun Facts about Flight Recorder:
27
• Almost unnoticeable impact on the performance of a Java application running in the JVM (overhead is usually well below 1%)
• High-performance recording engine is built directly into the runtime
• Two JVM startup flags must be enabled on the JVM for which you want to do flight recordings:
-XX:+UnlockCommercialFeatures
-XX:+FlightRecorder
28 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Architects
Love Java
29 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Its Huge, really huge!
• 97% of enterprise desktops run Java
• 1 billion Java downloads each year
• 9 million developers worldwide
• #1 programming language
• More than 3 billion devices are powered by Java
technology
30 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Open Standard
• Java Community Process (JCP) established in 1998
• Establishes Standard Technical Specifications
• Uses Java Specification Requests (JSR)
– Specification
– Reference Implementation
– Technology Compatibility Kit (TCK)
31 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Open Standard –
• No vendor lock-in
– Choose amongst many
– Or go Open Source
• Third-party Java API libraries
exist for virtually any purpose
• OpenJDK contributors
welcomed
What it means to you
32 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Business People
Love Java
33 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Free (Gratis)
• Lots of great goodness and updates available to the
world for no charge
• Deploy in as many servers and desktops as you want
without paying anything
No license cost for use in general purpose computers
34 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Competition Drives Innovation
• Collaborators on the Specification
• Competitors on the implementation
JVM Performance improves continuously
35 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
WORA
• Same skills for mobile, server, client, and even
embedded
Write once, run anywhere
36 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Support and extra tools available
• Enterprise-grade support with long support timeline
available from Oracle
• Additional enterprise and advanced tools available for
licensing from Oracle: Java Advanced and Java Suite.
• Active developer community enables finding help online
for free if you don't want to purchase support
37 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Backed by Oracle
• Oracle had a vested interest in Java long before it
acquired Sun
– We won’t -can’t- let it fail
• Resources at http://oracle.com/java8
38 Copyright © 2011, Oracle and/or its affiliates. All rights
reserved.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
39
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Java 101A primer on the most used development platform in the world