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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Project Jigsaw: Complete

184 点作者 artbristol超过 7 年前

10 条评论

clra超过 7 年前
I don&#x27;t follow Java too closely and the world &quot;module&quot; is so hopelessly generic that I had a hard time understanding what the article was talking about. It links to this document [1] though, which is a long read, but does an excellent job of describing of describing all the ins and outs of the module system.<p>(tl;dr Packages can now declare themselves as modules instead of simple namespaces, and they get to choose exactly what they export and what other modules they require. Projects can now resolve their types from within modules with a <i>module path</i> instead of on a per-type basis from the class path. It&#x27;s a huge step forward for Java modularity and dependency management.)<p>I have a hard time being <i>too</i> impressed because more modern languages are doing this out of the gates and with far fewer hacks and more out-of-the-box tooling (e.g. Rust), but acknowledge just how monumental of an effort it was to design the new system and then build it into Java&#x27;s core in a way that&#x27;s mostly backwards-compatible. Java&#x27;s going to be around for a long time, and this is a big long-term gain for the ecosystem.<p>I&#x27;d <i>really</i> love to see languages like Ruby tackle this next. It&#x27;s sorely needed.<p>---<p>[1] <a href="http:&#x2F;&#x2F;openjdk.java.net&#x2F;projects&#x2F;jigsaw&#x2F;spec&#x2F;sotms&#x2F;" rel="nofollow">http:&#x2F;&#x2F;openjdk.java.net&#x2F;projects&#x2F;jigsaw&#x2F;spec&#x2F;sotms&#x2F;</a>
评论 #15326671 未加载
评论 #15328326 未加载
评论 #15326213 未加载
评论 #15328450 未加载
评论 #15326942 未加载
评论 #15328741 未加载
评论 #15327762 未加载
评论 #15329973 未加载
djhworld超过 7 年前
I think it&#x27;s going to take me a while to learn about the module system in Java 9, I&#x27;m probably going to bank on watching other projects do it first to see if any best practises emerge as developers get used to the new way of working.<p>One thing I will say though is Java 9 has had a definite improvement on Java applications that run on my Raspberry Pi 3, I think because this got included <a href="http:&#x2F;&#x2F;openjdk.java.net&#x2F;jeps&#x2F;297" rel="nofollow">http:&#x2F;&#x2F;openjdk.java.net&#x2F;jeps&#x2F;297</a><p>One application used to take 55s to start up, now it takes around 15s!
评论 #15326530 未加载
评论 #15328400 未加载
评论 #15326509 未加载
评论 #15326723 未加载
fndrplayer13超过 7 年前
I think its very exciting they were able to get the number of discrete modules up to 26. That&#x27;s extremely impressive to me given the age and complexity of Java! I went to a talk a few years back from one of the contributors to this project (forget the name, sorry!) and I think if my memory serves me they had significantly fewer discrete modules at that time -- perhaps 6?<p>Anyhow, I think this is a great step forward for Java.
morecoffee超过 7 年前
Jigsaw was what held up the Java 9 released, due to some members rejecting the proposal. It was changed and revoted upon, but it&#x27;s hard to follow what was modified to make it acceptable.<p>Is there anywhere the design goals and constraints for modules are? I&#x27;d really like to know how they ended up in their current form.
评论 #15326458 未加载
didibus超过 7 年前
I&#x27;m still not sure of the practical benefits? Seems to be purely for IOT and nothing else. Am I correct?<p>Edit: To add to my question, jar hell was solved by tooling which generates your classpath for you. So it hasn&#x27;t been an issue for me in years. And they refused to add versioning, so you still need to use those tools. Strong encapsulation just means they disabled reflection access to non public members, which I consider a regression on functionality. Either way, not a particularly useful feature to me, in fact it breaks some of my code. So I&#x27;m left with being able to have small JVMs which don&#x27;t bundle the full standard lib, which seems to be mostly of use for memory constrained environments like IOT. But I&#x27;m actually hopeful there&#x27;s some bigger practical benefits I&#x27;m not thinking of, so I&#x27;d love to hear from people who know more about jigsaw.
评论 #15328417 未加载
sverhagen超过 7 年前
In the organization I work for, we&#x27;re contemplating a move from Oracle JDK to OpenJDK, when we move from 8 to 9. I&#x27;m still nervous about OpenJDK from some historical scary stories of things not working well in OpenJDK or at least different. I&#x27;ve not found much on the subject, or even on OpenJDK as a functioning open source project. (Or is it just a code drop of the Oracle JDK?) If anyone has good insights, or links to some realistic comparisons, I&#x27;d be thrilled.
评论 #15328000 未加载
puppetmaster30超过 7 年前
I think this is for people that had issues w&#x2F; &#x27;jar hell&#x27;. I did not.
评论 #15327258 未加载
评论 #15327826 未加载
smegel超过 7 年前
Does it have any positive impact on startup time for simple programs if you are not loading large chunks of the JVM?
评论 #15326224 未加载
sscarduzio超过 7 年前
Will this resolve the slow start problem in serverless apps?
评论 #15327438 未加载
badsectoracula超过 7 年前
I remember this from... 11 or so years ago, i think. I was making some Java applet based game and the slow startup time and big JVM download was something that an issue among people making such games (which by the time i was into were dying - although they&#x27;d soon get a short lived shot in the arm thanks to Minecraft, but that was later). There were some posts in javagaming.org forums from some people who were talking with Sun (that was before Oracle - Sun at the time was actually interested into uses of Java in gaming and talked with devs, including from smaller&#x2F;indie developers) about a new improvement for the VM to modularize the packages so that only things that are required would be loaded (faster startup) and the default JVM download would be much smaller (sort of comparable to Flash) which was a big issue at the time for those making web-based games (that niche for Java games would soon die with the introduction of Flash Player 9 and ActionScript 3, although it took a bit for people to actually upgrade).<p>I remember it was released at some point, but at the end it didn&#x27;t amount to much since most of the JVM&#x27;s actual implementation relied on everything else and the &quot;optional&quot; bits were only a small part, so it didn&#x27;t help almost at all with applets. And by that time Java applet gaming was dead (it never reached Flash gaming&#x27;s heights, but for a few years in the early&#x2F;mid 2000s it was still something you could make a living off - if you didn&#x27;t expect much).<p>I never heard about it much after that and personally moved away from Java with Flash becoming dominant on the web game scene and soon with Oracle being an dick to everyone. The only reason i used Java was for NetBeans&#x27; GUI editor for my tools but with Lazarus [0] becoming very stable by that time and NetBeans looking and behaving weird in my -then- brand new iMac, i abandoned Java for good (the only active Java project i still have is a tilemap editor [1] but this only if you stretch &quot;active&quot; to &quot;hack on it a little every few years&quot;).<p>I also never liked Java much after Java 1.4 - it moved further away from its &quot;simple language&quot; roots and i liked how everything was solved in the library instead of adding extra stuff to the language. Well, that, and things like generics felt very &quot;bolted on&quot; while annotations like `@override` felt unnecessary verbosity (and ugly syntax-wise).<p>My favorite Java was probably around 1.1 or so (i have a book on that too), some times i think i should make a new language and VM after it but i lose interest quickly - i think i have a bunch of parsers for Java-1.1-like languages lying around in my backups, from every time i get that urge :-P.<p>[0] <a href="http:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.lazarus-ide.org&#x2F;</a> [1] <a href="http:&#x2F;&#x2F;runtimeterror.com&#x2F;rep&#x2F;mapas" rel="nofollow">http:&#x2F;&#x2F;runtimeterror.com&#x2F;rep&#x2F;mapas</a>
评论 #15328484 未加载
评论 #15327249 未加载