mxj: could not find Java 2 Runtime Environment and mxj_platform_init failed


    Mar 27 2014 | 7:23 pm
    Hello everybody!
    I've been struggling for a while trying to get my leapmotion to work with Max 6 on a Windows 8.1 computer. So far, no success. ManosOSC for some reason won't even load. leapformax.com didn't work. o.io.leap object didn't work (probably because it was for Mac, although I wasn't able to confirm).
    Didn't understand the german, but the instructions were in english. I followed the instructions and I got really far! THE ONLY problem:
    the object mxj semd.leapmotion wasn't working. The error message I got:
    mxj: could not find Java 2 Runtime Environment.
    Error loading:
    (mxj) mxj_platform_init failed. Could not initialize the Java Runtime Environment.
    Please check your Java installation. http://java.sun.com
    Unable to create JVM
    I searched online found this:
    http://cycling74.com/forums/topic/unable-to-create-jvm-2/ and
    Both somewhat helpful. The idea: to use 32bit Java. I uninstalled all of Java and installe donly 32 bit and this did not solve the problem.
    I'm losing my hair! Could someone please help?
    Thanks a lot.
    Best,
    appleslice

    • Mar 28 2014 | 2:25 pm
      Does Java work at all? What does
      java -version
      in a console report?
    • Mar 28 2014 | 9:29 pm
      When I typed that in command prompt I received this message:
      ' java' is not recognized as an internal or external command, operable program or batch file.
      Then I went to control panel, went to the uninstall/repair part and found Java and it told me the version I had was 1.7.0
      So I do have Java. Command prompt doesn't think so though. What does this mean? That Java didn't install properly? Everytime I install the same thing happens.
    • Apr 03 2014 | 7:10 pm
      Update: So, the sensing of the leap motion works on Max 5 using the mxj semd.leapmotion. However, Max 6 is where the issue is found. I've been messing around, but still no success. Could someone please help?
    • Apr 12 2014 | 9:00 am
      Do the other mxj externals in Max 6 work? Try [mxj net.maxhole] object for example.
      If it does not, look up your max JVM settings:
      \Max 6.1\Cycling '74\java\max.java.config
      Compare the settings line-by-line to your working Max 5 distribution. The available options should be the same.
      Regards,
      Christoph
    • Apr 16 2014 | 6:43 am
      Thank you for taking the time to help me out.
      I checked the code and it read the same except the file on Max6.1 had a few more comments about copyright.
      It took me long enough to realize that I was using the 64bit version of Max. Once I installed the 32bit version the mxj externals seemed to work because they were not shaded in dark gray.
      Get this, once I did everything in your installation txt file, every time I opened the semdd.leapmotion help file Max would shut down completely with no error message. Disk Usage on the computer would go to 100% unless I ended the task with task manager. I did some troubleshooting and found out that max 6 would only shut down when I had the leapjava.jar in cycling74/java/lib. If I deleted the file, I was able to load the help file with the following error message:
      java.lang.NoClassDefFoundError: com/leapmotion/leap/Controller
      at semdd.leapmotion.(leapmotion.java:44)
      (mxj) unable to construct instance of semdd.leapmotion
      Any ideas of what to do next?
      Thanks.
    • Apr 16 2014 | 4:34 pm
      To clarify what the notepad files say:
      Max 5 max.java.config reads:
      ; This is the config used by Max when instantiating the JVM ;
      ; Comments are enclosed within 2 semicolons ;
      ; The file format is relatively fragile so pay attention ;
      ; when editing this file !! ;
      ; some example options one may use ;
      ; add all jars in /Users/topher/java/lib to the system classpath i.e. immutable classpath ;
      ; max.system.jar.dir /Users/topher/java/lib;
      ; add /Users/topher/foo to the system classpath i.e. immutable classpath ;
      ; max.system.class.dir /Users/topher/foo ;
      ; these next 2 are typically what you would want to use if you want additional directories ;
      ; added to your classpath for max ;
      ; add /Users/topher/myclasses to the dynamic classpath of MXJClassLoader ;
      ; max.dynamic.class.dir /Users/topher/myclasses ;
      ; add all jars in /Users/topher/myjars to the dynamic classpath of MXJClassLoader ;
      ;max.dynamic.jar.dir /Users/topher/myjars ;
      ; specify some jvm options ;
      max.jvm.option -Xincgc
      max.jvm.option -Xms64m
      max.jvm.option -Xmx256m
      ; uncomment these options(i.e. remove surrounding semi colons ;
      ; to cause the JVM to be created ;
      ; in debug mode and listening for remote debugger connections ;
      ; on port 8074. This would enable you to interactively debug ;
      ; your mxj code using JDB or some other debugger which supports ;
      ; the JDI wire protocol ;
      ; max.jvm.option -Xdebug ;
      ; max.jvm.option -Xnoagent ;
      ; max.jvm.option -Xrunjdwp:transport=dt_socket\,address=8074\,server=y\,suspend=n ;
      ; max.jvm.option -XX:-UseSharedSpaces ;
      Max 6.1 max.java.config reads:
      ; ;
      ; Permission is hereby granted, free of charge, to any person obtaining a copy of this software ;
      ; and associated documentation files (the "Software"), to deal in the Software without restriction, ;
      ; including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, ;
      ; and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, ;
      ; subject to the following conditions: ;
      ; ;
      ; The above copyright notice and this permission notice shall be included in all copies ;
      ; or substantial portions of the Software. ;
      ; ;
      ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, ;
      ; INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ;
      ; IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ;
      ; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE ;
      ; OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ;
      ; This is the config used by Max when instantiating the JVM ;
      ; Comments are enclosed within 2 semicolons ;
      ; The file format is relatively fragile so pay attention ;
      ; when editing this file !! ;
      ; some example options one may use ;
      ; add all jars in /Users/topher/java/lib to the system classpath i.e. immutable classpath ;
      ; max.system.jar.dir /Users/topher/java/lib;
      ; add /Users/topher/foo to the system classpath i.e. immutable classpath ;
      ; max.system.class.dir /Users/topher/foo ;
      ; these next 2 are typically what you would want to use if you want additional directories ;
      ; added to your classpath for max ;
      ; add /Users/topher/myclasses to the dynamic classpath of MXJClassLoader ;
      ; max.dynamic.class.dir /Users/topher/myclasses ;
      ; add all jars in /Users/topher/myjars to the dynamic classpath of MXJClassLoader ;
      ;max.dynamic.jar.dir /Users/topher/myjars ;
      ; specify some jvm options ;
      max.jvm.option -Xincgc
      max.jvm.option -Xms64m
      max.jvm.option -Xmx256m
      ; uncomment these options(i.e. remove surrounding semi colons ;
      ; to cause the JVM to be created ;
      ; in debug mode and listening for remote debugger connections ;
      ; on port 8074. This would enable you to interactively debug ;
      ; your mxj code using JDB or some other debugger which supports ;
      ; the JDI wire protocol ;
      ; max.jvm.option -Xdebug ;
      ; max.jvm.option -Xnoagent ;
      ; max.jvm.option -Xrunjdwp:transport=dt_socket\,address=8074\,server=y\,suspend=n ;
      ; max.jvm.option -XX:-UseSharedSpaces ;
      ; 1 = compatible mode (default in 64bit) ;
      ; 2 = hi performance mode (default in 32bit) ;
      ; hi performance mode for 64 bit is only supported with a JavaVM > 6u33 (where -XX:+UseCompressedOops is default) ;
      ; mxj.msp.mode 2 ;
    • Apr 25 2014 | 1:07 am
      any luck w/ this? i'm also getting failures after installing java 1.7.0_55 on win7 and restarting max. here are my specs:
      {
      "version" : "Version 6.1.7 (e5b6090)",
      "platform" : "windows",
      "arch" : "x86",
      "osversion" : "Microsoft Windows 7 Professional Service Pack 1 (build 7601), 64-bit",
      "samplerate" : 44100,
      "iovs" : 512,
      "sigvs" : 64,
      "scheduler_in_audio_interrupt" : "off",
      "audio_drivername" : "ad_mme",
      "audio_driver_subname" : "",
      "eventinterval" : 1,
      "overdrive" : "off",
      "mixerparallel" : "off",
      "mixercrossfade" : 0,
      "mixerlatency" : 30.0,
      "mixerramptime" : 10.0,
      "packages" : {
      "vizzie" : {
      "name" : "vizzie"
      }
      }
      }
    • May 15 2014 | 9:11 pm
      Hmm. I've been trying to fix it with no luck still. Does anyone have any other ideas? Could this be a straight up Java compatibility issue with Windows 8.1 ?
    • Jan 07 2015 | 7:22 am
      I am also running into this problem. Could someone from cycling please let us know if mxj (java) works with windows 8.1 with the latest version of java installed?
    • Jan 31 2015 | 10:10 pm
      On win 8.1 "Windows x86 Offline 29.02 MB jre-8u31-windows-i586.exe"seems to work for me (Max 7 32bit): http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
      Remember: x86 = 32bit, x64 = 64bit