If you are using 64-bit linux, you might have found out that jvm 64-bit version doesn’t have a java web start. (Update: Java Web Start is added to 64-bit package since the version 6u12) I don’t know any particular reasons for this, however jnlp files seem to be very simple. The jnlp file contains an url to a jar file, which we can download and run separately. I only tried this with topcoder arena – it works without any problems. Here is a python script for handling simple java web start files.
#!/usr/bin/env python
import xml.dom.minidom
from xml.dom.minidom import Node
import os,sys
if len(sys.argv) != 2 :
print "Usage " + sys.argv[0] + " [jnlp file]"
sys.exit()
doc = xml.dom.minidom.parse(sys.argv[1])
jnlp = doc.getElementsByTagName("jnlp")[0]
codebase = jnlp.getAttribute("codebase")
resources = jnlp.getElementsByTagName("resources")[0]
jar = resources.getElementsByTagName("jar")[0].getAttribute("href")
application = jnlp.getElementsByTagName("application-desc")[0]
main = application.getAttribute("main-class")
arguments = application.getElementsByTagName("argument")
cmd = ""
for a in arguments :
cmd += " " + a.firstChild.data
filename = jar.split("/")[-1]
if not jar.startswith("http:") :
jar = codebase + jar
os.system("wget -N "+jar)
os.system("java -jar " + filename + cmd)
#1 by Brian on January 6th, 2009
Quote
do there have website or search engine called, sinhalasearch.com? why it not in internet?
#2 by Gopala KRishna on January 23rd, 2009
Quote
Thanks! That really proved helpful for getting topcoder arena to run on my 64 bit open suse installation
#3 by Bayle Shanks on April 15th, 2009
Quote
Thanks!
I got the error “Failed to load Main-Class manifest attribute from” (…), I presume because the application I was trying to run used a different Main-Class than default.
Apparently, by installing 32-bit Sun Java on Debian, one gets a program “javaws” which one can run on the commandline to execute .jnlp packages. Using javaws worked for me.
#4 by madhur on September 15th, 2009
Quote
well for some reasons it is not working for me