Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get .jar file from .jnlp file?

Tags:

java

jar

jnlp

To play the go game, I went to http://www.gokgs.com/download.jsp to start the client with Java Web Start. Essentially, it is a .jnlp file that can automatically update the client.

It is cool. Still, I am wondering how I can fetch the underlying .jar file from this .jnlp file. I checked my local java 6.0 cache directory, and didn't find any .jar file over there.

Anybody knows how to get a stand-alone version of this cgoban client?

like image 583
Qiang Xu Avatar asked Dec 04 '22 02:12

Qiang Xu


2 Answers

JNLP is just an XML file. You can just open the .jnlp file and it will tell you where the .jar file is located. http://files.gokgs.com/javaBin/cgoban.jar

<jnlp codebase="http://files.gokgs.com" href="javaBin/cgoban.jnlp">
    ...
    <jar href="javaBin/cgoban.jar" main="true"/>

The relevant attributes are the jnlp[codebase] and the jar[href].

like image 57
Dennis Avatar answered Dec 20 '22 06:12

Dennis


If you open jnlp file in text editor there is a link to jar file. In your case it is: http://files.gokgs.com/javaBin/cgoban.jar

like image 21
gregory561 Avatar answered Dec 20 '22 06:12

gregory561