Page 1 of 1
KGS ignoring -open parameter?
Posted: Sun Jun 13, 2010 4:39 pm
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?
Re: KGS ignoring -open parameter?
Posted: Sun Jun 13, 2010 5:13 pm
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.
Re: KGS ignoring -open parameter?
Posted: Sun Jun 13, 2010 6:18 pm
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=4893Humm.. 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)
Re: KGS ignoring -open parameter?
Posted: Sun Jun 13, 2010 6:31 pm
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.htmlCode: 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
Re: KGS ignoring -open parameter?
Posted: Sun Jun 13, 2010 7:07 pm
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!