TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Java 7 is now available

341 点作者 Mitt将近 14 年前

27 条评论

j_col将近 14 年前
You can now finally use a string in a switch statement, hurray (it's the little things that make me happy)!<p><a href="http://download.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html" rel="nofollow">http://download.oracle.com/javase/7/docs/technotes/guides/la...</a>
评论 #2817716 未加载
评论 #2817621 未加载
spullara将近 14 年前
InvokeDynamic is a pretty awesome new feature in JDK7 and will likely be tranformative for dyanmic languages on the JVM. For my mustache.java templating solution it increased performance on an integration benchmark by 25%.<p><a href="http://groups.google.com/group/mustachejava/browse_thread/thread/24b6c59d2ea55f04" rel="nofollow">http://groups.google.com/group/mustachejava/browse_thread/th...</a>
coverband将近 14 年前
Did they always have this clause in the Java license, or is it new to Oracle's release?<p>"These Supplemental License Terms add to or modify the terms of the Binary Code License Agreement....<p>A. COMMERCIAL FEATURES. You may not use the Commercial Features for running Programs, Java applets or applications in your internal business operations or for any commercial or production purpose, or for any purpose other than as set forth in Sections B, C, D and E of these Supplemental Terms. If You want to use the Commercial Features for any purpose other than as permitted in this Agreement, You must obtain a separate license from Oracle."<p>Sections mentioned are: B. SOFTWARE INTERNAL USE FOR DEVELOPMENT LICENSE GRANT. ... Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce internally and use internally the Software complete and unmodified for the purpose of designing, developing, and testing your Programs.<p>C. LICENSE TO DISTRIBUTE SOFTWARE. ... Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute the Software, provided that (i) you distribute the Software complete and unmodified and only bundled as part of, and for the sole purpose of running, your Programs, (ii) the Programs add significant and primary functionality to the Software, (iii) you do not distribute additional software intended to replace any component(s) of the Software, (iv) you do not remove or alter any proprietary legends or notices contained in the Software, (v) you only distribute the Software subject to a license agreement that: (a) is a complete, unmodified reproduction of this Agreement; or (b) protects Oracle's interests consistent with the terms contained in this Agreement and that includes the notice ...<p>D. LICENSE TO DISTRIBUTE REDISTRIBUTABLES. ... Oracle grants you a non-exclusive, non-transferable, limited license without fees to reproduce and distribute those files specifically identified as redistributable in the README File ("Redistributables") ...<p>E. DISTRIBUTION BY PUBLISHERS. This section pertains to your distribution of the JavaTM SE Development Kit Software with your printed book or magazine ....<p>Maybe I'm reading too much into it, because of the Android lawsuit?
评论 #2819641 未加载
评论 #2819210 未加载
famousactress将近 14 年前
Meh. The world turns. I spent a decade developing primarily in Java, and the last few years were really disappointing. The community splintered, the language and platform really lost any ability to maintain momentum. I might have been stoked about Java 7 three years ago (when it should have come out).
评论 #2817497 未加载
评论 #2817630 未加载
评论 #2817602 未加载
kragen将近 14 年前
Looks like this version is not open source. Is there an open-source version of Java 7? Edit: Yes! <a href="http://openjdk.java.net/" rel="nofollow">http://openjdk.java.net/</a> has an announcement at <a href="http://mail.openjdk.java.net/pipermail/announce/2011-July/000106.html" rel="nofollow">http://mail.openjdk.java.net/pipermail/announce/2011-July/00...</a>. So why would anybody "accept the Oracle Binary Code License Agreement for Java SE"?
评论 #2817898 未加载
评论 #2817836 未加载
评论 #2817758 未加载
评论 #2818878 未加载
评论 #2818881 未加载
rkalla将近 14 年前
There is a good amount of <i>stuff</i> to get excited about in this release.<p><pre><code> - Try-with-resources-Catch-Block [0] - Fork/Join libraries from Doug Lea (author of Executor framework) [1] - Inferred/Simpler generics in declarations (should have been in Java 5) - NIO2, brand new/robust filesystem APIs [2] - NIO2, treat ZIP/JAR files like directories of files for R/W [3] - SDP support [4] - String-in-switch (NOTE: check on performance implications of this for tight loops) NOTE: Read through "COMPILATION" section here for details [6] - Elliptic curve cryptography (when normal curves just don't cut it) - Underscores in numbers (e.g. int million = 1_000_000;) - XRender pipeline on Linux (Swing/Java2D rendering get a big boost) - New sound synthesizer (replaces a proprietary lib that wasn't OS) - XML stack finally got updated across the board. - InvokeDynamic (already talked about numerous times below) - Other Swing stuff I'm not all that pumped about. </code></pre> I think the most exciting items are:<p><pre><code> 1. Try-with-resources 2. NIO2 filesystem API 3. InvokeDynamic </code></pre> Features that got pushed to 8 (next year) that will be really exciting:<p><pre><code> - Modular programming (super packages? think OSGi-lite) - Syntactic Sugar: Collection literals List&#60;String&#62; people = {"Frank", "Mary", "Satan"}; - Closures - Modularization of the JDK (JDK gets broken into core modules) </code></pre> And one that I can't get confirmation on if it's in 7 or got pushed, index-access for List and Maps [5]:<p><pre><code> - List&#60;String&#62; people = {"Frank", "Mary", "Satan"}; System.out.println("Hello " + people[0]); </code></pre> I understand that a lot of people don't find Java sexy any more, that is understandable, it has become a platform for what seems like a lot of next-series of languages.<p>That being said, I've been working with Java since 1998 and still love it. I know people get a big kick out of writing code with no exception handlers and no curly braces, and programming <i>is</i> a creative/artistic process so you have to do what feels good... but none of that stuff ever bothered me.<p>I like being a pedantic programmer.<p>[0] <a href="http://www.javacodegeeks.com/2011/07/java-7-try-with-resources-explained.html" rel="nofollow">http://www.javacodegeeks.com/2011/07/java-7-try-with-resourc...</a><p>[1] <a href="http://artisans-serverintellect-com.si-eioswww6.com/default.asp?W9" rel="nofollow">http://artisans-serverintellect-com.si-eioswww6.com/default....</a><p>[2] <a href="http://openjdk.java.net/projects/jdk7/features/#f250" rel="nofollow">http://openjdk.java.net/projects/jdk7/features/#f250</a><p>[3] <a href="http://openjdk.java.net/projects/jdk7/features/#fa537814" rel="nofollow">http://openjdk.java.net/projects/jdk7/features/#fa537814</a><p>[4] <a href="http://openjdk.java.net/projects/jdk7/features/#f639" rel="nofollow">http://openjdk.java.net/projects/jdk7/features/#f639</a><p>[5] <a href="http://mail.openjdk.java.net/pipermail/coin-dev/2009-March/001108.html" rel="nofollow">http://mail.openjdk.java.net/pipermail/coin-dev/2009-March/0...</a><p>[6] <a href="http://mail.openjdk.java.net/pipermail/coin-dev/2009-February/000001.html" rel="nofollow">http://mail.openjdk.java.net/pipermail/coin-dev/2009-Februar...</a>
评论 #2818180 未加载
评论 #2819372 未加载
评论 #2817914 未加载
评论 #2818101 未加载
评论 #2818280 未加载
评论 #2818551 未加载
评论 #2818874 未加载
评论 #2819205 未加载
评论 #2818646 未加载
nkassis将近 14 年前
So for languages like Clojure,Scala does this offer any new feature for them?
评论 #2817462 未加载
评论 #2817460 未加载
评论 #2817448 未加载
评论 #2817451 未加载
bromagosa将近 14 年前
«JSR TBD: Project Lambda Lambda expressions (informally, "closures") and defender methods for the Java programming language»<p>Welcome to the sixties, Java!<p>Sorry, I couldn't help it &#62;:D
评论 #2817325 未加载
nextparadigms将近 14 年前
Does it come with more patents? Serious question.<p>I'm thinking Oracle tried to put a lot more locks on this version of Java, to make it <i>theirs</i>, and not so open source anymore.
评论 #2818252 未加载
macmac将近 14 年前
Watch out for the Commercial Features as defined in table 1.1 of this document <a href="http://www.oracle.com/technetwork/java/javase/documentation/java-se-product-editions-397069.pdf" rel="nofollow">http://www.oracle.com/technetwork/java/javase/documentation/...</a><p>Commercial Features appears to be jRockit technology.
Emore将近 14 年前
Anyone know why an OS X release is not on the list?
评论 #2817863 未加载
评论 #2817329 未加载
评论 #2817327 未加载
评论 #2818840 未加载
评论 #2817345 未加载
johnnyo将近 14 年前
I'm glad to see it's finally available.<p>I'm especially happy to see some of the language syntax that makes your standard try/catch/finally blocks a little cleaner and less error prone.
评论 #2817256 未加载
rubyorchard将近 14 年前
Too little to show for 5 years.
评论 #2817669 未加载
评论 #2817967 未加载
sgt将近 14 年前
Having created several "enterprise" systems in Java, I'm now looking into Mono, because there are some aspects of Java that I'm simply tired of having to deal with again and again. So far it looks very interesting and it works really well on Linux and OS X. Anyone here got experience with using Mono (and possibly Fluent NHibernate, WCF, ASP.NET MVC, etc) in the "enterprise" environment?
_mayo将近 14 年前
Does anyone have a link to the changelog?
评论 #2817258 未加载
msx将近 14 年前
<a href="http://mail-archives.apache.org/mod_mbox/lucene-java-user/201107.mbox/%3C001601cc4d6b$37618880$a6249980$@apache.org%3E" rel="nofollow">http://mail-archives.apache.org/mod_mbox/lucene-java-user/20...</a><p>that worried me little bit. what do you think ?
suprgeek将近 14 年前
Making sure that the people excited about Java 7 wait until this gets patched <a href="http://news.ycombinator.com/item?id=2820204" rel="nofollow">http://news.ycombinator.com/item?id=2820204</a>
kennystone将近 14 年前
Good for Oracle. There are (reasonable) concerns about their ownership of Java, but at least it's moving forward again.
gmosx将近 14 年前
A great release (professionally handled by Oracle), but still I am waiting for Java 8 (esp. closures + modules)
dmitrykoval将近 14 年前
Have anyone done any performance comparison with the openjdk yet? GC related tests would be of high interest :)
gnoupi将近 14 年前
Pity though that Swing didn't get much love in this release. But I guess that's the course of things.
jzoidberg将近 14 年前
Awesome IO stuff - finally we have great cross platform file handling.
fleitz将近 14 年前
Awesome, so java finally has closures &#38; lambdas?
dstywho将近 14 年前
closures yet?
评论 #2817309 未加载
评论 #2817346 未加载
czDev将近 14 年前
oh man, can't wait to use closures in my Java code
评论 #2818314 未加载
clobber将近 14 年前
Excellent. Looking forward to the memory enhancements that should help make Minecraft servers less of a hog :)
zszugyi将近 14 年前
Too little, too late.
评论 #2817861 未加载