title: Java -jar No Sound Error with cgoban.jar
body: <h2>Situation</h2>
  <p>The problem I have encountered is that there will be no sound output from running my *.jar file. I will start it with <code>java -jar cgoban.jar</code> and it works fine except there is no sound.</p>
  <h2>Possible Solutions</h2>
  <p>There is a workaround for this problem discussed here: <a href="https://senseis.xmp.net/?CgobanProblemsAndSolutions" rel="nofollow noreferrer">https://senseis.xmp.net/?CgobanProblemsAndSolutions</a>.
  It says to employ the Java Web Start with</p>
  <pre><code>LIBXCB_ALLOW_SLOPPY_LOCK=true padsp javaws http://files.gokgs.com/javaBin/cgoban.jnlp
  </code></pre>
  <p>and use the <code>jlnp</code> file from here: <a href="http://files.gokgs.com/javaBin/cgoban.jnlp" rel="nofollow noreferrer">http://files.gokgs.com/javaBin/cgoban.jnlp</a>.</p>
  <p>However, since this workaround includes downloading the <code>jar</code>-file on every start this is not an option for me (as I use an offline machine, bandwidth limitations etc.)</p>
  <hr />
  <p>A possible solution might be to run (since it works with javaws)</p>
  <pre><code>LIBXCB_ALLOW_SLOPPY_LOCK=true padsp java -jar cgoban.jar
  </code></pre>
  <p>but there is still no sound. I don't understand why it works for javaws, but not for <code>java -jar</code>.</p>
  <hr />
  <p>Unluckily it did not help to run</p>
  <pre><code>java -jar -Dsun.sound.useNewAudioEngine=&quot;false&quot; cgoban.jar
  </code></pre>
  <p>But thanks for commenting.</p>
  <hr />
  <p>Another possible solution that I attempted was to download and edit above <code>jlnp</code>-file. I don't want to download the <code>jar</code>-file every time the application starts. So maybe it is possible to download the <code>jar</code>-file once and then have the local <code>jlnp</code>-file point to the local copy (instead of the remote <code>jar</code>-file). However, as my programming skills suck, I have not been able to pull this off.</p>
  <h2>Additional Information</h2>
  <p>I'm running an Ubuntu machine with Java installed. <code>java -version</code> gives me the following output:</p>
  <pre><code>openjdk version &quot;1.8.0_151&quot;
  OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
  OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
  </code></pre>
  <p>An up-to-date version of <code>cgoban.jar</code> for download is available from here:
  <a href="http://files.gokgs.com/javaBin/cgoban.jar" rel="nofollow noreferrer">http://files.gokgs.com/javaBin/cgoban.jar</a></p>