Brandon, the following cobbled-together code worked for me. The file was
c:\temp\t2.jnlp, and Jmol.jar was in c:\temp as well. So maybe it's just
the "application-desc" instead of "component-desc"
Not sure how you send commandline options.
Bob
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="0.2 1.0"
codebase="file:///c:/temp"
href="t2.jnlp">
<information>
<title>SwingSet2 App</title>
<vendor>Sun Microsystems, Inc.</vendor>
<homepage
href="http://java.sun.com/products/javawebstart/demos.html"/>
<description>SwingSet2 Demo Description</description>
<description kind="short">SwingSet2 Demo Short
Description</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
<j2se version="1.3+"/>
<jar href="Jmol.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="org.openscience.jmol.app.Jmol"/>
</jnlp>
Bob Hanson
j brandon keith wrote:
>Hi, I'm new to Jmol. I'm trying to run it via Java Web start. Even
>doing a simple jnlp like that below *doesn't work*. I click on the
>link and the Java logo comes up but then *nothing happens*. What
>basic thing am I doing wrong.
>
><?xml version="1.0" encoding="UTF-8"?>
><jnlp spec="1.0+"
> codebase="http://trueblue.caltech.edu/java">
> <information>
> <title>Jmol</title>
> <vendor>DANSE</vendor>
> <homepage href="http://danse.us" />
> <description>Jmol</description>
> </information>
> <offline-allowed/>
> <security>
> <all-permissions/>
> </security>
> <resources>
> <j2se version="1.5+" />
> <jar href="Jmol.jar" />
> </resources>
> <component-desc main-class="org.openscience.jmol.app.Jmol" />
></jnlp>
>
>I'm using Java 6. It works fine from the command line: java -jar Jmol.jar
>
>Also, I'd like to launch Jmol via Java web start (jws) and have it
>automatically load a cif file. However, I believe jws cannot accept
>parameters. So I write a class that calls jmol and loads "sample.cif"
>from a dynamically generated code base:
>
> <?xml version="1.0" encoding="UTF-8"?>
><jnlp spec="1.0+"
> codebase="http://trueblue.caltech.edu/java">
> <information>
> <title>Sample Viewer</title>
> <vendor>DANSE</vendor>
> <homepage href="http://danse.us" />
> <description>Sample Viewer</description>
> </information>
> <offline-allowed/>
> <security>
> <all-permissions/>
> </security>
> <resources>
> <j2se version="1.5+" java-vm-args="-Xmx512m -splash:splash.png"/>
> <jar href="sampleViewer.jar"/>
> <jar href="Jmol.jar" />
> </resources>
> <component-desc main-class="sampleViewer.Main" />
></jnlp>
>
>But that doesn't work either (probably related to previous error).
>But is this the best way to do this or is there a javascript way that
>is better?
>
>PS: Don't want to use just applets--need jws to work as well.
>
>
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers