SlideShare a Scribd company logo
1 of 32
Intro to Java 5-8 and Eclipse
6/8/14
Jeanne Boyarsky
Programming Mentor FRC Team 694
Twitter @jeanneboyarsky
Blog: http://www.selikoff.net
Moderator on Java forums at:
http://www.coderanch.com
Java – “New” Features
 This presentation is not a complete list.
 Features most likely needed for FRC programming.
 Includes:
– Non-micro APIs from Java 1.4 (and below)
– Java 5 new features
– Java 7 new features
– Java 8 new features
– (Java 6 didn't have much)
Java 1.4 non-Micro APIs
 java.util.ArrayList – like an array, but grows dynamically
(faster than a Vector)
 java.lang.Math – more methods
 java.util.Properties – read file in format key=value
(example in Java 7 section)
Java 5 – Generics/Autoboxing
 Generics – you specify the type of the ArrayList and the
compiler tells you if you use it wrong
 Autoboxing – Java converts primitives (int, double, etc) to
Objects and back for you
Java 5 – Enhanced for loop
 Which is easier to read/write?
 Can use for array, ArrayList and more
Java 5 – Static imports
 Don't have to write Ports.X over and over and ...
Java 7 – Diamond Operator
 Less typing:
Java 7 - Underscores
 Make long numbers easier to read during the rush to
change code between matches:
Java 7 – Reading a file
 NIO.2 makes reading a file (or network connection or the
like) easier.
Also, now that we are on Java Standard Edition you
can use open source APIs such as
http://commons.apache.org/proper/commons-io/
Which lets you code:
String s = FileUtils.readFileToString(file);
Java 7 – try with resources
 Which is easier to read/write?
Java 8
 Lambdas and functional programming (way too much to
cover in one slide)
 Will likely not work with FRC APIs at least in 2015
 Consider whether you want to use this style of
programming when training your new team members.
 Like Groovy – might be less clear at first.
 Examples:
new Thread(() -> System.out.println(“foo”))
words.sort ((a,b) -> a.length() – b.length())
Multi-threading
 Remember we have 2 CPUs now.
 What can the second one do?
– Vision
– Logging
– Long running calculations
– Poll a sensor until some event happens
– Use your imagination!
Installing Java
 Java Platform (JDK) 8
http://www.oracle.com/technetwork/java/javase/downloads/i
ndex.html
(Or)
Not the micro
edition anymore!
Java Version Q&A
 Why doesn't Java know how to count? The
versions go 1.1, 1.2, 1.3, 1.4, 5, 6, 7, 8
Blame marketing!
 What's the difference between Java Micro
Edition (used by FRC until 2014) and the
“small memory” version (used by FRC starting
in 2015)?
Java Micro Edition didn't have a lot of the built in
Java functions that you can now use.
Installing Eclipse
 Eclipse Luna 4.4
https://www.eclipse.org/downloads/ (after 6/25/14)
https://www.eclipse.org/downloads/index-developer.php
(release candidate if trying before 6/25/14)
Eclipse is used more
“in the real world”
than NetBeans
Either the Eclipse Standard or
Eclipse IDE for Java
Developers is ok.
Standard uses less memory
and has everything we need
for FIRST
Eclipse Version Q&A
 Can I use an older version of Eclipse?
Yes, but it will not support Java 8 syntax
additions.
 What happens on 6/25/14?
Eclipse releases come out on the fourth
Wednesday of June.
Release Name Version Java supported
June 2012 Juno 4.2 Java 6 (also known as 1.6)
June 2013 Kepler 4.3 Java 7 (also known as 1.7)
June 2014 Luna 4.4 Java 8 (also known as 1.8)
Eclipse - Perspectives
 Eclipse has different “perspectives” (sets of views)
 Java and Resource
 Git/Svn and Team Synchronization
 FRC? (don't know if will be in 2015 plugin)
Eclipse - Views
 Views are screen elements
 Package explorer
 Problems
 Tasks – used for code with //TODO
 Console - output
 To add:
 Window > Show view > Console
Tip: Configure contents
Tip: Save launch configuration
 Run as > ___ …. lets you enter options
 On common tab can save those options
 Can even put them in SVN/Git because just a file
Tip: Variables
 Use a classpath variable for the FRC libraries so no
changes to project on different computers
Eclipse – Autocomplete
 Control + space
Warnings about FRC Eclipse plugin
 This is NOT the official plugin we will use in the 2014-
2015 season.
 It is the experimental version from 2011.
 I don't recommend installing it; this is just to get an idea of
the process
Installing the FRC Eclipse Plugin
 Help > Install New Software
 Enter URL http://first.wpi.edu/FRC/java/eclipse/update/
 Click add button
 Give it a name. I used “FRC-old” so I remember to
uninstall it before the season starts.
 Check FRC box
 Click next/accept license/next/finish. Restart Eclipse when
finishes download (This step uses the internet to
download the plugin)
Configuring FRC Eclipse Plugin
 Enter your team number in Eclipse global preferences
 Windows > Preferences on Windows/Linux
 Eclipse > Preferences on Mac
 Note difference between global and project
preferences
Creating a new project
 Just like NetBeans, create a new project
Creating a new component
 Right click where you want to add something
Running the Ant script
 Run As > FRC …
Note: Eclipse projects do not build using Ant automatically,
they have a .classpath file for the classpath
How to migrate NetBeans project?
 There isn't a generic way
 I recommend:
– Create a new Eclipse FRC project
– Copy the source code from the
NetBeans source directory
Questions
 About Java or Eclipse:
– Friendly forums for those new (or not
new) to Java
– http://www.coderanch.com
 For FRC specific questions:
– After the 2014-2015 plugins launch
– http://www.chiefdelphi.com
References
 Blog posts from Championships:
 http://www.selikoff.net/2014/04/25/first-wpilib-in-2015/
 How to get around the problem launching
Eclipse on a Mac:
http://www.selikoff.net/2013/06/29/eclipse-kepler-4-3-mac/
 Old plugin docs:
 https://subversion.assembla.com/svn/blue-
cheese/branches/2012/docs/Tutorials/FRCEclipsePluginS
etup.pdf

More Related Content

What's hot

Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)Pascal Rapicault
 
Java Presentation
Java PresentationJava Presentation
Java Presentationpm2214
 
Appium & Robot Framework
Appium & Robot FrameworkAppium & Robot Framework
Appium & Robot FrameworkFurkan Ertürk
 
Making Applications Work Together In Eclipse
Making Applications Work Together In EclipseMaking Applications Work Together In Eclipse
Making Applications Work Together In EclipseKaniska Mandal
 
bccon-2014 dev02 xpages-coffe-from-a-friend-using-third-party-java-libraries
bccon-2014 dev02 xpages-coffe-from-a-friend-using-third-party-java-librariesbccon-2014 dev02 xpages-coffe-from-a-friend-using-third-party-java-libraries
bccon-2014 dev02 xpages-coffe-from-a-friend-using-third-party-java-librariesICS User Group
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Engineor
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorialprad_123
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationRIA RUI Society
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - IntroductionAmr E. Mohamed
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideShareyayao
 
Great cup of java
Great  cup of javaGreat  cup of java
Great cup of javaCIB Egypt
 
Java byte code & virtual machine
Java byte code & virtual machineJava byte code & virtual machine
Java byte code & virtual machineLaxman Puri
 

What's hot (17)

Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Appium & Robot Framework
Appium & Robot FrameworkAppium & Robot Framework
Appium & Robot Framework
 
Making Applications Work Together In Eclipse
Making Applications Work Together In EclipseMaking Applications Work Together In Eclipse
Making Applications Work Together In Eclipse
 
bccon-2014 dev02 xpages-coffe-from-a-friend-using-third-party-java-libraries
bccon-2014 dev02 xpages-coffe-from-a-friend-using-third-party-java-librariesbccon-2014 dev02 xpages-coffe-from-a-friend-using-third-party-java-libraries
bccon-2014 dev02 xpages-coffe-from-a-friend-using-third-party-java-libraries
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
 
Java introduction
Java introductionJava introduction
Java introduction
 
Java notes
Java notesJava notes
Java notes
 
Java basics notes
Java basics notesJava basics notes
Java basics notes
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorial
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginners
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideShare
 
Great cup of java
Great  cup of javaGreat  cup of java
Great cup of java
 
Java byte code & virtual machine
Java byte code & virtual machineJava byte code & virtual machine
Java byte code & virtual machine
 

Viewers also liked

Viewers also liked (7)

Plano de estudos - nivel 5 - cae
Plano de estudos - nivel 5 - caePlano de estudos - nivel 5 - cae
Plano de estudos - nivel 5 - cae
 
FS 5 - Episode 9
FS 5 - Episode 9FS 5 - Episode 9
FS 5 - Episode 9
 
FS 5 - Episode 4
FS 5 - Episode 4FS 5 - Episode 4
FS 5 - Episode 4
 
FS 5 - Episode 5
FS 5 - Episode 5FS 5 - Episode 5
FS 5 - Episode 5
 
FS 5 - Episode 7
FS 5 - Episode 7FS 5 - Episode 7
FS 5 - Episode 7
 
FS 4: Episode 5
FS 4: Episode 5FS 4: Episode 5
FS 4: Episode 5
 
Table of specifications
Table of specificationsTable of specifications
Table of specifications
 

Similar to Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse

Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview Lars Vogel
 
Icsug conf 14_dev02_xpages-coffe-from-a-friend-using-third-party-java-libraries
Icsug conf 14_dev02_xpages-coffe-from-a-friend-using-third-party-java-librariesIcsug conf 14_dev02_xpages-coffe-from-a-friend-using-third-party-java-libraries
Icsug conf 14_dev02_xpages-coffe-from-a-friend-using-third-party-java-librariesICS User Group
 
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...Paul Withers
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
 
Introduction to Groovy Monkey
Introduction to Groovy MonkeyIntroduction to Groovy Monkey
Introduction to Groovy Monkeyjervin
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTIONProf Ansari
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTIONProf Ansari
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importancenishajj
 
ITU - MDD - Eclipse Plug-ins
ITU - MDD - Eclipse Plug-insITU - MDD - Eclipse Plug-ins
ITU - MDD - Eclipse Plug-insTonny Madsen
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manualnahalomar
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With SeleniumJodie Miners
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javajayc8586
 
Java interview question
Java interview questionJava interview question
Java interview questionsimplidigital
 
Eclipse_Building_Blocks
Eclipse_Building_BlocksEclipse_Building_Blocks
Eclipse_Building_BlocksRahul Shukla
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugLars Vogel
 

Similar to Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse (20)

Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Icsug conf 14_dev02_xpages-coffe-from-a-friend-using-third-party-java-libraries
Icsug conf 14_dev02_xpages-coffe-from-a-friend-using-third-party-java-librariesIcsug conf 14_dev02_xpages-coffe-from-a-friend-using-third-party-java-libraries
Icsug conf 14_dev02_xpages-coffe-from-a-friend-using-third-party-java-libraries
 
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
IBM ConnectED 2015 - BP106 From XPages Hero To OSGi Guru: Taking The Scary Ou...
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
 
01 spring-intro
01 spring-intro01 spring-intro
01 spring-intro
 
Introduction to Groovy Monkey
Introduction to Groovy MonkeyIntroduction to Groovy Monkey
Introduction to Groovy Monkey
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTION
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTION
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importance
 
ITU - MDD - Eclipse Plug-ins
ITU - MDD - Eclipse Plug-insITU - MDD - Eclipse Plug-ins
ITU - MDD - Eclipse Plug-ins
 
Java 9 Features
Java 9 FeaturesJava 9 Features
Java 9 Features
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manual
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java interview question
Java interview questionJava interview question
Java interview question
 
Eclipse_Building_Blocks
Eclipse_Building_BlocksEclipse_Building_Blocks
Eclipse_Building_Blocks
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ Rheinjug
 

More from Jeanne Boyarsky

Pathways intro january 2018
Pathways intro   january 2018Pathways intro   january 2018
Pathways intro january 2018Jeanne Boyarsky
 
Pathways path-comparison
Pathways path-comparisonPathways path-comparison
Pathways path-comparisonJeanne Boyarsky
 
2017 stuysplash-build-tools
2017 stuysplash-build-tools2017 stuysplash-build-tools
2017 stuysplash-build-toolsJeanne Boyarsky
 
2017 JavaOne Mutation Testing Session
2017 JavaOne Mutation Testing Session2017 JavaOne Mutation Testing Session
2017 JavaOne Mutation Testing SessionJeanne Boyarsky
 
java 8 Hands on Workshop
java 8 Hands on Workshopjava 8 Hands on Workshop
java 8 Hands on WorkshopJeanne Boyarsky
 
2016 java-sig-mutation-testing
2016 java-sig-mutation-testing2016 java-sig-mutation-testing
2016 java-sig-mutation-testingJeanne Boyarsky
 
2016 first-champs-java-cert
2016 first-champs-java-cert2016 first-champs-java-cert
2016 first-champs-java-certJeanne Boyarsky
 
2015 nyc-spin-collective-ownership
2015 nyc-spin-collective-ownership2015 nyc-spin-collective-ownership
2015 nyc-spin-collective-ownershipJeanne Boyarsky
 
Throw Away all the Rules: Now What Process do you Follow?
Throw Away all the Rules: Now What Process do you Follow?Throw Away all the Rules: Now What Process do you Follow?
Throw Away all the Rules: Now What Process do you Follow?Jeanne Boyarsky
 

More from Jeanne Boyarsky (20)

Pathways intro january 2018
Pathways intro   january 2018Pathways intro   january 2018
Pathways intro january 2018
 
Pathways path-comparison
Pathways path-comparisonPathways path-comparison
Pathways path-comparison
 
2017 stuysplash-build-tools
2017 stuysplash-build-tools2017 stuysplash-build-tools
2017 stuysplash-build-tools
 
Virtual scrum
Virtual scrumVirtual scrum
Virtual scrum
 
Ignite java-robots
Ignite java-robotsIgnite java-robots
Ignite java-robots
 
2017 JavaOne Mutation Testing Session
2017 JavaOne Mutation Testing Session2017 JavaOne Mutation Testing Session
2017 JavaOne Mutation Testing Session
 
java 8 Hands on Workshop
java 8 Hands on Workshopjava 8 Hands on Workshop
java 8 Hands on Workshop
 
2017 java9-spring-days
2017 java9-spring-days2017 java9-spring-days
2017 java9-spring-days
 
Pathways overview
Pathways overviewPathways overview
Pathways overview
 
2016 java-sig-mutation-testing
2016 java-sig-mutation-testing2016 java-sig-mutation-testing
2016 java-sig-mutation-testing
 
Ftc judging
Ftc judgingFtc judging
Ftc judging
 
2016 qcon-virtual-scrum
2016 qcon-virtual-scrum2016 qcon-virtual-scrum
2016 qcon-virtual-scrum
 
2016 java9-how-make-qus
2016 java9-how-make-qus2016 java9-how-make-qus
2016 java9-how-make-qus
 
2016 java9-how-make-qus
2016 java9-how-make-qus2016 java9-how-make-qus
2016 java9-how-make-qus
 
2016 first-champs-java-cert
2016 first-champs-java-cert2016 first-champs-java-cert
2016 first-champs-java-cert
 
2016 java8-cert-intro
2016 java8-cert-intro2016 java8-cert-intro
2016 java8-cert-intro
 
FTC 2015-2016 Judging
FTC 2015-2016 JudgingFTC 2015-2016 Judging
FTC 2015-2016 Judging
 
2015 nyc-spin-collective-ownership
2015 nyc-spin-collective-ownership2015 nyc-spin-collective-ownership
2015 nyc-spin-collective-ownership
 
FTC Robot C to Java
FTC Robot C to JavaFTC Robot C to Java
FTC Robot C to Java
 
Throw Away all the Rules: Now What Process do you Follow?
Throw Away all the Rules: Now What Process do you Follow?Throw Away all the Rules: Now What Process do you Follow?
Throw Away all the Rules: Now What Process do you Follow?
 

Recently uploaded

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 

Recently uploaded (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 

Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse

  • 1. Intro to Java 5-8 and Eclipse 6/8/14 Jeanne Boyarsky Programming Mentor FRC Team 694 Twitter @jeanneboyarsky Blog: http://www.selikoff.net Moderator on Java forums at: http://www.coderanch.com
  • 2. Java – “New” Features  This presentation is not a complete list.  Features most likely needed for FRC programming.  Includes: – Non-micro APIs from Java 1.4 (and below) – Java 5 new features – Java 7 new features – Java 8 new features – (Java 6 didn't have much)
  • 3. Java 1.4 non-Micro APIs  java.util.ArrayList – like an array, but grows dynamically (faster than a Vector)  java.lang.Math – more methods  java.util.Properties – read file in format key=value (example in Java 7 section)
  • 4. Java 5 – Generics/Autoboxing  Generics – you specify the type of the ArrayList and the compiler tells you if you use it wrong  Autoboxing – Java converts primitives (int, double, etc) to Objects and back for you
  • 5. Java 5 – Enhanced for loop  Which is easier to read/write?  Can use for array, ArrayList and more
  • 6. Java 5 – Static imports  Don't have to write Ports.X over and over and ...
  • 7. Java 7 – Diamond Operator  Less typing:
  • 8. Java 7 - Underscores  Make long numbers easier to read during the rush to change code between matches:
  • 9. Java 7 – Reading a file  NIO.2 makes reading a file (or network connection or the like) easier. Also, now that we are on Java Standard Edition you can use open source APIs such as http://commons.apache.org/proper/commons-io/ Which lets you code: String s = FileUtils.readFileToString(file);
  • 10. Java 7 – try with resources  Which is easier to read/write?
  • 11. Java 8  Lambdas and functional programming (way too much to cover in one slide)  Will likely not work with FRC APIs at least in 2015  Consider whether you want to use this style of programming when training your new team members.  Like Groovy – might be less clear at first.  Examples: new Thread(() -> System.out.println(“foo”)) words.sort ((a,b) -> a.length() – b.length())
  • 12. Multi-threading  Remember we have 2 CPUs now.  What can the second one do? – Vision – Logging – Long running calculations – Poll a sensor until some event happens – Use your imagination!
  • 13. Installing Java  Java Platform (JDK) 8 http://www.oracle.com/technetwork/java/javase/downloads/i ndex.html (Or) Not the micro edition anymore!
  • 14. Java Version Q&A  Why doesn't Java know how to count? The versions go 1.1, 1.2, 1.3, 1.4, 5, 6, 7, 8 Blame marketing!  What's the difference between Java Micro Edition (used by FRC until 2014) and the “small memory” version (used by FRC starting in 2015)? Java Micro Edition didn't have a lot of the built in Java functions that you can now use.
  • 15. Installing Eclipse  Eclipse Luna 4.4 https://www.eclipse.org/downloads/ (after 6/25/14) https://www.eclipse.org/downloads/index-developer.php (release candidate if trying before 6/25/14) Eclipse is used more “in the real world” than NetBeans Either the Eclipse Standard or Eclipse IDE for Java Developers is ok. Standard uses less memory and has everything we need for FIRST
  • 16. Eclipse Version Q&A  Can I use an older version of Eclipse? Yes, but it will not support Java 8 syntax additions.  What happens on 6/25/14? Eclipse releases come out on the fourth Wednesday of June. Release Name Version Java supported June 2012 Juno 4.2 Java 6 (also known as 1.6) June 2013 Kepler 4.3 Java 7 (also known as 1.7) June 2014 Luna 4.4 Java 8 (also known as 1.8)
  • 17. Eclipse - Perspectives  Eclipse has different “perspectives” (sets of views)  Java and Resource  Git/Svn and Team Synchronization  FRC? (don't know if will be in 2015 plugin)
  • 18. Eclipse - Views  Views are screen elements  Package explorer  Problems  Tasks – used for code with //TODO  Console - output  To add:  Window > Show view > Console
  • 20. Tip: Save launch configuration  Run as > ___ …. lets you enter options  On common tab can save those options  Can even put them in SVN/Git because just a file
  • 21. Tip: Variables  Use a classpath variable for the FRC libraries so no changes to project on different computers
  • 22. Eclipse – Autocomplete  Control + space
  • 23. Warnings about FRC Eclipse plugin  This is NOT the official plugin we will use in the 2014- 2015 season.  It is the experimental version from 2011.  I don't recommend installing it; this is just to get an idea of the process
  • 24. Installing the FRC Eclipse Plugin  Help > Install New Software  Enter URL http://first.wpi.edu/FRC/java/eclipse/update/  Click add button  Give it a name. I used “FRC-old” so I remember to uninstall it before the season starts.  Check FRC box  Click next/accept license/next/finish. Restart Eclipse when finishes download (This step uses the internet to download the plugin)
  • 25.
  • 26. Configuring FRC Eclipse Plugin  Enter your team number in Eclipse global preferences  Windows > Preferences on Windows/Linux  Eclipse > Preferences on Mac  Note difference between global and project preferences
  • 27. Creating a new project  Just like NetBeans, create a new project
  • 28. Creating a new component  Right click where you want to add something
  • 29. Running the Ant script  Run As > FRC … Note: Eclipse projects do not build using Ant automatically, they have a .classpath file for the classpath
  • 30. How to migrate NetBeans project?  There isn't a generic way  I recommend: – Create a new Eclipse FRC project – Copy the source code from the NetBeans source directory
  • 31. Questions  About Java or Eclipse: – Friendly forums for those new (or not new) to Java – http://www.coderanch.com  For FRC specific questions: – After the 2014-2015 plugins launch – http://www.chiefdelphi.com
  • 32. References  Blog posts from Championships:  http://www.selikoff.net/2014/04/25/first-wpilib-in-2015/  How to get around the problem launching Eclipse on a Mac: http://www.selikoff.net/2013/06/29/eclipse-kepler-4-3-mac/  Old plugin docs:  https://subversion.assembla.com/svn/blue- cheese/branches/2012/docs/Tutorials/FRCEclipsePluginS etup.pdf