Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

W95 AppletViewer 1.1 fails ??

1 view
Skip to first unread message

vipond

unread,
Mar 2, 1997, 3:00:00 AM3/2/97
to

All

I have just downloaded JDK 1.1 and am completely unable to get
AppletViewer
to run on my Win95 machine. No such problem at all with JDK 1.0.2, which
seems weird. No-one in java newsgroups seems to be reporting similar
problems. Any ideas ?

My environment variables seem OK:

>>
C:\jdk1.1>set
TMP=C:\WINDOWS\TEMP
winbootdir=C:\WINDOWS
COMSPEC=C:\COMMAND.COM
PROMPT=$P$G
DIRCMD=/O:N
TEMP=C:\TEMP
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\WINDOWS\SYSTEM;C:\DOS62;C:\JDK1.1\BIN;C:\PKZIP
CLASSPATH=.;C:\jdk1.1\LIB\CLASSES.ZIP
HOMEDRIVE=C:
HOMEPATH=\
HOME=C:\
windir=C:\WINDOWS
<<


Running java -verbose sun.applet.Appletviewer gives:

>>
....
[Loaded sun/applet/AppletCopyright.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/Cursor.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/FocusManager.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/BorderLayout.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/LayoutManager2.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/LayoutManager.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/peer/FramePeer.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/peer/WindowPeer.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/peer/ContainerPeer.class from
C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/peer/ComponentPeer.class from
C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/Panel.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/FlowLayout.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded java/awt/Toolkit.class from C:\jdk1.1\LIB\CLASSES.ZIP]
[Loaded sun/awt/windows/WToolkit.class from C:\jdk1.1\LIB\CLASSES.ZIP]
<<

Then there is no further response (DOS box hangs) with nothing displayed
(AppletViewer does not appear at all).

I then tried running demo applet as follows:

>>
C:\jdk1.1>dir demo\blink

Volume in drive C is HARD DISK
Volume Serial Number is 1EBE-9022
Directory of C:\jdk1.1\demo\Blink

. <DIR> 02/03/97 1:47 .
.. <DIR> 02/03/97 1:47 ..
BLINKJ~1 OLD 3,233 05/02/97 14:40 Blink.java.old
BLINK~1 JAV 3,236 05/02/97 21:50 Blink.java
BLINK~1 CLA 2,334 05/02/97 21:50 Blink.class
EXAMPL~1 HTM 346 05/02/97 21:50 example1.html
4 file(s) 9,149 bytes
2 dir(s) 51,003,392 bytes free

C:\jdk1.1>bin\appletviewer demo\Blink\example1.html
<<

This also hangs DOS box. Then tried:

>>
C:\jdk1.1>bin\appletviewer -debug demo\Blink\example1.html
Initializing jdb...
0xe8cb20:class(sun.applet.AppletViewer)
> quit

C:\jdk1.1>
<<

I have reported this to Sun as a bug on their Web page, but
doubt that I will get a response any time soon.

Pity, because a really need a class in 1.1. In the meantime
I guess I'll revert to 1.0.2.

Any help much appreciated.

Frank

James Cook

unread,
Mar 3, 1997, 3:00:00 AM3/3/97
to


vipond <10033...@compuserve.com> wrote in article
<331980...@compuserve.com>...


> C:\jdk1.1>bin\appletviewer demo\Blink\example1.html
> <<
>
> This also hangs DOS box. Then tried:

I also fail if I try to run it your way, although I get different messages.
The reason it is failing is because your Classpath doesn't describe the
directory containing the main class for the appletviewer to execute.

Try:

cd \demo\blink
appletviewer example1.html

Reason:

The classpath contains the entry "." which tells the interpreter where to
look for the Blink.class file.

I think this is most likely the cause of your problem.

Carl.J....@bridge.bellsouth.com

unread,
Mar 3, 1997, 3:00:00 AM3/3/97
to 10033...@compuserve.com

In article <331980...@compuserve.com>,

vipond <10033...@compuserve.com> wrote:
>
> All
>
> I have just downloaded JDK 1.1 and am completely unable to get
> AppletViewer
> to run on my Win95 machine. No such problem at all with JDK 1.0.2, which
> seems weird. No-one in java newsgroups seems to be reporting similar
> problems. Any ideas ?
>

I am interested in your problem because I have a similar problem, but on
Solaris.
I installed 1.1 on Windows NT and appletviewer runs with no problem.

On Sun Sparc Solaris, I can run a simple HelloWorld program that just
writes to System.out.println, so I know the PATH and CLASSPATH variables
are ok. Have you tried that?

Not only does appletviewer fail, but I can't get the simplest AWT program
to run. Here is my code: import java.awt.*; class AwtTest { public
static void main (String[] args) { Frame f = new Frame(); f.show(); }
}

and here is the output:
java.lang.NullPointerException
at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:59)
at sun.awt.motif.MToolkit.createFrame(MToolkit.java:153)
at java.awt.Frame.addNotify(Frame.java)
at java.awt.Window.show(Window.java)
at AwtTest.main(AwtTest.java:7)

Anyone else have any ideas?

Thanks,

Carl

-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet

Adrian Powell

unread,
Mar 4, 1997, 3:00:00 AM3/4/97
to

Carl.J....@bridge.bellsouth.com writes:

>On Sun Sparc Solaris, I can run a simple HelloWorld program that just
>writes to System.out.println, so I know the PATH and CLASSPATH variables

>[snip]

>and here is the output:
>java.lang.NullPointerException
> at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:59)
> at sun.awt.motif.MToolkit.createFrame(MToolkit.java:153)
> at java.awt.Frame.addNotify(Frame.java)
> at java.awt.Window.show(Window.java)
> at AwtTest.main(AwtTest.java:7)

take a look at:

$JAVA_HOME/lib/fonts*

and move all of these files somewhere else (like fonts_back/ or
something) or just delete them. Weird Solaris problem that is
mentioned in the "bugs" page of Java, and in the faq (yet still
cost me a few hours of searching :)

-Adrian.

0 new messages