|
Replies:
6
-
Pages:
1
-
Last Post:
May 23, 2011 7:07 AM
by: rajshekar
|
|
|
Posts:
2
Registered:
8/16/10
|
|
|
|
cannot run webstart
Posted:
Aug 16, 2010 7:42 AM
|
|
Hi,
I'm trying to run my first webstart ever, from the very first example in the book (GroovyEdit). Unfortunately, the main class griffon.swing.SwingApplication inf file "staging/GroovyEdit.jar" is not found. The file application.jnlp says main jar is GroovyEdit.jar, but class the class griffon.swing.SwingApplication is in griffon-rt-0.9.jar. Is this the problem?
JNLPException[category: Erreur dans le fichier de lancement : Exception: null : LaunchDesc: <jnlp spec="1.0+" codebase="file:/C:/temp/Griffon/GroovyEdit/staging/" version="0.1" href="file:/C:/temp/Griffon/GroovyEdit/staging/application.jnlp"> <information> <title>GroovyEdit</title> <vendor>GroovyEdit</vendor> <homepage href="null"/> <description>GroovyEdit</description> <description kind="short">GroovyEdit</description> <description kind="one-line">GroovyEdit</description> <description kind="tooltip">GroovyEdit</description> <icon href="file:/C:/temp/Griffon/GroovyEdit/staging/griffon-icon-48x48.png" height="48" width="48" kind="default"/> <icon href="file:/C:/temp/Griffon/GroovyEdit/staging/griffon.png" height="123" width="381" kind="splash"/> <icon href="file:/C:/temp/Griffon/GroovyEdit/staging/griffon-icon-16x16.png" height="16" width="16" kind="shortcut"/> <icon href="file:/C:/temp/Griffon/GroovyEdit/staging/griffon-icon-32x32.png" height="32" width="32" kind="shortcut"/> </information> <security> <all-permissions/> </security> <update check="timeout" policy="always"/> <resources> <property name="griffon.runmode" value="webstart"/> <property name="jnlp.packEnabled" value="true"/> <java version="1.5+"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/griffon-rt-0.9.jar" download="eager" main="false"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/GroovyEdit.jar" download="eager" main="true"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/groovy-all-1.7.3.jar" download="eager" main="false"/> </resources> <application-desc main-class="griffon.swing.SwingApplication"/> </jnlp> ] at com.sun.javaws.LaunchDownload.getMainClassName(LaunchDownload.java:1110) at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:941) at com.sun.javaws.Launcher.run(Launcher.java:121) at java.lang.Thread.run(Unknown Source)
env: griffon-0.9, groovy-1.7.3, java 1.6.0_21, win XP Hope this is enough information. Thanks, Regards, jgrd
|
|
Posts:
116
Registered:
3/31/09
|
|
|
|
Re: cannot run webstart
Posted:
Aug 16, 2010 7:55 AM
in response to:
jgrd
|
|
Hi,
I've don't know exactly what to tell you other that I ran the book's code with the latest 0.9 release and it worked fine. Also created a sample app and ran it successfully in webstart mode. Did you by any chance tweaked the jnlp template before running?
For reference, here's the jnlp file for the GroovyEdit application form the book's code repository (as updated by run-webstart)
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE jnlp SYSTEM "http://java.sun.com/dtd/JNLP-1.5.dtd"> <jnlp version="0.1" codebase="file:/Users/aalmiray/dev/griffoninaction/chap01/GroovyEdit/staging" href="application.jnlp" > <information> <title>GroovyEdit</title> <vendor>GroovyEdit</vendor> <!--<homepage href="http://app.example.com/"/>--> <!--fallback description--> <description>GroovyEdit</description> <description kind="one-line">GroovyEdit</description> <description kind="short">GroovyEdit</description> <description kind="tooltip">GroovyEdit</description> <!-- fallback icon --> <icon href="griffon-icon-48x48.png" kind="default" width="48" height="48"/> <!-- icon used for splash screen --> <icon href="griffon.png" kind="splash" width="381" height="123"/> <!-- icon used in menu --> <icon href="griffon-icon-16x16.png" kind="shortcut" width="16" height="16"/> <!-- icon used on desktop --> <icon href="griffon-icon-32x32.png" kind="shortcut" width="32" height="32"/> <!-- to create shortcuts, uncomment this <shortcut online="true"> <desktop/> <menu submenu="GroovyEdit"/> </shortcut> <offline-allowed/> --> </information> <security> <all-permissions/> <!--<j2ee-application-client-permissions/>--> </security> <resources> <property name="griffon.runmode" value="webstart"/> <property name="jnlp.packEnabled" value="true"/> <j2se version="1.5+" /> <!-- auto-added jars follow, griffon-rt, app, and groovy --> <jar href='griffon-rt-0.9.jar'/> <jar href='groovy-all-1.7.3.jar'/> <jar href='GroovyEdit.jar' main='true' /> <!-- Add all extra jars below here, or the app may break -->
</resources> <resources os='Mac OS X' arch='x86_64'> </resources> <application-desc main-class="griffon.swing.SwingApplication"> <!-- params are ignored when referenced from web page for 6u10 --> <!--<param name="key1" value="value1"/>--> <!--<param name="key2" value="value2"/>-->
</application-desc> </jnlp>
|
|
Posts:
2
Registered:
8/16/10
|
|
|
|
Re: cannot run webstart
Posted:
Aug 16, 2010 9:51 AM
in response to:
andres.almiray
|
|
Hi,
thanks for your answer. I cannot see differences with the files, yours and mine, except "<resources os='Windows' arch='x86'>"! I checked in ethe last book in case the syntax was outdated, but nothing different in the first example and starting over, he message remains the same #### Java Web Start Error: #### Impossible de trouver la classe principale griffon.swing.SwingApplication dans file:/C:/temp/Griffon/GroovyEdit/staging/GroovyEdit.jar
or exception: at com.sun.javaws.LaunchDownload.getMainClassName(LaunchDownload.java:1110) at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:941) at com.sun.javaws.Launcher.run(Launcher.java:121) at java.lang.Thread.run(Unknown Source)
I get the dialog "Impossible de lancer l'application" (Impossible to launch application) name: GroovyEdit Editor: GroovyEdit from: file:// <- should this be empty?
Same message if I try to run the application as an applet : cannot find griffon.swing.SwingApplet dans file:/D:/temp/Griffon/GroovyEdit/staging/GroovyEdit.jar.
Am I the only one?! Best regards jgrd
|
|
Posts:
1
From:
Nis, Serbia
Registered:
12/10/09
|
|
|
|
Re: cannot run webstart
Posted:
Nov 3, 2010 4:04 AM
in response to:
jgrd
|
|
Hi!
I also had this problem. Take a look at this segment:
<jar href="file:/C:/temp/Griffon/GroovyEdit/staging/griffon-rt-0.9.jar" download="eager" >main="false"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/GroovyEdit.jar" download="eager" >main="true"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/groovy-all-1.7.3.jar" download="eager" main="false"/>
The problem is this attribute main (in bold) which denotes .jar to search for mainclass.
Change the above segment to:
<jar href="file:/C:/temp/Griffon/GroovyEdit/staging/griffon-rt-0.9.jar" download="eager" main="true"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/GroovyEdit.jar" download="eager" main="false"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/groovy-all-1.7.3.jar" download="eager" main="false"/>
and it should work. I am not sure why it works on Mac even with wrongly set main class but on WindowsXP environment and with griffon-rt-0.9.2-beta-1 it didn't.
I hope that this helps!
|
|
Posts:
116
Registered:
3/31/09
|
|
|
Posts:
16
From:
Idaho USA
Registered:
9/9/08
|
|
|
|
Re: cannot run webstart
Posted:
Dec 17, 2010 10:32 PM
in response to:
andres.almiray
|
|
I get jarsigner error. on webstart and applet. Will this fix fix the problem?
|
|
Posts:
32
From:
Hyderabad
Registered:
5/23/11
|
|
|
|
Re: cannot run webstart
Posted:
May 23, 2011 7:07 AM
in response to:
dragan.stankovic
|
|
Hiiii,
Am also having the same problem but as you said in which file do we need to change this segment
<jar href="file:/C:/temp/Griffon/GroovyEdit/staging/griffon-rt-0.9.jar" download="eager" main="true"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/GroovyEdit.jar" download="eager" main="false"/> <jar href="file:/C:/temp/Griffon/GroovyEdit/staging/groovy-all-1.7.3.jar" download="eager" main="false"/> in which file do we need to change this???
Thanks, Rajshekar
|
|
|
Legend
|
|
Gold: 300
+
pts
|
|
Silver: 100
- 299
pts
|
|
Bronze: 25
- 99
pts
|
|
Manning Author
|
|
Manning Staff
|
|