Java Web Start help : repost???

D

Daniel

Hi all,

I tried to post a message to this newsgroup about a problem with Java Web
Start at around 3:30 PM today. As of yet, I do not see it on my newsreader,
or on google groups (even though it shows posts from 3:51 PM). So, if this
is the second post, I apologize. If it is the second post, could someone
kindly email the responses from the first post? I am not sure if the
attachment in the first email caused the problem or not, but I am not
including the attachment this time - I am just simply going to post the
contents here.

My email is dhw377 at cox dot com.


Repost:???


I am testing the Java Web Start program on Windows 2000. I created an simple
JFrame that displays hello world in the title bar and then jar'ed it up,
created the JNLP file, and added the JNLP mime type to the web server. When
I try to load the application, the JWS windows says loading application and
the progress bar keeps flashing repeatedly, but the application never loads
up. I am including the JNLP contents below, and the zip file of the jar and
related files.

If you can test this on your machine, unzip the file into your web doc root.
The only thing you would have to change is the machine name in the JNLP
file.

Thanks appreciated for any help.


JNLP file:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for Hello World Frame Application -->
<jnlp
spec="1.0+"
codebase="http://manhattan/webstart"
href="helloworld.jnlp">
<information>
<title>Hello World Frame Application</title>
<vendor>Dan Computer System, Inc.</vendor>
<homepage href="www.cnn.com"/>
<description>Hello World Frame Application</description>
<description kind="short">A demo of the capabilities of the Swing
Graphical User Interface.</description>
<icon href="lib/tux.gif"/>
<offline-allowed/>
</information>
<security>

</security>
<resources>
<j2se version="1.3"/>
<jar href="http://manhattan/webstart/lib/helloworld.jar"/>
</resources>
<application-desc main-class="daniel.test.HelloWorldFrame"/>
</jnlp>


The java source file:

package daniel.test;

import java.awt.Frame;
import java.awt.Dimension;

public class HelloWorldFrame extends Frame
{
public HelloWorldFrame()
{
setVisible( true );
setSize( new Dimension( 300, 100 ) );
this.setTitle( "Hello World" );
}

public static void main( String[] args )
{
new HelloWorldFrame();
}
}
 
S

Svetozar Radojcin

- put helloworld.jar into webstart.war archive, at the same level as WEB-INF
directory;
- then deploy .war file to the web server, and try following .jnlp file:
(just change host & port):

--------
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for Hello World Frame Application -->
<jnlp
spec="1.0+"
codebase="http://localhost:8080/webstart">
<information>
<title>Hello World Frame Application</title>
<vendor>Dan Computer System, Inc.</vendor>
<homepage href="www.cnn.com"/>
<description>Hello World Frame Application</description>
<description kind="short">A demo of the capabilities of the Swing
Graphical User Interface.</description>
<icon href="lib/tux.gif"/>
<offline-allowed/>
</information>
<security>

</security>
<resources>
<j2se version="1.3+"/>
<jar href="helloworld.jar"/>
</resources>
<application-desc main-class="daniel.test.HelloWorldFrame">
</application-desc>
</jnlp>
 
D

Daniel

I found out the actual problem was a faulty JNLP file. It's weird because
this was the file Sun gave as an example. Once I got a JNLP file from one
app that actually worked, I modified it to suit my needs, and voila, it
worked. Bad, bad Sun!!!


Svetozar Radojcin said:
- put helloworld.jar into webstart.war archive, at the same level as WEB-INF
directory;
- then deploy .war file to the web server, and try following .jnlp file:
(just change host & port):

--------
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for Hello World Frame Application -->
<jnlp
spec="1.0+"
codebase="http://localhost:8080/webstart">
<information>
<title>Hello World Frame Application</title>
<vendor>Dan Computer System, Inc.</vendor>
<homepage href="www.cnn.com"/>
<description>Hello World Frame Application</description>
<description kind="short">A demo of the capabilities of the Swing
Graphical User Interface.</description>
<icon href="lib/tux.gif"/>
<offline-allowed/>
</information>
<security>

</security>
<resources>
<j2se version="1.3+"/>
<jar href="helloworld.jar"/>
</resources>
<application-desc main-class="daniel.test.HelloWorldFrame">
</application-desc>
</jnlp>

--------

I am testing the Java Web Start program on Windows 2000. I created an simple
JFrame that displays hello world in the title bar and then jar'ed it up,
created the JNLP file, and added the JNLP mime type to the web server. When
I try to load the application, the JWS windows says loading application and
the progress bar keeps flashing repeatedly, but the application never loads
up. I am including the JNLP contents below, and the zip file of the jar and
related files.

If you can test this on your machine, unzip the file into your web doc root.
The only thing you would have to change is the machine name in the JNLP
file.

Thanks appreciated for any help.

JNLP file:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for Hello World Frame Application -->
<jnlp
spec="1.0+"
codebase="http://manhattan/webstart"
href="helloworld.jnlp">
<information>
<title>Hello World Frame Application</title>
<vendor>Dan Computer System, Inc.</vendor>
<homepage href="www.cnn.com"/>
<description>Hello World Frame Application</description>
<description kind="short">A demo of the capabilities of the Swing
Graphical User Interface.</description>
<icon href="lib/tux.gif"/>
<offline-allowed/>
</information>
<security>

</security>
<resources>
<j2se version="1.3"/>
<jar href="http://manhattan/webstart/lib/helloworld.jar"/>
</resources>
<application-desc main-class="daniel.test.HelloWorldFrame"/>
</jnlp>

The java source file:

package daniel.test;

import java.awt.Frame;
import java.awt.Dimension;

public class HelloWorldFrame extends Frame
{
public HelloWorldFrame()
{
setVisible( true );
setSize( new Dimension( 300, 100 ) );
this.setTitle( "Hello World" );
}

public static void main( String[] args )
{
new HelloWorldFrame();
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top