MINDPROD site applet error - Error loading class: java.awt.GraphicsEnvironment

N

Neill

Is it my browser, or a site issue? I don't see anything in the applet
windows, and the following error in the Java console.

http://mindprod.com/jgloss/finalize.html

Neill

Microsoft (R) VM for Java, 5.0 Release 5.0.0.3810
==============================================
? help
c clear
f run finalizers
g garbage collect
m memory usage
q quit
t thread list
==============================================
.... url=http://mindprod.com/jgloss/snippets/finalize.example2.java.ser
.... url=http://mindprod.com/jgloss/snippets/finalize.example1.java.ser
...stream ready
...stream ready
Error loading class: java.awt.GraphicsEnvironment
java.lang.NoClassDefFoundError
Bug: Token class files missing from jar null
java.lang.NoSuchMethodError: java/awt/Component: method getWidth()I not
found
Bug: Token class files missing from jar null
at com/mindprod/jdisplay/JDisplay.init
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.securedCall
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
java.lang.NoSuchMethodError: java/awt/Component: method getWidth()I not
found
at com/mindprod/jdisplay/JDisplay.init
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.securedCall
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
 
A

Andrew Thompson

http://mindprod.com/jgloss/finalize.html ...
Microsoft (R) VM for Java, 5.0 Release 5.0.0.3810

There is your problem.

I just tested the page in the MSVM (3810)
same result as you.

It works fine in Sun 1.4.2.

Roedy, you should put the JavaVersionApplet
or similar in the page like I do for..
<http://www.physci.org/test/lnf/fullwnd5.html>

OP, I'd like you to do this quick survey for me..
<http://www.physci.org/ms/msclassfile.jsp>

Before following the advice for selecting
the Sun VM described here..
<http://www.physci.org/jvmclean.jsp?pt=deselect>
[ That should allow you to see the page you want. ]

Alternatively. Download an altogether better
browser like Mozilla or Opera and install the
Sun Java directly to it.

HTH
 
R

Roedy Green

Roedy, you should put the JavaVersionApplet
or similar in the page like I do for..
<http://www.physci.org/test/lnf/fullwnd5.html>

I got an applet not found.

I think you need something in JavaScript to give a decent answer if
there is no Java at all.

Yet I don't like putting JavaScript on all my pages. It could cause
more trouble than it solves.


At least for JDisplay, I could put some version sniffing code at the
very start. If it fails what to do? I dare not jump to another page
since every copy will do the same.

There is not always room for a message. Even a popup could be annoying
if they all do it.

Perhaps a hidden version checking applet on all pages with Java that
jumps to an explanation page. If people don't get Java working, they
then can't read anything, which would be even more frustrating than
missing the code snippets.

It is remarkable that Java programmers don't have Java working in
their browsers.
 
M

Mickey Segal

Roedy Green said:
It is remarkable that Java programmers don't have Java working in
their browsers.

Java programmers who are trying to support all users will often be running a
Java 1.1 environment. I think it is safe to assume Java 1.0 folks will
upgrade, but about half the environments I see use the Microsoft JVM.
 
A

Andrew Thompson

...
It turns out the error doesn't occur using a Mozilla browser with a later
JRE. How about a prominent message at the top of the page stating the system
requirements for using your site?

As I already mentioned, that is not necessary.

You can have an invisible applet redirect 1.1 browsers. *
For browsers with *no* Java, or Java disabled,
the 'noscript' and 'alt' tags provide info.

Try this link in both your Mozilla *and* IE Neill..
See how it works.
* <http://www.physci.org/test/lnf/fullwnd5.html>
You will end up at different pages..
[ It should be OK after those 'hiccups'
the other night when Roedy tried it. ]
 
R

Roedy Green

It turns out the error doesn't occur using a Mozilla browser with a later
JRE. How about a prominent message at the top of the page stating the system
requirements for using your site?

I have added code to most of the applets that checks the version and
if not suitably recent puts up a message of the form.

Error: You need Java x.x.x or later to run this Applet.
You are currently running under Java x.x.x.
Get the latest Java from http://java.com/en/index.jsp

The problem is sometimes the Applet window is too tiny. I dare not
use a pop up, because often a Applet is used scores of times on the
same page. Perhaps eventually I will use some static interaction to
prevent multiple popups. Further, popups could be even more irritating
than the lack of Java.

If you had a browser that had no clue what Java was, ironically you
would be better off than having an old java or a disabled Java. Then
VIEW links would reveal themselves at least for the code snippets.

If you are sufficiently desperate, you can view source and chase these
links manually.

I wonder if there is a way of doing a style sheet for the Java
disabled.
 
R

Roedy Green

You can have an invisible applet redirect 1.1 browsers. *
For browsers with *no* Java, or Java disabled,
the 'noscript' and 'alt' tags provide info.

I thought about that then discarded the idea. That blocks people from
using the page without Java. They would be furious at being locked out
of the text too just because they refused to use my Applet.

I'm playing with the idea of taking people to get Java with a single
click.
 
A

Andrew Thompson

On Mon, 07 Jun 2004 13:24:27 GMT, Andrew Thompson


I thought about that then discarded the idea. That blocks people from
using the page without Java. They would be furious at being locked out
of the text too just because they refused to use my Applet.

Of course. I see now how that would be
completely inadequate. But I do have some
ideas to give the 'best of all worlds'..
I'm playing with the idea of taking people to get Java with a single
click.

OK - how about this for a concept.

A starter AWT applet with a CardLayout
and one Label "Testing Java for (AppletName)".

If it finds a suitable Java version it adds
the JApplet to a JPanel as a second
card in the CardLayout, and flips to it.
If not it puts a Button linking to Sun..

Can anybody spot any obvious problems
with that approach? I am not entirely
sure the AWT host Applet can avoid
the mixing light/heavyweight components
problem ..I'd have to experiment.
 
A

Andrew Thompson

...
I wonder if there is a way of doing a style sheet for the Java
disabled.

What do you mean?
To prettify Java source code?

If you can mark it up actively
as keyword, operator, text etc.
sure, easy peasy.

That is what I do for my code.
Pure HTML/CSS.
 
R

Roedy Green

Can anybody spot any obvious problems
with that approach?

the big problem is some Applets such as Currcon only get a tiny
window. To show your button and message you must pop up. This make
the ruddy things hard to ignore if you hate Applets.
 
R

Roedy Green

That is what I do for my code.
Pure HTML/CSS.


That's what I used to do, but it was too fragile, breaking long lines
would insert unwanted spaces.

I thought of redoing it that way with automatically generated text
using <pre> with should help protect the long lines.

The Applet technique has the advantage of cut/pasting correctly. HTML
loses spaces. the Applet technique lets you download the entire
snippet with a click. The applet technique lets me post large
programs without taking up too much screen real estate.

I could generate pages both ways, and build two separate indexes, one
with Applets and one with inline generated HTML. Gets messy since all
links have be set to a/b style. Also people googling in would land
one one or the other, not necessarily the one they wanted.
 
M

Mickey Segal

Roedy Green said:
I thought about that then discarded the idea. That blocks people from
using the page without Java. They would be furious at being locked out
of the text too just because they refused to use my Applet.

I'm playing with the idea of taking people to get Java with a single
click.

On a site devoted to Java it is fair game to insist that people have Java
installed and it is OK to use Java in gratuitous ways in which one would not
use Java on a regular site in order to show certain things about Java. But
to take a "big tent" approach it would be best to have applets target Java
1.1 in all instances in which that is possible, unless inconveniencing
people with the Microsoft JVM is deemed a benefit in itself.
 
A

Andrew Thompson

....
On a site devoted to Java it is fair game to insist that people have Java
installed ..

...when they are browsing from the local library?

And yes, there *were* times in the last 18
months where my only access to the net was
the local library.

As it happens, the library *did* have Sun
Java installed. [ But it might NOT have!! ]
...So I was able to WebStart/install my PhySci
app. and run CattleDog to search their disks.
My, how boring that was.. ;-)
 
M

Mickey Segal

Andrew Thompson said:
..when they are browsing from the local library?

If you are trying to show certain things about Java using Java on a Web site
it is appropriate to use Java. One could argue that colored html can be
displayed using other technologies, but Roedy Green indicated that he is
showcasing his Java-based HTML displayer, and we should cut a certain amount
of slack to someone who is providing so much good information for free.

The applets I show on http://segal.org/java would also not work at your
lagging-edge library, but the subject is Java and I need Java to show
certain things.

Maybe the solution is a band of Java evangelists to convince libraries to
install Java. We could hand out coffee cups.
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top