Embracing Java 9 and beyond with Eclipse JDT

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming Lecture 3 Writing Java Applications, Java Development Tools.
Advertisements

OO Programming in Java Objectives for today: Overriding the toString() method Polymorphism & Dynamic Binding Interfaces Packages and Class Path.
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
® IBM Software Group © 2010 IBM Corporation What’s New in Profiling & Code Coverage RAD V8 April 21, 2011 Kathy Chan
2005 JavaOne SM Conference | Session BOF-9161 Exploring Annotation-Based Programming through the APT and Mirror APIs Tim Wagner, Senior Manager Gary Horen,
Objectives Introduction to Inheritance and Composition (Subclasses and SuperClasses) Overriding (and extending), and inheriting methods and constructors.
Java Integrated Development Environments: ECLIPSE Part1 Installation.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Views Dwight Deugo Nesa Matic
Java™ How to Program, 9/e © Copyright by Pearson Education, Inc. All Rights Reserved.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
1 v1.6 08/02/2006 Overview of Eclipse Lectures 1.Overview 2.Installing and Running 3.Building and Running Java Classes 4.Refactoring 5.Debugging 6.Testing.
CISC474 - JavaScript 03/02/2011. Some Background… Great JavaScript Guides: –
DUE Hello World on the Android Platform.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
TOOLS FOR DESIGN AND DEVELOPMENT ENVIRONMENTS. Case study - ECLIPSE Lecture notes 7.
1162 JDK 5.0 Features Christian Kemper Principal Architect Borland.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
Ant Presentation by: Bart Taylor. What is Ant? The simple definition: A Java-based build tool The Official Definition: “Apache Ant is a Java-based build.
The gLite API – PART I Giuseppe LA ROCCA INFN Catania Master Class for Life Science, 4-6 May 2010 Singapore.
1 CSC/ECE 517 Fall 2010 Lec. 3 Overview of Eclipse Lectures Lecture 2 “Lecture 0” Lecture 3 1.Overview 2.Installing and Running 3.Building and Running.
JAVA COURSE 1 Computer Engineering Association. Compile your first program Public class Hello{ public class Hello(){ System.out.println(“Hello”); } puclic.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Graphical Enablement In this presentation… –What is graphical enablement? –Introduction to newlook dialogs and tools used to graphical enable System i.
Introduction to Java Chapter 7 - Classes & Object-oriented Programming1 Chapter 7 Classes and Object-Oriented Programming.
Inheritance. Inheritance - Introduction Idea behind is to create new classes that are built on existing classes – you reuse the methods and fields and.
1 Chapter 5: Defining Classes. 2 Basics of Classes An object is a member of a class type What is a class? Fields & Methods Types of variables: –Instance:
Classes Dwight Deugo Nesa Matic
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
Classes, Interfaces and Packages
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
TOOLS FOR DESIGN AND DEVELOPMENT ENVIRONMENTS. Case study - ECLIPSE Lecture notes 5.
Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 5 th October 2015 Workshop 1 – Java Wrestling.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
Generic Programming and Library Design Brian Bartman
Java IDE Dwight Deugo Nesa Matic
Java 9 support in Eclipse Jay Arthanareeswaran, Manoj Palat IBM.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
CSC 243 – Java Programming, Fall, 2008 Tuesday, September 30, end of week 5, Interfaces, Derived Classes, and Abstract Classes.
Doron Orbach UCMDB Product Manager
Object Oriented Programming in
CLOUD
Modern Programming Tools And Techniques-I
Actions and Behaviours
JavaOne BOF: The Legacy Developer’s Guide to Java 9
Productive Debugging With Eclipse Photon
Project Topic 2: Migration to Java 9
Java 9 New features 8/11/2017 Iason Dimitrios Rodis.
Java 9.
Functional Programming with Java
Java 9 Project Jigsaw / JSR 376: JavaTM Platform Module System.
VISUAL BASIC.
Notable Java 8 New Features – Not including Lambda S Marvasti
Starting JavaProgramming
Design Patterns in Game Design
Chapter 6 Methods: A Deeper Look
CISC124 Assignment 4 on Inheritance due next Friday.
Functional interface.
CISC124 Assignment 4 on Inheritance due next Friday.
Cordova & Cordova Plugin Installation and Management
Tonga Institute of Higher Education
Eclipse Plug-in Development
Advanced Programming in Java
CMPE212 – Reminders Assignment 2 sample solution is posted.
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Classes 5/5 May 14, 2019 ICS102: Classes 5/5.
Working with Libraries
CMPE212 – Reminders Assignment 2 due today, 7pm.
„Lambda expressions, Optional”
The beginning of media computation Followed by a demo
Presentation transcript:

Embracing Java 9 and beyond with Eclipse JDT Sarika Sinha Committer Platform and JDT Eclipse Projects, Co-Lead Eclipse JDT Project

Agenda Java and Eclipse release timelines Java 9 features Moving from Java 8 to Java 9 and beyond

Java and Eclipse release timelines Twice yearly releases of Java from 2018 in March and September Quarterly releases of Eclipse in March, June, September and December.

Java 9 features Private interface methods Try-With Resources enhancements @SafeVarargs Annotation for private instance methods Collection Factory Methods Stream improvements Option --release Modules Launching with Java 9 and beyond Overriding dependencies while launching for Java 9 and beyond

Java 9 features - Private interface methods Java 9 allows private methods and private static methods in interfaces.

Java 9 features - Try-With Resources enhancements Final and effectively final variables can be placed in try-with- resource blocks, starting in Java 9.

Java 9 features - @SafeVarargs enhancement Java 9 allows @SafeVarargs annotation for private instance methods also.

Java 9 features – Collection factory methods Java 9 has added simple ways to create immutable Collections without null values.

Java 9 features - Stream improvements Stream takeWhile/dropWhile Stream iterate Stream ofNullable

Java 9 features --release option Now it is possible to compile against older compliance level by specifying --release option. The new --release compiler option now allows the user to configure compilation against a platform API version of user's choice. The --release option is enabled for JRE 9 and above, if the compliance is set to 1.6 or above

Java 9 features - Modules Project Jigsaw introduced the Java 9 Platform Module System. Module—a uniquely named, reusable group of related packages, as well as resources and a module descriptor (module-info.java) All JDK Modules starts with “jdk.*” All Java SE Specifications Modules starts with “java.*” Java 9 Module System has a “java.base” Module which is an independent module.

Java 9 features – Modules (contd..) Named modules have module defined in module-info.java A class which is not a member of a 'named module' is considered to be a member of a special module known as the unnamed module. The unnamed module 'requires' every other named modules and 'exports' all its packages. Automatic Modules are named modules which are automatically created for a non-modular jar.

Java 9 features – Modules (contd..) Java search now includes a new search scope – Module. Java Build Path allows to add Projects and jars to Modulepath or Classpath Encapsulation properties of Modulepath elements can be modified using Is modular node. Is modular node is changed to Is not modular if the the Build Path Project library is moved to Classpath.

Java 9 features – Modules (contd..) Encapsulation properties of Modulepath elements can be modified using Is modular node. Patching the module, modules for read and exports can be added.

Java 9 features – Modules (contd..) Quick Fix in module-info.java to import class and add requires to module-info.java. Quick Fix in module-info.java to move Classpath entry to Modulepath entry.

Java 9 features – Modules (contd..) Quick Fix in a class to add requires to module-info.java. Quick Fix in import to add requires to module-info.java.

Java 9 features – Launch Configuration “Dependencies” tab with Java Runtime 9.

Java 9 features – Launch Configuration Override Dependencies button has been added to the Dependencies tab. Java 9 has provided many command line options to make older projects compatible to the new modules. Based on Java build path, dependencies are derived. These options from build path can be overridden for launching programs in the module.

Java 10 features Local variable type inference support for Java 10. Auto completion support for “var” Hover Support for “var” Type conversion suggestions Suggestion to change project compliance and JRE

Java 10 features Time based release versioning

Java 11 features Local variable syntax for Lambda Parameters Nest-Based Access Control Raw String literals (Not triaged to Java 11) Switch Expressions and Pattern matching (Not triaged to Java 11)

Moving from Java 8 to Java 9 and beyond Create new Java Projects as modular Put Java 8 libraries and Projects in Classpath Put modular libraries and Projects in Modulepath Learn about options ALL-UNNAMED, ALL- DEFAULT, ALL-SYSTEM, ALL-MODULE-PATH Learn about options --add-exports, --add- reads, --add-opens

Quick Links Eclipse Photon JDT New and Noteworthy Java 9 Examples https://www.eclipse.org/eclipse/news/4.8/jdt.html Java 9 Examples https://wiki.eclipse.org/Java9/Examples Java 10 Examples https://wiki.eclipse.org/Java10/Examples Java 11 Examples https://wiki.eclipse.org/Java11/Examples

Thank You