Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
Java Oracle

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.
This discussion has been archived. No new comments can be posted.

Modularity Finally Approved For Java 9

Comments Filter:
  • by 110010001000 ( 697113 ) on Sunday July 02, 2017 @01:04PM (#54730015) Homepage Journal
    Definitely proves that Java is "design by committee" considering there were 24 votes. No wonder it is such a disaster.
    • by Anonymous Coward

      And Twitter is on that committee. WHAT???

    • by angel'o'sphere ( 80593 ) on Sunday July 02, 2017 @01:21PM (#54730089) Journal

      The most successful and most widely used (programming) language on the planet is a disaster?
      In what world do you live?

      • by Anonymous Coward

        What does C have to do with anything?

      • 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.

  • by ZackSchil ( 560462 ) on Sunday July 02, 2017 @01:09PM (#54730027)

    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?

    • by angel'o'sphere ( 80593 ) on Sunday July 02, 2017 @01:30PM (#54730121) Journal

      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.

      • 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

        • 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

          • You are telling me that "versioning" in ActiveX is not a "thing"?

            https://msdn.microsoft.com/en-... [microsoft.com]

            • 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?

              • 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?

                • 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

      • 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]

        • 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

          • 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.

      • 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.

    • by Anonymous Coward

      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.

    • Thanks. Frankly it is astonishing that it took Java 22 years to get dependency handling right.

      • by abies ( 607076 )

        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

    • by pjt33 ( 739471 )

      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.

      According to the document you linked, the module system explicitly doesn't include versioning information, and it says "This is intentional:

    • 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

  • That's my biggest concern with java.
    • Yes, everyone should stick to PHP and C until they do something about the security issues in Java.
    • Yes. It'll slow it down so much that intruders get bored or die before they can do anything.

  • by Anonymous Coward
    We haven't written anything new in Java in several years, and if it weren't for legacy products that need ongoing support, we would abandon it altogether.
  • Oracle will sue you.

  • Apparently that has been done a bit, but I personally would love to see full support, proper support, for unsigned values in data types if it hasn't been done already.
    • by kfh227 ( 1219898 )

      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.

      • I mean unsigned - as in, a value that can only be positive, versuses a signed value, which can be positive or negative. For example, an unsigned byte can have values from 0 to 255, whereas a signed byte value goes from -128 to +127
    • char is unsigned, works for me.

      Java Language Specification [oracle.com]

      4.2. Primitive Types and Values

      The integral types are byte, short, int, and long, whose values are 8-bit, 16-bit, 32-bit and 64-bit signed two's-complement integers, respectively, and char, whose values are 16-bit unsigned integers [representing UTF-16 code units (Â3.1).]

      • I guess that is what I was thinking of when I talked about limited unsigned support in Java - it would be nice though if we could have unsigned bytes too, though.
  • 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?"

Memory fault -- core...uh...um...core... Oh dammit, I forget!

Working...