Modularity Finally Approved For Java 9 (infoworld.com) 94
An anonymous reader quotes InfoWorld:With a new round of voting completed this week, the Java Community Process Executive Committee passed by a 24-0 vote the Java Platform Module System public review ballot, the subject of Java Specification Request 376. In May, the same group, citing concerns over the plan being disruptive and lacking consensus, voted the measure down, 13 to 10... Red Hat, which voted no on the previous ballot but abstained from the latest one, said there were still several items in the current proposal that it wanted further work on. "However, we do not want to delay the Java 9 release," Red Hat said. Getting "real world" feedback on the modularity system will be key to determine where further changes need to occur, Red Hat said. The Eclipse Foundation, Hazelcast, and Twitter, all of which voted no previously and yes this time around, cited sufficient progress with modularity.
Java 9 is still slated for release on September 21st.
Java 9 is still slated for release on September 21st.
Re: (Score:2)
Re: (Score:3, Insightful)
Casey Neistat has a video that defined success as people wanting to be like you. I'm not surprise that someone keeps posting as me on Slashdot. It's not like they have anything better to do with their life.
https://www.youtube.com/watch?v=3iQ8BGw13So [youtube.com]
Re: (Score:1)
Do you think Alec Baldwin wants to be Donald Trump?
Alec Baldwin is doing a job. My adoring fans have nothing better to do with their life. :/
Re: (Score:1)
Trust me, the 5 minutes a day I spend tracking your nonsense pays back with amusement, bemusement, and basic happiness that I'm not you!
You spend five minutes. I'm not sure about the others.
Re: (Score:1)
In your dreams, maybe
Re: (Score:2)
Not for Android development (although C++ can be usefull there too for use in libraries). But there Java 7 is the norm, when I use 8 it works but Android Studio keeps complaining about deprecated stuff in existing code. So I'm not even going to install 9, seems like a lot of work with no gain.
Re: (Score:2)
No, it's something about the use of underscores. No idea what's the problem, and since that's not mine code but someone else's I can't change it at will.
Re: (Score:2)
Not yet, but it is dying and will continue to do so for a long, long time. The problem is not even the mediocre language itself and the incredible bloat and complexity most of its uses come with, but that basically anybody competent learns something else. Java is the language of incompetent "coders" and prospective employers are slowly wising up.
Design be committee (Score:4, Insightful)
Re: (Score:1)
And Twitter is on that committee. WHAT???
Re:Design be committee (Score:5, Insightful)
The most successful and most widely used (programming) language on the planet is a disaster?
In what world do you live?
Re: (Score:2)
Indeed. Most Java "coders" live in a filter-bubble and have not realized that it does not get much lower in skill than they are.
Re: (Score:2)
It would be more helpful if people that hate Java would simply make a list of points they hate.
Then we could fix the points or educate the people.
On the other hand someone could stand up and simply write a GCC backend (or LLVM) that compiles to the JVM, then I could code in C++ again and had all benefits of the JVM and the huge library/framework eco system around it.
Re: (Score:1)
Fallacy or not, it's a tad better than just calling the language "a disaster" with no substantiation whatsoever.
If people want to know the ways in which Java has been a PITA, they can google it.
Re: (Score:1)
What does C have to do with anything?
Re: (Score:2)
The most successful and most widely used (programming) language on the planet is a disaster?
In what world do you live?
Java is the most widely supported and used language in the world, you can even get a well-paying job with it *gasp*, so it's too mainstream for the cool kids.
If you want to keep up appearances of being an 1337 haxxor and gain Slashdot cred you need to show contempt for Java and either support some new, cutting edge shit or some incredibly old, outdated shit nobody uses anymore, like Fortran.
What is modularity, exactly? (Score:5, Informative)
I am a professional programmer but I don't work with java, so I was confused about what, exactly, "modularity" means in this context. I clicked through a few links and found the info and figured I'd share here for anyone else in my position.
Java, as it stands, has no real mechanism for managing program dependencies (think, dynamic link libraries). Either a JAR file embeds all of the classes it uses or it loads external classes using something called the "class path system", where there is a programmatically accessible path where java code can look for class files to link in at runtime. This system is very simple, and lacks built-in versioning or encapsulation features. It's up to developers to build in their own versioning into the file structure. As you could guess, it's generally very brittle.
The new system replaces that with a concept of "modules". These are collections of classes with strong names, cryptographic signatures, version numbers, and members that are either public and advertised to code the imports the module, or private and for internal module use only. This is a huge step up from the idea of just going and loading class files out of some path. I'm actually astonished Java made it this far without such a feature!
You can find more info about the new module system here: http://openjdk.java.net/projec... [java.net]
Re: (Score:2, Informative)
so I was confused about what, exactly, "modularity" means in this context
The same thing it meant for the last forty years since Modula?
Re:What is modularity, exactly? (Score:5, Insightful)
Unfortunately not.
The parent is completely correct that using the term "module" or "modularity" in Java 9 is completely misleading.
It has absolutely nothing to do with any meaning of "module" in any other programming language.
Re: (Score:2)
Re:What is modularity, exactly? (Score:5, Informative)
I'm actually astonished Java made it this far without such a feature!
There is no language / system on the planet that has such a feature. Except Java 9.
class path system
Which works exactly like the LD_LIBRARY_PATH for any compiled language on Unix or the equivalent on Windows.
ActiveX (Score:2)
Could they be talking about something like COM and ActiveX? COM and ActiveX modules are nothing more than DLLs, but they are registered into the Registry and have versioning and All That Jazz. There is something called the Global Assembly Cache (GAC -- is this a Klingon delicacy?) in the .NET universe doing the same thing?
By that reasoning and way of bending the English language to their will, LD_LIBRARY_PATH is not a "modularity system" for loading a DLL whereas finding a COM or ActiveX module through
Re: (Score:2)
No, the things you mention are no such things.
The GUID and references for COM/ActiveX etc. are hard coded. They don't follow required versions etc.
You somehow wasted your breath :D
Re: (Score:2)
You are telling me that "versioning" in ActiveX is not a "thing"?
https://msdn.microsoft.com/en-... [microsoft.com]
Re: (Score:2)
Versioning is certainly a thing.
But if a required DLL is missing it is not downloaded and linked.
And if you had read the link you provided you had realized it has nothing to do with the Java Module system and transitive dependency management based on "required libraries and required versions of those".
Why are you wasting your and my time when you clearly have no clue about what we are actually talking?
Chill pill (Score:2)
How I spend my time is my own personal concern.
How you spend your time is your free-will choice.
Whether comments are meritorious is the domain of Moderation.
Yes, I do not know what "we are actually talking about." That is why I am offering analogies posed as questions. It seems that very few people commenting here "get" what the Java Module System does. How does this make you feel?
Re: (Score:2)
Lol, no particular feeling.
Actually wonder how wide spread the module system will be used.
After all we already have OSGi, and most people bundle all required libraries for deployment and use maven/ivy/gradle to build and retrieve and bundle everything.
I guess the module system will have options to access a maven/ivy repository ... never deeply dug into it.
I look at it from a teacher point of view: how to teach Java? So folks: "and as we have a complete unintuitive class with a static main method that prints
Re: (Score:2)
There is no language / system on the planet that has such a feature. Except Java 9.
I'm pretty sure that whatever modularity feature you can come up, Scheme most likely [readscheme.org] already has it. [readscheme.org]
Re: (Score:2)
This is a site that lists 'modules'. (based on the definition what a module is, as defined by the scheme standards)
Not a site about a module system as in Java 9. It is misnamed in Java 9 and should be called packet manager.
To answer your other post:
In Java everything is loaded dynamically and linked dynamically. To find libraries/*.jar files a "PATH" variable is used.
The first match is taken.
In the new module system, a library/starting executable can define dependencies, which most notable includes the vers
Re: (Score:2)
This is a site that lists 'modules'. (based on the definition what a module is, as defined by the scheme standards)
There wasn't a Scheme standard for modules until R6RS and many R6RS-avoiding Scheme implementations avoid R6RS-style modules.
Not a site about a module system as in Java 9. It is misnamed in Java 9 and should be called packet manager.
Why? There can still be a mapping between language modules and implementation packages. In fact, one would prefer a system where you don't have to care about the latter at all.
In the new module system, a library/starting executable can define dependencies, which most notable includes the version of the library it depends on.
Yes, there are Scheme versions of such features, which I mentioned. Racket behaves like this, [racket-lang.org] for example.
Re: (Score:2)
Looks in fact quite similar.
To bad it is Lisp ^_^
Re: (Score:1)
Which works exactly like the LD_LIBRARY_PATH for any compiled language ...
Actually, it doesn't. Library loading in runtime versus compile time.
The "class path system" is only a problem because of runtime.
If java was a compiled language, this wouldn't have ever been a problem.
Re: (Score:2)
Java is a compiled language.
And you are wrong.
The CLASSPATH works exactly like PATH and LD_LIBRARY_PATH.
Re: (Score:1)
I am a professional programmer but I don't work with java, so I was confused about what, exactly, "modularity" means in this context. I clicked through a few links and found the info and figured I'd share here for anyone else in my position.
Java, as it stands, has no real mechanism for managing program dependencies (think, dynamic link libraries). Either a JAR file embeds all of the classes it uses or it loads external classes using something called the "class path system", where there is a programmatically accessible path where java code can look for class files to link in at runtime. This system is very simple, and lacks built-in versioning or encapsulation features. It's up to developers to build in their own versioning into the file structure. As you could guess, it's generally very brittle.
The new system replaces that with a concept of "modules". These are collections of classes with strong names, cryptographic signatures, version numbers, and members that are either public and advertised to code the imports the module, or private and for internal module use only. This is a huge step up from the idea of just going and loading class files out of some path. I'm actually astonished Java made it this far without such a feature!
You can find more info about the new module system here: http://openjdk.java.net/projec... [java.net]
Java has had modularity for over a decade, but it just wasn't part of the language itself. It was called OSGi [osgi.org]. Jigsaw is effectively a cut down version of OSGi.
Re: (Score:2)
Thanks. Frankly it is astonishing that it took Java 22 years to get dependency handling right.
Re: (Score:2)
Thanks. Frankly it is astonishing that it took Java 22 years to get dependency handling right.
That's quite loaded statement.
1) Java has very good dependency mechanism for long time (since 2004 or so), bit similar to what you get with rpm/deb/etc, just on more fine-grained library level. Unlike rpm/deb/etc, it is single standard everybody follows. It is called maven (which is also a convoluted build system, but almost all other build systems have hooks into maven-standard dependency mechanism). It solves version mismatch issue by either using latest version for given dependency among declared options
Re: (Score:2)
According to the document you linked, the module system explicitly doesn't include versioning information, and it says "This is intentional:
Re: (Score:2)
There are two things I'd add to your description.
Firstly this is an attempt to split the core java libraries into pieces so you will be able to use only the pieces you need. eg; $ apt-get install java-headless. Due to the existing definitions of packages and classes, this could not be simply done by splitting the existing classes along package boundaries, a new abstraction was required.
Second, with Java's existing access controls of public, private, protected and default. There are quite a few occasions w
Is this "modularity" going to improve security? (Score:2)
Re: (Score:2)
... That's the whole point....
Well, if "that's the whole point," why don't I see significant mention of it? Or is security, yet again, little more than an add-on afterthought?
Re: (Score:2)
Re: (Score:2)
PHP and security should never, ever go in the same sentence.
Re: (Score:2)
Yes. It'll slow it down so much that intruders get bored or die before they can do anything.
Anything But Java (Score:1)
Re: (Score:2)
So what you're saying is your entire company missed the smartphone revolution?
Re: (Score:1)
it's a trap (Score:2)
Oracle will sue you.
Now what about support for unsigned values for da? (Score:3)
Re: (Score:1)
You mean unassigned? I so read up on autoboxing.
Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes. For example, converting an int to an Integer, a double to a Double, and so on. If the conversion goes the other way, this is called unboxing.
If you use Integer classes instead of int primitives, you can assign null. But mathematical operations on those classes are still written like primitives.
Re: (Score:2)
Re: (Score:2)
char is unsigned, works for me.
Java Language Specification [oracle.com]
Re: (Score:2)
Is this 'modularity' as in nodejs? (Score:2)
It sounds like it's something along the lines of nodejs and npm. But frankly, the wording on anything about leaves the reader wondering, "Doesn't this already exist?"