Your SlideShare is downloading. ×
0
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 Yam...
Java7                          Project Coin•       Java1.4.2•                              Java5•                         ...
Java7(or Java6)                               (            )Copyright(c) Yusuke Yamamoto All rights reserved.
613978                                                     1688      Copyright(c) Yusuke Yamamoto All rights reserved.
Java52009    10          31                                                             613978                            ...
Java52009    10          31                                                             613             Java1.4.2978      ...
Java52009    10          31                                                             613             Java1.4.2978      ...
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_2...
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)...
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 -versionjava version "1.6.0_26"Java(TM) SE Runtime Environment (build 1.6.0_26...
Java7                        Java6    Unsupported major.minor version 51.0             major version(                     ...
Copyright(c) Yusuke Yamamoto All rights reserved.
Java6        $ javac -target 1.4 Java7Grammar.java        javac: source release 1.7 requires target        release 1.7✔   ...
-target jsr14                         enum               generics                        for                autoboxing1.4....
-target jsr14                         enum               generics                        for                autoboxing1.4....
Java1.4.2                                                     enum                1.4.2•   StringBuilder                  ...
1.4.2                              5                              6  •        } catch (NoSuchMethodException | ClassNotFou...
•                    API    ‣       String#contains()        Copyright(c) Yusuke Yamamoto All rights reserved.
• Java7            (                        )Java1.4.2                6• Coin•                                            ...
Java7   Copyright(c) Yusuke Yamamoto All rights reserved.
Upcoming SlideShare
Loading in...5
×

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

7,474

Published on

Published in: Technology, News & Politics
0 Comments
16 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
7,474
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
30
Comments
0
Likes
16
Embeds 0
No embeds

No notes for slide

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

  1. 1. Java7 2011/7/7 Copyright(c) Yusuke Yamamoto All rights reserved.
  2. 2. @yusukey -• Java JavaEE• Twitter4J ” ” http://samuraism.jp/• Twitter API• 7 15 Copyright(c) Yusuke Yamamoto All rights reserved.
  3. 3. Java7 Project Coin• Java1.4.2• Java5• Java1.4.2+Java1.4.2 / Java5 Copyright(c) Yusuke Yamamoto All rights reserved.
  4. 4. Java7(or Java6) ( )Copyright(c) Yusuke Yamamoto All rights reserved.
  5. 5. 613978 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  6. 6. Java52009 10 31 613978 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  7. 7. Java52009 10 31 613 Java1.4.2978 2008 10 31 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  8. 8. Java52009 10 31 613 Java1.4.2978 2008 10 31Java62006 12 11 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  9. 9. Copyright(c) Yusuke Yamamoto All rights reserved.
  10. 10. Java6 Copyright(c) Yusuke Yamamoto All rights reserved.
  11. 11. Java for Business Java6 1.6.0_26 1.6.0_26 Java5 1.5.0_22 1.5.0_30Java1.4.2 1.4.2_19 1.4.2_32http://www.oracle.com/technetwork/java/javase/6u26releasenotes-401875.html Copyright(c) Yusuke Yamamoto All rights reserved.
  12. 12. Copyright(c) Yusuke Yamamoto All rights reserved.
  13. 13. Java1.4.2 Java5 Copyright(c) Yusuke Yamamoto All rights reserved.
  14. 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. 15. Copyright(c) Yusuke Yamamoto All rights reserved.
  16. 16. Java6 Java7 Copyright(c) Yusuke Yamamoto All rights reserved.
  17. 17. Copyright(c) Yusuke Yamamoto All rights reserved.
  18. 18. Java7 Java6$ java -versionjava 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/ Java7GrammarException 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. 19. Java7 Java6 Unsupported major.minor version 51.0 major version( 7,8 )48(0x30): Java1.449(0x31): Java550(0x32): Java651(0x33): Java7 minor major Copyright(c) Yusuke Yamamoto All rights reserved.
  20. 20. Copyright(c) Yusuke Yamamoto All rights reserved.
  21. 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. 22. -target jsr14 enum generics for autoboxing1.4.2 ✔ ✔ ✔ ✔ 5 ✔ ✔ ✔ ✔ ✔ ✔ 6 ✔ ✔ ✔ ✔ ✔ ✔ String-switch <> try-with -resources1.4.2 ✔ ✔ ✔ 5 ✔ ✔ ✔ 6 ✔ ✔ ✔ Copyright(c) Yusuke Yamamoto All rights reserved.
  23. 23. -target jsr14 enum generics for autoboxing1.4.2 ✔ ✔ ✔ ✔ 5 ✔ ✔ ✔ ✔ ✔ ✔ 6 ✔ ✔ ✔ ✔ ✔ ✔ String-switch <> try-with -resources1.4.2 ✔ ✔ ✔ 5 ✔ ✔ ✔ 6 ✔ ✔ ✔ Copyright(c) Yusuke Yamamoto All rights reserved.
  24. 24. Java1.4.2 enum 1.4.2• StringBuilder (API ) ‣ + StringBuilder -target jsr14 StringBuffer• enum• ‣ @Override Copyright(c) Yusuke Yamamoto All rights reserved.
  25. 25. 1.4.2 5 6 •        } catch (NoSuchMethodException | ClassNotFoundException) { e.printStackTrace(); throw e;Exception in thread "main" java.lang.NoClassDefFoundError: java/lang/ReflectiveOperationExceptionCaused by: java.lang.ClassNotFoundException:java.lang.ReflectiveOperationException Copyright(c) Yusuke Yamamoto All rights reserved.
  26. 26. • API ‣ String#contains() Copyright(c) Yusuke Yamamoto All rights reserved.
  27. 27. • Java7 ( )Java1.4.2 6• Coin• Java6 maven https://github.com/yusuke/java7grammarTwitter4J -target jsr14 https://github.com/yusuke/twitter4j Copyright(c) Yusuke Yamamoto All rights reserved.
  28. 28. Java7 Copyright(c) Yusuke Yamamoto All rights reserved.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×