SlideShare a Scribd company logo
1 of 32
Download to read offline
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)
Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
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

.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptxHansamali Gamage
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTxtailishbaloch
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarThousandEyes
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024Brian Pichman
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIVijayananda Mohire
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kitJamie (Taka) Wang
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveIES VE
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applicationsnooralam814309
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch TuesdayIvanti
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTopCSSGallery
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInThousandEyes
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...DianaGray10
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 

Recently uploaded (20)

.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAI
 
SheDev 2024
SheDev 2024SheDev 2024
SheDev 2024
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kit
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch Tuesday
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development Companies
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 

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)
  • 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