Java Webstart and -Dsun.java2d vm args

I’ve been trying to get my webstartable game to use -Dsun.java2d.translaccel=true or -Dsun.java2d.opengl=true all night.

Afters hours and hours of trying I’ve figured that this just isn’t possible. Which is rather retarded since the jnlp syntax for java 1.5 clearly says that you can define or run the webstartable application with your own vm args. (given that you have signed your jar, which I did)

So, I’ve decided that Java Webstart is useless for Java2D games. ::slight_smile:

Unless, anyone know of any tricks to do to get this to work?

I got Java Version 1.5.0 (build 1.5.0_09-b03).

My jnlp file:


<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.5+" codebase="http://www.stratzone.net/4k" href="starship.jnlp">

  <information>
    <title>Starship Invaders</title>
    <vendor>Arni Arent (appel)</vendor>
    <description>Defend against a Romulan invasion</description>
    <description kind="short">Starship</description>
    <icon href="starship_icon.gif"/>
    <icon kind="splash" href="starship_splash.jpg"/>
  </information> 

  <security>
        <all-permissions/>
  </security>

  <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+" java-vm-args="-Dsun.java2d.translaccel=true"/>
    <jar href="starship.jar"/>
    <property name="sun.java2d.translaccel" value="true"/>
  </resources>  

  <application-desc main-class="S"/>
</jnlp>


starship.jar is signed.

Unfortunately it looks like passing the sun.java2d.translaccel property to the underlying JVM isn’t currently supported in Java Web Start (we can fix this in an update release, and I’ll raise the issue next week), but I can guarantee to you that the sun.java2d.opengl property is supported. The fully hardware-accelerated JRefract demo on the jogl-demos page uses it, for example, and I’ve just retested that demo and it works as expected.

Nope, not working for me. I get no errors. This game is running below 20fps on my pc, but when I start it from within eclipse it runs at 50fps (using translaccel=true I get 80fps).

http://www.stratzone.net/starship/starship.jnlp
http://www.stratzone.net/starship/starship.jar (signed jar)

I checked the jnlp file for the JRefract demo, and it’s not using the sun.java2d.opengl=true parameter.

There are two JNLP files for that demo and this one does use the -Dsun.java2d.opengl=true property.

Cute game. I get 63 FPS on my machine and dumping the system properties in the Java console shows that sun.java2d.opengl=true is being passed through. Actually I just realized the issue may be that you’re running with a 5.0 version of Java – have you tried with Java SE 6? There were substantial improvements to the Java 2D / OpenGL pipeline in the new release and I can believe that in 5.0 the sun.java2d.opengl system property might not have been supported in Java Web Start.

63fps, that’s good :slight_smile:

Well, I’m trying to aim for Java 5.0, since that’s the current version.

Maybe I’ll wait until Java 6.0 becomes the current release, then I’ll release the game :slight_smile:

Erm, Java 6 is the current release. :slight_smile:

Endolf

In my Java Updates application (on my windows) I do “Check for updates”, and it says that I already have it, version 1.5.etc…

If I were to release a application written for Java6, then only the most extreme developers would be able to run it. It’s not mainstream yet…hell…Java 5 just got mainstream :slight_smile: