SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Java7



                2011/7/7



   Copyright(c) Yusuke Yamamoto All rights reserved.
@yusukey -
• Java JavaEE
• Twitter4J ”    ”

  http://samuraism.jp/




• Twitter API
• 7 15
                 Copyright(c) Yusuke Yamamoto All rights reserved.
Java7                          Project Coin


•       Java1.4.2

•                              Java5

•                                                    Java1.4.2+



Java1.4.2 / Java5


           Copyright(c) Yusuke Yamamoto All rights reserved.
Java7(or Java6)
                               (            )


Copyright(c) Yusuke Yamamoto All rights reserved.
613

978

                                                     1688
      Copyright(c) Yusuke Yamamoto All rights reserved.
Java5
2009    10          31
                                                             613

978

                                                        1688
         Copyright(c) Yusuke Yamamoto All rights reserved.
Java5
2009    10          31
                                                             613
             Java1.4.2
978          2008                     10               31


                                                        1688
         Copyright(c) Yusuke Yamamoto All rights reserved.
Java5
2009    10          31
                                                             613
             Java1.4.2
978          2008                     10               31

Java6
2006    12          11
                                                        1688
         Copyright(c) Yusuke Yamamoto All rights reserved.
Copyright(c) Yusuke Yamamoto All rights reserved.
Java6



        Copyright(c) Yusuke Yamamoto All rights reserved.
Java for Business


  Java6                 1.6.0_26                                  1.6.0_26

  Java5                 1.5.0_22                                  1.5.0_30

Java1.4.2               1.4.2_19                                  1.4.2_32


http://www.oracle.com/technetwork/java/javase/6u26releasenotes-401875.html


                   Copyright(c) Yusuke Yamamoto All rights reserved.
Copyright(c) Yusuke Yamamoto All rights reserved.
Java1.4.2           Java5




            Copyright(c) Yusuke Yamamoto All rights reserved.
Java5 7

•   Java5   annotation, enum, generics,                              for ,
                               , Auto(un)boxing

• Java6                                               @Override,
            @Generated

• Java7     String-switch,
                                                 ,
            try-with-resources


                 Copyright(c) Yusuke Yamamoto All rights reserved.
Copyright(c) Yusuke Yamamoto All rights reserved.
Java6 Java7




  Copyright(c) Yusuke Yamamoto All rights reserved.
Copyright(c) Yusuke Yamamoto All rights reserved.
Java7                           Java6


$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
$ java -cp classes/ Java7Grammar
Exception in thread "main" java.lang.UnsupportedClassVersionError:
Java7Grammar : Unsupported major.minor version 51.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)




                    Copyright(c) Yusuke Yamamoto All rights reserved.
Java7                        Java6

    Unsupported major.minor version 51.0


             major version
(                                          7,8                       )
48(0x30): Java1.4
49(0x31): Java5
50(0x32): Java6
51(0x33): Java7                                      minor               major

                 Copyright(c) Yusuke Yamamoto All rights reserved.
Copyright(c) Yusuke Yamamoto All rights reserved.
Java6


        $ javac -target 1.4 Java7Grammar.java
        javac: source release 1.7 requires target
        release 1.7




✔   $ javac -target jsr14 Java7Grammar.java


         Java1.4.2+



              Copyright(c) Yusuke Yamamoto All rights reserved.
-target jsr14
                         enum               generics                        for                autoboxing


1.4.2                                             ✔                   ✔              ✔            ✔
  5         ✔               ✔                     ✔                   ✔              ✔            ✔
  6         ✔               ✔                     ✔                   ✔              ✔            ✔

        String-switch                                                  <>          try-with
                                                                                  -resources

1.4.2       ✔               ✔                                         ✔
  5         ✔               ✔                                         ✔
  6         ✔               ✔                                         ✔
                        Copyright(c) Yusuke Yamamoto All rights reserved.
-target jsr14
                         enum               generics                        for                autoboxing


1.4.2                                             ✔                   ✔              ✔            ✔
  5         ✔               ✔                     ✔                   ✔              ✔            ✔
  6         ✔               ✔                     ✔                   ✔              ✔            ✔

        String-switch                                                  <>          try-with
                                                                                  -resources

1.4.2       ✔               ✔                                         ✔
  5         ✔               ✔                                         ✔
  6         ✔               ✔                                         ✔
                        Copyright(c) Yusuke Yamamoto All rights reserved.
Java1.4.2
                                                     enum
                1.4.2
•   StringBuilder                   (API                                )
     ‣ +                                                                StringBuilder
                                  -target jsr14                                 StringBuffer


•   enum

•
     ‣                                                                            @Override

                    Copyright(c) Yusuke Yamamoto All rights reserved.
1.4.2
                              5
                              6
  •
        } catch (NoSuchMethodException | ClassNotFoundException) {
            e.printStackTrace();
            throw e;



Exception in thread "main" java.lang.NoClassDefFoundError: java/
lang/ReflectiveOperationException
Caused by: java.lang.ClassNotFoundException:
java.lang.ReflectiveOperationException

                           Copyright(c) Yusuke Yamamoto All rights reserved.
•                    API


    ‣       String#contains()




        Copyright(c) Yusuke Yamamoto All rights reserved.
• Java7            (                        )Java1.4.2                6

• Coin
•                                              Java6

          maven

  https://github.com/yusuke/java7grammar
Twitter4J -target jsr14

  https://github.com/yusuke/twitter4j
                  Copyright(c) Yusuke Yamamoto All rights reserved.
Java7




   Copyright(c) Yusuke Yamamoto All rights reserved.

Contenu connexe

Plus de Yusuke Yamamoto

WebStormから始まる快適Web開発ワークフロー #html5jk
WebStormから始まる快適Web開発ワークフロー #html5jkWebStormから始まる快適Web開発ワークフロー #html5jk
WebStormから始まる快適Web開発ワークフロー #html5jkYusuke Yamamoto
 
データクラスから始めるKotlin / JetBrainsに行ってきました #kotlin_kansai #jkug
データクラスから始めるKotlin / JetBrainsに行ってきました #kotlin_kansai #jkug データクラスから始めるKotlin / JetBrainsに行ってきました #kotlin_kansai #jkug
データクラスから始めるKotlin / JetBrainsに行ってきました #kotlin_kansai #jkug Yusuke Yamamoto
 
Troubleshooting Slowdowns, Freezes, Deadlocks : Introduction to Thread Dump #...
Troubleshooting Slowdowns, Freezes, Deadlocks : Introduction to Thread Dump #...Troubleshooting Slowdowns, Freezes, Deadlocks : Introduction to Thread Dump #...
Troubleshooting Slowdowns, Freezes, Deadlocks : Introduction to Thread Dump #...Yusuke Yamamoto
 
カジュアルにスレッドダンプ - @yusuke #javacasual
カジュアルにスレッドダンプ - @yusuke #javacasualカジュアルにスレッドダンプ - @yusuke #javacasual
カジュアルにスレッドダンプ - @yusuke #javacasualYusuke Yamamoto
 
Excel方眼紙アプリケーションサーバと侍の新機能 #jjug
Excel方眼紙アプリケーションサーバと侍の新機能 #jjugExcel方眼紙アプリケーションサーバと侍の新機能 #jjug
Excel方眼紙アプリケーションサーバと侍の新機能 #jjugYusuke Yamamoto
 
Twitter4jハンズオン 5/1 #twtr_hack
Twitter4jハンズオン 5/1 #twtr_hackTwitter4jハンズオン 5/1 #twtr_hack
Twitter4jハンズオン 5/1 #twtr_hackYusuke Yamamoto
 
株式会社サムライズム@samuraismがcoincheck for ECを使ってビットコイン決済に対応した話 #gbdaitokai
株式会社サムライズム@samuraismがcoincheck for ECを使ってビットコイン決済に対応した話 #gbdaitokai 株式会社サムライズム@samuraismがcoincheck for ECを使ってビットコイン決済に対応した話 #gbdaitokai
株式会社サムライズム@samuraismがcoincheck for ECを使ってビットコイン決済に対応した話 #gbdaitokai Yusuke Yamamoto
 
Botを使った業務効率化 / Java8を使ったBot実装効率化 @yusuke #jjug
Botを使った業務効率化 / Java8を使ったBot実装効率化 @yusuke #jjugBotを使った業務効率化 / Java8を使ったBot実装効率化 @yusuke #jjug
Botを使った業務効率化 / Java8を使ったBot実装効率化 @yusuke #jjugYusuke Yamamoto
 
Twitter API最新事情 - API Meetup Tokyo #1 #apijp
Twitter API最新事情 - API Meetup Tokyo #1 #apijpTwitter API最新事情 - API Meetup Tokyo #1 #apijp
Twitter API最新事情 - API Meetup Tokyo #1 #apijpYusuke Yamamoto
 
Java デバッガ活用術 ~勘デバッグ・print デバッグから抜けだそう~ #jjug_ccc #ccc_h4
Java デバッガ活用術 ~勘デバッグ・print デバッグから抜けだそう~ #jjug_ccc #ccc_h4Java デバッガ活用術 ~勘デバッグ・print デバッグから抜けだそう~ #jjug_ccc #ccc_h4
Java デバッガ活用術 ~勘デバッグ・print デバッグから抜けだそう~ #jjug_ccc #ccc_h4Yusuke Yamamoto
 
貧乏人のHeroku活用術 #herokujp
貧乏人のHeroku活用術 #herokujp貧乏人のHeroku活用術 #herokujp
貧乏人のHeroku活用術 #herokujpYusuke Yamamoto
 
リーンスタートアップ x Java #jjug #jjug_ccc #ccc_h4
リーンスタートアップ x Java #jjug #jjug_ccc #ccc_h4リーンスタートアップ x Java #jjug #jjug_ccc #ccc_h4
リーンスタートアップ x Java #jjug #jjug_ccc #ccc_h4Yusuke Yamamoto
 
JavaScript時代のJava #kansumiB7 #kansumi
JavaScript時代のJava #kansumiB7 #kansumiJavaScript時代のJava #kansumiB7 #kansumi
JavaScript時代のJava #kansumiB7 #kansumiYusuke Yamamoto
 
テンプレートエンジンの話 #jjug
テンプレートエンジンの話 #jjugテンプレートエンジンの話 #jjug
テンプレートエンジンの話 #jjugYusuke Yamamoto
 
失敗から学ぶAPI設計 #ccc_h4 #jjug #jjug_ccc JJUG CCC 2013 Spring
失敗から学ぶAPI設計  #ccc_h4 #jjug #jjug_ccc JJUG CCC 2013 Spring 失敗から学ぶAPI設計  #ccc_h4 #jjug #jjug_ccc JJUG CCC 2013 Spring
失敗から学ぶAPI設計 #ccc_h4 #jjug #jjug_ccc JJUG CCC 2013 Spring Yusuke Yamamoto
 
HerokuでJava7 #herokujp #waza
HerokuでJava7 #herokujp #wazaHerokuでJava7 #herokujp #waza
HerokuでJava7 #herokujp #wazaYusuke Yamamoto
 
2013年3月20日 Tech Compass #tecomp #きのこる
2013年3月20日 Tech Compass #tecomp #きのこる2013年3月20日 Tech Compass #tecomp #きのこる
2013年3月20日 Tech Compass #tecomp #きのこるYusuke Yamamoto
 
Twitter API1.1 #twtr_hack
Twitter API1.1 #twtr_hackTwitter API1.1 #twtr_hack
Twitter API1.1 #twtr_hackYusuke Yamamoto
 
Twitter Cards #twtr_hack
Twitter Cards #twtr_hackTwitter Cards #twtr_hack
Twitter Cards #twtr_hackYusuke Yamamoto
 
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudyスローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudyYusuke Yamamoto
 

Plus de Yusuke Yamamoto (20)

WebStormから始まる快適Web開発ワークフロー #html5jk
WebStormから始まる快適Web開発ワークフロー #html5jkWebStormから始まる快適Web開発ワークフロー #html5jk
WebStormから始まる快適Web開発ワークフロー #html5jk
 
データクラスから始めるKotlin / JetBrainsに行ってきました #kotlin_kansai #jkug
データクラスから始めるKotlin / JetBrainsに行ってきました #kotlin_kansai #jkug データクラスから始めるKotlin / JetBrainsに行ってきました #kotlin_kansai #jkug
データクラスから始めるKotlin / JetBrainsに行ってきました #kotlin_kansai #jkug
 
Troubleshooting Slowdowns, Freezes, Deadlocks : Introduction to Thread Dump #...
Troubleshooting Slowdowns, Freezes, Deadlocks : Introduction to Thread Dump #...Troubleshooting Slowdowns, Freezes, Deadlocks : Introduction to Thread Dump #...
Troubleshooting Slowdowns, Freezes, Deadlocks : Introduction to Thread Dump #...
 
カジュアルにスレッドダンプ - @yusuke #javacasual
カジュアルにスレッドダンプ - @yusuke #javacasualカジュアルにスレッドダンプ - @yusuke #javacasual
カジュアルにスレッドダンプ - @yusuke #javacasual
 
Excel方眼紙アプリケーションサーバと侍の新機能 #jjug
Excel方眼紙アプリケーションサーバと侍の新機能 #jjugExcel方眼紙アプリケーションサーバと侍の新機能 #jjug
Excel方眼紙アプリケーションサーバと侍の新機能 #jjug
 
Twitter4jハンズオン 5/1 #twtr_hack
Twitter4jハンズオン 5/1 #twtr_hackTwitter4jハンズオン 5/1 #twtr_hack
Twitter4jハンズオン 5/1 #twtr_hack
 
株式会社サムライズム@samuraismがcoincheck for ECを使ってビットコイン決済に対応した話 #gbdaitokai
株式会社サムライズム@samuraismがcoincheck for ECを使ってビットコイン決済に対応した話 #gbdaitokai 株式会社サムライズム@samuraismがcoincheck for ECを使ってビットコイン決済に対応した話 #gbdaitokai
株式会社サムライズム@samuraismがcoincheck for ECを使ってビットコイン決済に対応した話 #gbdaitokai
 
Botを使った業務効率化 / Java8を使ったBot実装効率化 @yusuke #jjug
Botを使った業務効率化 / Java8を使ったBot実装効率化 @yusuke #jjugBotを使った業務効率化 / Java8を使ったBot実装効率化 @yusuke #jjug
Botを使った業務効率化 / Java8を使ったBot実装効率化 @yusuke #jjug
 
Twitter API最新事情 - API Meetup Tokyo #1 #apijp
Twitter API最新事情 - API Meetup Tokyo #1 #apijpTwitter API最新事情 - API Meetup Tokyo #1 #apijp
Twitter API最新事情 - API Meetup Tokyo #1 #apijp
 
Java デバッガ活用術 ~勘デバッグ・print デバッグから抜けだそう~ #jjug_ccc #ccc_h4
Java デバッガ活用術 ~勘デバッグ・print デバッグから抜けだそう~ #jjug_ccc #ccc_h4Java デバッガ活用術 ~勘デバッグ・print デバッグから抜けだそう~ #jjug_ccc #ccc_h4
Java デバッガ活用術 ~勘デバッグ・print デバッグから抜けだそう~ #jjug_ccc #ccc_h4
 
貧乏人のHeroku活用術 #herokujp
貧乏人のHeroku活用術 #herokujp貧乏人のHeroku活用術 #herokujp
貧乏人のHeroku活用術 #herokujp
 
リーンスタートアップ x Java #jjug #jjug_ccc #ccc_h4
リーンスタートアップ x Java #jjug #jjug_ccc #ccc_h4リーンスタートアップ x Java #jjug #jjug_ccc #ccc_h4
リーンスタートアップ x Java #jjug #jjug_ccc #ccc_h4
 
JavaScript時代のJava #kansumiB7 #kansumi
JavaScript時代のJava #kansumiB7 #kansumiJavaScript時代のJava #kansumiB7 #kansumi
JavaScript時代のJava #kansumiB7 #kansumi
 
テンプレートエンジンの話 #jjug
テンプレートエンジンの話 #jjugテンプレートエンジンの話 #jjug
テンプレートエンジンの話 #jjug
 
失敗から学ぶAPI設計 #ccc_h4 #jjug #jjug_ccc JJUG CCC 2013 Spring
失敗から学ぶAPI設計  #ccc_h4 #jjug #jjug_ccc JJUG CCC 2013 Spring 失敗から学ぶAPI設計  #ccc_h4 #jjug #jjug_ccc JJUG CCC 2013 Spring
失敗から学ぶAPI設計 #ccc_h4 #jjug #jjug_ccc JJUG CCC 2013 Spring
 
HerokuでJava7 #herokujp #waza
HerokuでJava7 #herokujp #wazaHerokuでJava7 #herokujp #waza
HerokuでJava7 #herokujp #waza
 
2013年3月20日 Tech Compass #tecomp #きのこる
2013年3月20日 Tech Compass #tecomp #きのこる2013年3月20日 Tech Compass #tecomp #きのこる
2013年3月20日 Tech Compass #tecomp #きのこる
 
Twitter API1.1 #twtr_hack
Twitter API1.1 #twtr_hackTwitter API1.1 #twtr_hack
Twitter API1.1 #twtr_hack
 
Twitter Cards #twtr_hack
Twitter Cards #twtr_hackTwitter Cards #twtr_hack
Twitter Cards #twtr_hack
 
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudyスローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
スローダウン、ハングを一発解決 スレッドダンプはトラブルシューティングの味方 #wlstudy
 

Dernier

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Dernier (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Java7シンタックスで レガシーコードを快適メンテナンス

  • 1. Java7 2011/7/7 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 2. @yusukey - • Java JavaEE • Twitter4J ” ” http://samuraism.jp/ • Twitter API • 7 15 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 3. Java7 Project Coin • Java1.4.2 • Java5 • Java1.4.2+ Java1.4.2 / Java5 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 4. Java7(or Java6) ( ) Copyright(c) Yusuke Yamamoto All rights reserved.
  • 5. 613 978 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 6. Java5 2009 10 31 613 978 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 7. Java5 2009 10 31 613 Java1.4.2 978 2008 10 31 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 8. Java5 2009 10 31 613 Java1.4.2 978 2008 10 31 Java6 2006 12 11 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 9. Copyright(c) Yusuke Yamamoto All rights reserved.
  • 10. Java6 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 11. Java for Business Java6 1.6.0_26 1.6.0_26 Java5 1.5.0_22 1.5.0_30 Java1.4.2 1.4.2_19 1.4.2_32 http://www.oracle.com/technetwork/java/javase/6u26releasenotes-401875.html Copyright(c) Yusuke Yamamoto All rights reserved.
  • 12. Copyright(c) Yusuke Yamamoto All rights reserved.
  • 13. Java1.4.2 Java5 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 14. Java5 7 • Java5 annotation, enum, generics, for , , Auto(un)boxing • Java6 @Override, @Generated • Java7 String-switch, , try-with-resources Copyright(c) Yusuke Yamamoto All rights reserved.
  • 15. Copyright(c) Yusuke Yamamoto All rights reserved.
  • 16. Java6 Java7 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 17. Copyright(c) Yusuke Yamamoto All rights reserved.
  • 18. Java7 Java6 $ java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode) $ java -cp classes/ Java7Grammar Exception in thread "main" java.lang.UnsupportedClassVersionError: Java7Grammar : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) Copyright(c) Yusuke Yamamoto All rights reserved.
  • 19. Java7 Java6 Unsupported major.minor version 51.0 major version ( 7,8 ) 48(0x30): Java1.4 49(0x31): Java5 50(0x32): Java6 51(0x33): Java7 minor major Copyright(c) Yusuke Yamamoto All rights reserved.
  • 20. Copyright(c) Yusuke Yamamoto All rights reserved.
  • 21. Java6 $ javac -target 1.4 Java7Grammar.java javac: source release 1.7 requires target release 1.7 ✔ $ javac -target jsr14 Java7Grammar.java Java1.4.2+ Copyright(c) Yusuke Yamamoto All rights reserved.
  • 22. -target jsr14 enum generics for autoboxing 1.4.2 ✔ ✔ ✔ ✔ 5 ✔ ✔ ✔ ✔ ✔ ✔ 6 ✔ ✔ ✔ ✔ ✔ ✔ String-switch <> try-with -resources 1.4.2 ✔ ✔ ✔ 5 ✔ ✔ ✔ 6 ✔ ✔ ✔ Copyright(c) Yusuke Yamamoto All rights reserved.
  • 23. -target jsr14 enum generics for autoboxing 1.4.2 ✔ ✔ ✔ ✔ 5 ✔ ✔ ✔ ✔ ✔ ✔ 6 ✔ ✔ ✔ ✔ ✔ ✔ String-switch <> try-with -resources 1.4.2 ✔ ✔ ✔ 5 ✔ ✔ ✔ 6 ✔ ✔ ✔ Copyright(c) Yusuke Yamamoto All rights reserved.
  • 24. Java1.4.2 enum 1.4.2 • StringBuilder (API ) ‣ + StringBuilder -target jsr14 StringBuffer • enum • ‣ @Override Copyright(c) Yusuke Yamamoto All rights reserved.
  • 25. 1.4.2 5 6 •         } catch (NoSuchMethodException | ClassNotFoundException) { e.printStackTrace(); throw e; Exception in thread "main" java.lang.NoClassDefFoundError: java/ lang/ReflectiveOperationException Caused by: java.lang.ClassNotFoundException: java.lang.ReflectiveOperationException Copyright(c) Yusuke Yamamoto All rights reserved.
  • 26. API ‣ String#contains() Copyright(c) Yusuke Yamamoto All rights reserved.
  • 27. • Java7 ( )Java1.4.2 6 • Coin • Java6 maven https://github.com/yusuke/java7grammar Twitter4J -target jsr14 https://github.com/yusuke/twitter4j Copyright(c) Yusuke Yamamoto All rights reserved.
  • 28. Java7 Copyright(c) Yusuke Yamamoto All rights reserved.