Slashdot Mirror


The Future of Java?

Todd AvErth writes "Judge Motz recently ordered Microsoft to distribute Sun's JVM with every Windows product. Salon decided to pipe up about it with an editorial musing about whether or not it's too late. Most of it isn't all that interesting, but some of the comments from Ximian developer, Miguel de Icaza point to the advantage of being able to compile from multiple languages. Anyone know of any projects to compile JVM bytecode from other languages?" Update: 01/23 16:00 GMT by M : Comments were disallowed when this story was originally posted; fixed now. My mistake (although KDE3's stupid mouseover-activates-form-elements user interface, now finally fixed in the latest versions, has to take some blame too).

11 of 475 comments (clear)

  1. Languages for the Java VM... by The+Wookie · · Score: 5, Informative

    can be found here.

    It doesn't mention SmartEiffel, though, which does generate byte codes. There are probably many others as well.

    1. Re:Languages for the Java VM... by lgraba · · Score: 5, Informative

      Here are a few of the more notable Java Processors ones:

      www.ajile.com (and www.systronix.com has a few boards built witht the processors).

      www.ptsc.com

      Also, the Jazelle technology from ARM embeds a java processor section into an ARM chip:

      http://www.arm.com/armtech/jazelle?OpenDocument

    2. Re:Languages for the Java VM... by Corvus9 · · Score: 4, Informative
      ... can be found here
      Many posters mention this page. In fact, I have spoken with other Java advocates who mention this page as proof the JVM is language-neutral. However, they do not mention that most of the "languages" on this page are Java interpreters or code generators, and nearly all the remainder are vapourware or proposals, not actual shipping products.

      Rogers Sessions took the time to investigate every single one of the projects on the JVM languages page. He posted his results to the ObjectWatch site. After long research, he found only 8 that were actual implementations of a non-Java programming language for the JVM. Of those 8, in his opinion not one was available or suitable for professional development.

      In his conclusion he states "I believe that Simon Phipps and other Sun luminaries have greatly exaggerated the degree of language neutrality supported by the Java platform".

  2. Apple Cocoa by MouseR · · Score: 4, Informative

    Apple's Cocoa framework, based on Objective-C, has all been exposed to Java.

    Both languages share so much of the same concepts that both languages can call in each other, allowing a project to be composed of both Obj-C and java.

    Given Apple's recent extensions to Obj-C, the so-called Objective-C++, you can actually mix C, C++ and Obj-C source code in the same file and interchangeably make cals to and from C++ classes and obj-C classes. Then, calling Java is nearly as trivial.

    These changes are finding their way back into the GCC compiler, which is the standard compiler for the Project builder environment.

  3. Jython by dbarry · · Score: 5, Informative

    Anyone know of any projects to compile JVM bytecode from other languages?

    Jython
    # Dynamic compilation to Java bytecodes - leads to highest possible performance without sacrificing interactivity.
    # Ability to extend existing Java classes in Jython - allows effective use of abstract classes.
    # Optional static compilation - allows creation of applets, servlets, beans, ...
    # Bean Properties - make use of Java packages much easier.
    # Python Language - combines remarkable power with very clear syntax. It also supports a full object-oriented programming model which makes it a natural fit for Java's OO design.

  4. Re:The Future of Java? Even Brighter!! by mooZENDog · · Score: 5, Informative

    I agree completely with your comments on the future of Java as a server side solution. JSP, servlets, and J2EE are all fantastic.

    Sure Swing is a little sluggish, but when everyone is running a p4 2GHz, it really doesn't matter....

    But it does matter, if other programming languages still run relatively faster than Java. I agree that it's not as clunky as it was a few years ago though... *shudder*

    Two things I feel you've left out are:
    1 - The embedded systems market. When I was at Uni this was being touted as the next best thing. I don't have any real statistics for you, but I'm sure Java is doing well in this field.
    2 - The mobile phone market. Pretty similar to my first point, the KVM (Kilobyte VM - a cut-down version of JVM) and related APIs in J2ME are a big player in the mobile phone business. The company I work for is developing mobile phone games, and Java has got the support of the handset manufacturers, which will give it superiority over other technologies that havn't had as good an uptake.

    --

    ---
    "An eye for an eye leaves the whole world blind" - Gandhi
  5. JVM actually has more languages than .NET (CLR) by borkbork · · Score: 4, Informative

    The page you list shows a hundred or so that run on the JVM. A similar page for .NET shows only 27.

    Not what the marketing folks at Microsoft would have you believe, huh?

    --
    ---- There is a fine line between sayings that make sense.
  6. Re:Java is NOT in danger, sun is. by JordanH · · Score: 4, Informative
    • Notice that GCC is not GPL, since it being GPL would cause everything to become GPL as well.

    Huh? I think you'll find that GCC is most certainly licensed exclusively under the GPL.

    I think you need some education on what the GPL requires. The GNU FAQ explicitly covers the question of whether programs compiled with GCC are GPL'd (they are not).

  7. Programming for the Java Virtual Machine by jfengel · · Score: 4, Informative
    I wrote a book on the subject of translating other languages into JVM bytecodes. It's called Programming for the Java Virtual Machine, from Addison-Wesley, and you can pick it up at Amazon

    So speaking as a nominal expert, while you certainly can translate non-Java languages into bytecodes, the machine clearly isn't designed to be general-use. It has a lot of object-oriented instructions that fit the Java object model and not a lot else. You can adapt them to your language, or you can ignore them and code everything up as one big method call (except that you'll run out of space, since function size is limited, and you can't modify it once written).

    I've successfully adapted languages like Prolog and Lisp, and taken advantage of Java objects to provide the continuation-like features of these languages. I've even found a couple of places where you can generate code which could not come from Java code but which is legal and verifiable (e.g. crossed loops).

    I use it mostly for small projects. For example, Ontology Works generates Java APIs for its custom database description languages. It generates the bytecodes directly, since the APIs are too large to be conveniently compiled from Java. But that's not a general-purpose language, so the code is actually fairly simple.

    I've only glanced at CLI, but it appears to be somewhat more general purpose than JVM bytecodes. (In the end it's all Turing tar pit.) However, CLI a bit more heavily oriented towards calling out to native code, which makes the code less portable and harder to optimize. The JVM also supports native methods, but they receive a lot less encouragement.

    Mostly, I'm a huge fan of the way JVM does verification. It's brilliant that you can restrict code to safe code and still be Turing complete by eliminating a large class of safe-but-invalid instruction sequences. You can make huge optimizations to verified code that you can't make to generalized code. Verification also allows much more fine-grained authorization than the Microsoft way, which is all based on signed code.

    You always want to choose the best language for the job. C/C++/Java are largely identical, and I think in general a group should pick one and stick to it. But there are languages (Lisp, Prolog, Haskell) which are genuinely different, and I consider it a good thing that you can write compilers for them. That has yet to completely fulfill its promise on the JVM platform, where there are proofs of the concept but they are little used.

  8. Re:Java hype by quasi_steller · · Score: 4, Informative
    The Wookie writes:
    This is another that C++ can do, but you have to do extra work for it. There are plenty of times when a Java program runs off the end of an array. Instead of giving me a core dump and killing the program (if I'm lucky), I get a nice little exception that I can handle. The same goes for referencing a null pointer (reference).

    Well, I am not a java programmer, so I don't know about java, but It seems to me that you are using C arrays in C++. The STL provides several data structures that are indended to replace C arrays. These include vector, and list, both of which dynamically allocate their size and automatically resize if you overflow thier bounds:

    int main()
    {
    vector<MyClass> vec_myclass;
    MyClass temp;
    ifstream fin;

    while(!fin)
    {
    fin >> temp;
    vec_myclass.pushback(temp);
    }

    cout << vec_myclass.size();
    return 0;
    }

    The user doesn't even need to check the size, although that is provided.

    --
    ...interesting if true.