Java 7 (22 posts)

  • Profile picture of Eggsworth Eggsworth7p said 9 months, 3 weeks ago:

    This is probably a really dumb question, but I thought I would ask rather than risking messing my current configuration up.

    My question is simple, should JME3 work under the Java 7 framework or should I expect to experience bugs with it?

    Thanks

  • Profile picture of Momoko_Fan Momoko_Fan366p said 9 months, 3 weeks ago:

    Java 7 is supposed to be backwards compatible so yeah jME3 should work correctly

  • Profile picture of normen normen1271p said 9 months, 3 weeks ago:

    No it doesn’t

  • Profile picture of wezrule wezrule190p said 9 months, 3 weeks ago:

    i wouldn’t advise using java 7 until its public release. I made a program in it, but no one could run it unless they went to the dev page and explicitly downloaded it, which no one wanted to do.

  • Profile picture of jameskilton jameskilton said 9 months, 3 weeks ago:

    Wezrule, as of the time of the OP, Java 7 IS officially released.

    Unfortunately there is a very serious loop optimizer bug in Hotspot with the current release, it’s recommended you not use Java 7 or at least be sure to turn off loop optimizations if you do:

    http://www.lucidimagination.com/search/document/1a0d3986e48a9348/warning_index_corruption_and_crashes_in_apache_lucene_core_apache_solr_with_java_7

  • Profile picture of wezrule wezrule190p said 9 months, 3 weeks ago:

    oh right hmm, I still see Version 6 Update 26 when I go to the general public download page.

  • Profile picture of jameskilton jameskilton said 9 months, 3 weeks ago:

    Yeah I haven’t seen that page update yet but the SDK is an official release[1], and OpenJDK has official releases[2] now as well. It’s probably still smart for most people to stay on Java 6 as it’s proven and stable, but JME should ensure that it works under Java 7 now. I’ve heard many reports of better performance due to a much improved memory model, and unrelated to JME directly, this is the first official release of Java with the invokedynamic bytecode. If you follow JVM languages like JRuby you’ll understand why this is so important.

    [1] http://www.oracle.com/technetwork/java/javase/downloads/index.html
    [2] http://code.google.com/p/openjdk-osx-build/downloads/list

  • Profile picture of wezrule wezrule190p said 9 months, 3 weeks ago:

    ah kk, thanks for the info, much appreciated. I think I will stick with Java 6 for the meantime. But there are a few things I liked about java 7 when I did use it, such as being as able to use strings in switch statements, and an efficient Watcher class to check for file changes in a directory. So I am still excited :]

  • Profile picture of normen normen1271p said 9 months, 3 weeks ago:

    Effectively its just easier to write code with the new switch statements etc. The compiler will always make it very efficient code, no matter if you use a series of if statements or a switch. Actually in jMP (and NetBeans) you can easily convert code using if/else to the new string switch with the click of a button when you use Java7. But again, Java7 is not yet 100% compatible to jme3 atm (yes, that way round ;) )

  • Profile picture of jameskilton jameskilton said 9 months, 3 weeks ago:

    I’m still rather new to JME so this is just curiosity talking, but what parts of JME don’t currently work under Java 7? It’s supposed to be fully backwards compatible, but we all know how well that can work.

  • Profile picture of Eggsworth Eggsworth7p said 9 months, 3 weeks ago:

    Thanks for all the input guys. Supposedly there is some Fork/Join functionality for concurrency which looks promising, which is why I ask.

  • Profile picture of Momoko_Fan Momoko_Fan366p said 9 months, 3 weeks ago:

    There are reports of Java 7 breaking LWJGL.
    Do not use Java 7 with jME3 until further notice …

  • Profile picture of ozonegrif ozonegrif14p said 3 months, 3 weeks ago:

    Hello,

    Is JME working with Java 7 Update 2 ?
    I heard the loop bug in HotSpot has been fixed.
    Any feedback about it ?

    Thank you :)

  • Profile picture of Empire Phoenix Empire Phoenix156p said 3 months, 3 weeks ago:

    Works fine, but I see no feelable performance difference to the 6 one.

  • Profile picture of ozonegrif ozonegrif14p said 3 months, 3 weeks ago:

    From what I read, it averages to be about 15% faster than Java 6 thanks to a new garbage collector, and a better management of Arrays outbound checks (double speed!). I use a lots of Arrays in my game to manage de world’s data, I wouldn’t mind some speed improvment if JME works on Java 7. :)

    The new garbage collector is apparently doing a better job with applications creating and destroying a lots of objects. Firstly, it works in a separate thread to avoid performance hickups. Secondly, it doesn’t rely on only two realms (young and old variables) : it creates new realms as needed and compacts memory when required, freeing whole realms of memory if not needed anymore (something Java 6 never does).

    I know you had to optimize objects creations in JME, I suppose it won’t be much of a problem in Java 7 anymore. :)