Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just update to java7 in ubuntu 11.04 then using

sudo update-java-alternatives

there is an error: no alternatives for -javaplugin.so



Your updated Java 7 is probably a 64-bit version. There's currently no Java applet browser plugin for 64-bit (and I'm not sure if there's plans to create one). If you don't mind missing out on Java applets, you'll be fine.


A silly question: Can I call jruby or jirb with something like classpath?

I don't want to lose my java applet for firefox,(ubuntu 11.04 64 bits,four-cores).

I would also like to see some comparison, for example like in the computer benchmark game between jruby and other ruby implementations.

What about clojure and scala? will they get a speed up with the new java 7 update? , Will it be three-fold like jruby (in certain cases?). Thanks for the great work on jruby. Being more dynamic is great!


   $ man update-java-alternatives 
  
  --jre  
    Limit the actions to alternatives belong to a  runtime  environment, not a development kit.
  --jre-headless  
    Limit the actions to alternatives belong to the headless part of a runtime environment.
  --plugin
    Limit the actions to alternatives providing browser plugins.


You can certainly just call JRuby directly with the 'java' command, or just set your environment to point at the Java 7 install only when you need it, rather than forcing your whole environment to use Java 7 by default.

I imagine the computer benchmarks game will update when we have a release of JRuby 1.7 out, sometime early 2012. If someone else wants to do some benchmark runs, I have no objection.

As for Clojure and Scala...they may see modest improvements from Java 7, but neither of them use invokedynamic at all. The biggest boost for JRuby comes from invokedynamic.


Is this the case for Java 7? It's not the case for Java 6. There is one from Oracle, which I'm using.

  $ file .mozilla/plugins/libnpjp2.so 
  .mozilla/plugins/libnpjp2.so: symbolic link to
  `/usr/local/lib/jvm/jre1.6.0_29/lib/amd64/libnpjp2.so'
There's one from OpenJDK as well.

  $ apt-cache show icedtea-plugin
  Package: icedtea-plugin
  Source: icedtea-web
  Version: 1.1.4-1
  Installed-Size: 276
  Maintainer: OpenJDK Team <openjdk@lists.launchpad.net>
  Architecture: amd64


Perhaps IcedTea (RedHat's fork of OpenJDK) has included a 64-bit plugin. I did not think OpenJDK/OracleJDK had done so yet...but I'd love to be proven wrong.


Like I said, libnpjp2.so is a 64-bit plugin from Sun/Oracle. It's been available from Sun since Java 1.6.0_12 in 2008. It's still available in Java 1.6.0_29; I just downloaded and installed it from Oracle last week. I have not looked into support for Java 7 or operating systems besides linux.


try:

  $ update-java-alternatives --jre-headless
or

  $ update-java-alternatives --jre
this will not update the plugin-alternative which is not available (yet), see headius' comment

  => https://gist.github.com/1501186

(UPD: sorry, the following only applies to the standard OpenJDK7 on Ubuntu, not the u2 release )

also on i386 and armel see https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/850...

workaround (change armel/arm to i386 if that's your arch):

  $ cd /usr/lib/jvm/java-7-openjdk-armel/jre/lib/arm/

  $ sudo ln -s jamvm/libjvm.so .


That applies to ARM. I'm not sure of the equivalent workaround for x86_64 outside of installing a 32-bit Java 7 and setting that up as the source of the Java plugin.



Fair enough :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: