Problem with JRE

J

Jez Naisbitt

Hi,

I've written and compiled a very simple hello world to illustrate the
problem I have:

/*
* testjava.java
*
* Created on 22 December 2004, 14:11
*/
package testjava;
import java.awt.Container;
import java.awt.Label;
import java.awt.GridLayout;

public class testjava extends javax.swing.JApplet {

public testjava(){
Container c = this.getContentPane();

c.setLayout( new GridLayout( 1,1 ) );

c.add( new Label("Hello World") );
}

public void init(){
this.show();
}
}

....and this is the HTML page I use to display the applet:

<HTML>
<HEAD>
<META HTTP-EQUIV="Simple Hello World" CONTENT = "no-cache">
<META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
<META HTTP-EQUIV='last modified' CONTENT='NOW'>
<META NAME="robots" CONTENT="noindex,nofollow">

<TITLE>Simple Hello World</TITLE>
</HEAD>
<BODY>

<H3><HR WIDTH="100%">Simple Hello World<HR WIDTH="100%"></H3>

<P>
<OBJECT
classid = "clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA"
codebase =
"http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-windows-i586.cab#
Version=1,4,2,0"
WIDTH = "500"
HEIGHT = "400"
NAME = "testjava"
ALT = "You need a JAVA 2 capable browser.">

<PARAM NAME = CODE VALUE = "testjava/testjava.class" >
<PARAM NAME = CODEBASE VALUE = ".." >
<PARAM NAME="type"
VALUE="application/x-java-applet;jpi-version=1.4.2">
<PARAM NAME = "LANGUAGE" VALUE ="FR">
<PARAM NAME = "COUNTRY" VALUE ="CA">
<COMMENT>
<EMBED type="application/x-java-applet;jpi-version=1.4.2"
java_CODE = "testjava/testjava.class"
java_CODEBASE = ".."
ALT = "You need a JAVA2 cabable browser."
NAME = "TestJavax"
WIDTH = "500" HEIGHT = "400"
LANGUAGE="FR"
COUNTRY="CA"

pluginspage="http://java.sun.com/products/plugin/index.html#download">
<NOEMBED>
</COMMENT>
</CENTER>
<CENTER>
This applet requires a Java 2 browser to function. If you are
seeing this message, you are either not using a Java 2 enabled browser,
you have Java turned off, or the applet is broken ,or you are using a
browser
that is suppose to work but does not&nbsp;
Or you are using Opera and it is working just fine cept you still see this
</CENTER>
<CENTER>You may consider looking at screen shots if they
exist.
</NOEMBED>
</EMBED>
</OBJECT>
</P>

<HR WIDTH="100%"><FONT SIZE=-1><I>Generated by Jez</I></FONT>
</BODY>
</HTML>

1) The html page is stored in the same folder as the compiled class
(C:\java\testjava), and this is exposed on my network via a virtual
directory using IIS to map the folder C:\java.
2) The applet is compiled using the netbeans 3.5.1 with a 1.4.2 jdk.
3) The jre gets installed on a machine that has never had the 1.4.2 jre
installed, when I navigate to this page via IE6.0.
4) The applet displays correctly if I use windows explorer or my computer
on the local machine to open the html page.
5) The applet displays correctly if I use Internet Explorer on a remote
machine to open the html page.
6) The applet does NOT display correctly if I use Internet Explorer on
the local machine to open the html page. This is the output from the Sun
Java Console (with sensitive information removed):

Java(TM) Plug-in: Version 1.4.2
Using JRE version 1.4.2 Java HotSpot(TM) Client VM

Trace level set to 5: basic, net, security, ext, liveconnect ...
completed.
Registered modality listener
Invoking JS method: document
Invoking JS method: URL
Referencing classloader: sun.plugin.ClassLoaderInfo@1428ea,
refcount=1
Loading applet ...
Initializing applet ...
Starting applet ...
Connecting http://superdoggy/python/testjava/testjava.class with
no proxy

All I see is a steaming coffee cup icon.


7) I previously had a 1.1 compatible jre installed and this worked fine
in all scenarios above, but I'm now migrating to java2.

Can anyone help me figure out why this difference occurs, i.e. scenario
(item 6) no longer works?

Any help, advice will be gratefully received.

Rgds,

Jez.
 
A

Andrew Thompson

6) The applet does NOT display correctly if I use Internet Explorer on
the local machine to open the html page. This is the output from the Sun
Java Console (with sensitive information removed): ....
Can anyone help me figure out why this difference occurs, i.e. scenario
(item 6) no longer works?

Has IE SP2 (service pack 2) been installed on this PC?

It clamps down on security for documents opened locally, especially
for any Javascript. Now, I realise you are dealing with Java, rather
than Javascript, but there was a mention of 'LiveConnect' in that
output that sounds suspicious..

( Just a thought, really )
 

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

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top