Life In 19x19
http://www.lifein19x19.com/

KGS ignoring -open parameter?
http://www.lifein19x19.com/viewtopic.php?f=24&t=843
Page 1 of 1

Author:  fwiffo [ Sun Jun 13, 2010 4:39 pm ]
Post subject:  KGS ignoring -open parameter?

Lately it seems like cgoban is ignoring the -open command line parameter, which is keeping it from working as a Firefox helper. Specifically the command line...

Code:
javaws -open foo.sgf http://files.gokgs.com/javaBin/cgoban.jnlp

... no longer opens foo.sgf; it just opens cgoban.

Anybody else seeing this?

Author:  wms [ Sun Jun 13, 2010 5:13 pm ]
Post subject:  Re: KGS ignoring -open parameter?

Are you sure the syntax is right? I thought it was just "javaws foo.jnlp <file to open>", but I could be wrong.

Author:  xed_over [ Sun Jun 13, 2010 6:18 pm ]
Post subject:  Re: KGS ignoring -open parameter?

that should be the correct syntax. I use it all the time (via a Mac app that Hikaru79 wrote):
http://www.godiscussions.com/forum/show ... php?t=4893

Humm.. I guess its been a while since I've actually tried to open an sgf directly

from the commandline, I get a Null Pointer Exception
Code:
$ javaws -Xnosplash -open game.sgf http://files.gokgs.com/javaBin/cgoban.jnlp
$ Exception in thread "javawsApplicationMain" java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
        at java.lang.Runtime.exec(Runtime.java:591)
        at java.lang.Runtime.exec(Runtime.java:464)
        at com.sun.javaws.Launcher.execProgram(Launcher.java:824)
        at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:499)
        at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:219)
        at com.sun.javaws.Launcher.run(Launcher.java:166)
        at java.lang.Thread.run(Thread.java:613)

Author:  xed_over [ Sun Jun 13, 2010 6:31 pm ]
Post subject:  Re: KGS ignoring -open parameter?

could it be that the <application-desc/> tag is missing the main-class name?

from http://java.sun.com/j2se/1.4.2/docs/gui ... yntax.html
Code:
    Arguments can be specified to the application by including one or more nested argument elements. For example:

      <application-desc main-class="Main">
        <argument>arg1</argument>
        <argument>arg2</argument>
      </application-desc>


because http://java.sun.com/j2se/1.5.0/docs/gui ... avaws.html says this about the -open command-line option to Java Web Start
Code:
-open <arguments>

    If specified, replaces the arguments in the jnlp file with -open <arguments>.


* this is all just guessing on my part

Author:  fwiffo [ Sun Jun 13, 2010 7:07 pm ]
Post subject:  Re: KGS ignoring -open parameter?

Weird, it works on one computer, but not the other... Hey, wait a minute... Turns out I've got stupid openjdk! Lucid Lynx secretly replaced my coffee with decaffeinated Folgers Crystals, wondering if I'd notice. Oh, I noticed, b!%^#&s!

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/