KGS ignoring -open parameter?

Comments, questions, rants, etc, that are specifically about KGS go here.
Post Reply
User avatar
fwiffo
Gosei
Posts: 1435
Joined: Tue Apr 20, 2010 6:22 am
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Location: California
Has thanked: 49 times
Been thanked: 168 times

KGS ignoring -open parameter?

Post by fwiffo »

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: Select all

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

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

Anybody else seeing this?
User avatar
wms
Lives in gote
Posts: 450
Joined: Tue Apr 20, 2010 4:23 pm
GD Posts: 0
KGS: wms
Location: Portland, OR USA
Has thanked: 257 times
Been thanked: 287 times
Contact:

Re: KGS ignoring -open parameter?

Post by wms »

Are you sure the syntax is right? I thought it was just "javaws foo.jnlp <file to open>", but I could be wrong.
xed_over
Oza
Posts: 2264
Joined: Mon Apr 19, 2010 11:51 am
Has thanked: 1179 times
Been thanked: 553 times

Re: KGS ignoring -open parameter?

Post by xed_over »

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: Select all

$ 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)
xed_over
Oza
Posts: 2264
Joined: Mon Apr 19, 2010 11:51 am
Has thanked: 1179 times
Been thanked: 553 times

Re: KGS ignoring -open parameter?

Post by xed_over »

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: Select all

    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: Select all

-open <arguments>

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


* this is all just guessing on my part
User avatar
fwiffo
Gosei
Posts: 1435
Joined: Tue Apr 20, 2010 6:22 am
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Location: California
Has thanked: 49 times
Been thanked: 168 times

Re: KGS ignoring -open parameter?

Post by fwiffo »

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!
Post Reply