• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Uable to view swing applet on Sun site!

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Folks,
I'm unable to view the swing based applet on the Sun site - you know the basic "Hello World" one located at: http://java.sun.com/docs/books/tutorial/uiswing/start/HelloSwingApplet.html
Yes, yes, I know, I have the Java console fully installed & enabled, specifically v.1.4.2_03. I'm using IE 6.0 on a windows XP box. Strange observation is I can view it with Netscape's Navigator 7.1 which is on the same box. I'm very confused. I have all the Java option fully enabled in IE, that is, tools - advance -> etc...
Anyone with any ideas at all? Help.
Al
Java Console Error Message As Follows:

java.lang.ClassNotFoundException: javax.swing.JApplet
at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
at java/lang/ClassLoader.loadClassInternal (ClassLoader.java)
at java/lang/ClassLoader.resolveClass (ClassLoader.java)
at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
at com/ms/vm/loader/URLClassLoader.loadClass (URLClassLoader.java)
at com/ms/applet/AppletPanel.securedClassLoad (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.run (AppletPanel.java)
at java/lang/Thread.run (Thread.java)
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Al Murphy Al Murphy:
Yes, yes, I know, I have the Java console fully installed & enabled, specifically v.1.4.2_03.


When you say "fully installed and enabled", do you mean that on the Java Plug-In Control Panel, you have selected the Browser tag and where it says "Java Plug-In will be used as the default Java Runtime in the following browser(s):" you have checked "Microsoft Internet Explorer"? the exception you are getting seems to indicate the Microsoft VM is being used.
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
Interesting. I checked Control Panel where you specified and under:
"Java Plug-In will be used as the default Java Runtime in the following browser(s):"
I have both checked the options:
Microsoft Internet Explorer and
Netscape 6 or later
But prey tell what's this I hear you say about the Java VM kicking in? Can I disable the VM? Any ideas Joe? I'm really confused with this problem. It was working previously...
Confused,
Al
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Al Murphy Al Murphy:
But prey tell what's this I hear you say about the Java VM kicking in? Can I disable the VM?


I'm not sure what you mean by "the Java VM kicking in". I think the Microsoft VM is starting up because of this line in your exception:

Try opening IE, clicking on "tools", clicking on "Internet Options", clicking on the "Advanced" tab and scroll down until you see an entry marked "Java (Sun)". Check the box next to "Use Java <java version> for applet. Restart and see what happens.
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
As you mentioned I now have the following in IE:
Java(Sun)
"Use Java 2 v1.4.2_03 for <applet> requires restart" ENABLED
Microsoft VM
"Java console enabled (requires restart)" DISABLED
"Java logging enabled" DISABLED
"JIT compiler for virtual machine enabled (requires reatart)" DISABLED
I rebooted but I still can;t view the japplet at Sun. I also notice that when I do Tools -> Sun Java Console nothing happens. Wasn;t this meant to do something?
I'm very confused Joe.
Al.
The confused.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Al Murphy Al Murphy:

I rebooted but I still can;t view the japplet at Sun. I also notice that when I do Tools -> Sun Java Console nothing happens. Wasn;t this meant to do something?


Works on my computer. Both the Tools-> Sun Java Console thing and the applet.
You can enable the java console by opening the Plug-In control in the Control Panel and selecting "Show Console" on the "Basic" tab. Do that and let us know what the error is. Be aware, you may have more than one Java Plug-In on your computer. Use the latest version ("about" tab in the Plug-In control)!
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
"Show console" in "Basic" tab ENABLED

"About" tab in plug-in control = Java(TM) plug-in 1.4.2_03
I also did a "java -version" command at the command line. Once again I got 1.4.2_03
I think this is the most recent version? Would you agree?
Anyway I still can't view the japplet at Sun. Bummer!

I reckon like you that a MS virtual machine is on my box? But how do I get info on it and disable it completely?

Al.
The very confused.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Al Murphy Al Murphy:

"About" tab in plug-in control = Java(TM) plug-in 1.4.2_03
I think this is the most recent version? Would you agree?


You are correct


I reckon like you that a MS virtual machine is on my box? But how do I get info on it and disable it completely?


There is a MS VM on your computer. Type "jview" at a command line and you'll see. I believe you have gone through all the steps to disable it in IE and enable the Sun VM and I don't know what else is wrong. Are you still getting an error in the java console?
Let's try something far out. If one uses the OBJECT tag rather than the APPLET tag in their HTML, they can tell the applet to install the Java Plug-In. Point your browser at this applet and let me know how it goes.
[ February 04, 2004: Message edited by: Joe Ess ]
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
You were right. After typing "jview" on the command line I get "Microsoft <R> Command-Line Loader for Java. Version 5.00.3810"
I am not receiving any errors on the Java console as it does not appear (I take it you are referring to the View -> Java Console option in the browser menu bar. This does not appear. Neither are there any error when I look at the Java Plug-in in Control Panel.
When I click on the link you provided in IE I get taken to a mainly grey applet box with just 1 pushbutton on the top. I click on it and a pop-up appears. It won't close. Nothing installed per se.
I then went back to the swing based applet at Sun and tried it but it just renders a grey box.
It's like the Java plug-in is installed on my system but is not kicking in. I notice that I have .NET Framework v1.1 installed on this box. Should I remove this or can I just make MS's VM just go away or switch off? Where is the control panel for the MS .NET Framework???
Al.
There is a MS VM on your computer. Type "jview" at a command line and you'll see. I believe you have gone through all the steps to disable it in IE and enable the Sun VM and I don't know what else is wrong. Are you still getting an error in the java console?
Let's try something far out. If one uses the OBJECT tag rather than the APPLET tag in their HTML, they can tell the applet to install the Java Plug-In. Point your browser at this applet and let me know how it goes.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Al Murphy Al Murphy:

When I click on the link you provided in IE I get taken to a mainly grey applet box with just 1 pushbutton on the top. I click on it and a pop-up appears. It won't close.


Interesting. Try it again. It contained AWT classes before and I've changed them to Swing. If the plugin doesn't work, you won't see the button.



It's like the Java plug-in is installed on my system but is not kicking in.


Yep.


I notice that I have .NET Framework v1.1 installed on this box. Should I remove this or can I just make MS's VM just go away or switch off? Where is the control panel for the MS .NET Framework???


I don't think .NET has anything to do with it. I'd think any .NET control on the web would be an ActiveX control.
Check your IE security settings. Click on Tools->Internet Options->Security and scroll down to Scripting->Scripting of Java applets. Make sure it's enabled. There's a Microsoft VM-> Java Permissions selection that I have set to "High safety", but I don't think that's an issue.
If that doesn't work, I'd remove the plugin and re-install it.
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
It's working! I can in to work this morning and found that I could view swing based applets.
Perhaps it was because of the full shut down that I did last night instead of the usual restart.
But I also notice that my company changed their proxy server (during a scheduled network upgrade last night). Although I can't think why this would effect a plug-in...
Anyway Joe thanks for sticking with this one and making those suggestions/commetns etc
Much appreciated.
BR,
Al.
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,

It's stopped working. I don't know why. It was working this morning when I came in but now it has stopped. I swear I did not make any changes to any properties files.
This is weird. I am going to uninstall the Java plug-in and reinstall.
Al.
The confused.
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
I've uninstalled what I could and reinstalled and it's still not working properly. It's working in NN 7.1 though. I'm totally confused!
Al.
The totally confused one.
</end rant>
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since Netscape is working fine I don't think it's java. I think it's IE. You probably have some spyware or malware on your system. Try installing and running a spyware killer like Lavasoft Ad-Aware.
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
Thanks I'l try that. I have the Google pop-up blocker installed .That couldn;t be it could it? I'll install the what you recommended and find out...
Al.
The investigator
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
Here's an update. I installed Ad-Aware 6.0. It scanned and found 1 or 2 wee things. Nothing serious though. I removed them and checked the applet. It was not working. I rebooted and checked the applet. It was not working.
On a whim I surfed on over to the Micorsoft site. I looked at the recent patches for XP & IE. I installed some and rebooted. The applet worked.
This morning when I came in I installed some more. Rebooted and the applet worked for a while. It then stopped working after about 1 hour. All I was doing was surfing. I made not changes to the system.
It appears as if the patches to various things made the plug-in work - for a while but then it stopped. I don't know why though? No error messages are thrown. It's like the plug-in does not kick in. (Meanwhile it's still working in NN). I wonder does the plug-in output to any files I can have a look at - perhaps I can get more inro there...
Al.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The fact that this problem comes and goes is what makes me think that it is some sort of virus/spyware/malware. Did you get the latest updates for the AdAware program? I gave up on IE long ago (Mozilla Firebird for me) because of it's numerous security holes. Unless your client/customer/employer has standardized on it, I'd say use Netscape and move on. Good luck!
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
I see now that it works with your applet that you put up (the one that uses the embed tag) but it does not work with the applet tag (like the one up on the sun site).
Weird no?
Al.
 
Al Murphy Al Murphy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CONCLUSION:
So after all that (thanks Joe) I have the answer. It's the bloody <applet> tag that does not work with it on swing based applets.
So do the folowing folks:
The <EMBED> tag is interpreted by Mozilla, for IE you should encapsulate your Swing Applet in the <OBJECT> tag, as shown in the following fragment:
<OBJECT name = "plugin-install"
classid = "clsid:CAFEEFAC-0014-0001-0004-ABCDEFFEDCBA"
codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_4_1_04-windows-i586.cab#Version=1,4,1,40"
WIDTH = 300 HEIGHT = 100 >
<PARAM NAME = CODEBASE VALUE = "http://labdo:8080/DevBasicApplet/applets/">
<PARAM NAME = CODE VALUE = "tester.unit.applets/TesterJAppletIE.class" >
<PARAM NAME = "type" VALUE = "application/x-java-applet;jpi-version=1.4.1_04">
<PARAM NAME = "scriptable" VALUE = "false">
<COMMENT>
</COMMENT>
</OBJECT>
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic