Java7シンタックスで レガシーコードを快適メンテナンス
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
7,942
On Slideshare
6,239
From Embeds
1,703
Number of Embeds
15

Actions

Shares
Downloads
29
Comments
0
Likes
15

Embeds 1,703

http://samuraism.jp 1,449
https://twitter.com 166
url_unknown 47
http://webcache.googleusercontent.com 11
http://localhost 8
http://131.253.14.98 4
http://a0.twimg.com 4
http://www.slideshare.net 4
http://www.samuraism.jp 3
http://slideclip.b-prep.com 2
http://twitter.com 1
http://us-w1.rockmelt.com 1
http://paper.li 1
https://si0.twimg.com 1
http://translate.googleusercontent.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 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. 613978 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 6. Java52009 10 31 613978 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 7. Java52009 10 31 613 Java1.4.2978 2008 10 31 1688 Copyright(c) Yusuke Yamamoto All rights reserved.
  • 8. Java52009 10 31 613 Java1.4.2978 2008 10 31Java62006 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_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. 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 -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. 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. 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 autoboxing1.4.2 ✔ ✔ ✔ ✔ 5 ✔ ✔ ✔ ✔ ✔ ✔ 6 ✔ ✔ ✔ ✔ ✔ ✔ String-switch <> try-with -resources1.4.2 ✔ ✔ ✔ 5 ✔ ✔ ✔ 6 ✔ ✔ ✔ Copyright(c) Yusuke Yamamoto All rights reserved.
  • 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. 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/ReflectiveOperationExceptionCaused 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/java7grammarTwitter4J -target jsr14 https://github.com/yusuke/twitter4j Copyright(c) Yusuke Yamamoto All rights reserved.
  • 28. Java7 Copyright(c) Yusuke Yamamoto All rights reserved.