• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

applet FAQ number 3 , on netbeans , class not found

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My applet works fine if I run it locally, but not if it's served from a web server. What gives?

A symptom of this problem might be a message "applet not initialized" at the bottom status bar of the browser window. Make sure you haven't put any required class files into the WEB-INF directory - web servers will not serve any files out of that directory. Move the class files to a publicly accessible directory - the most convenient would be the directory where the HTML file with the applet tag is in.

The problem is that netbeans always moves the .class files to the /class folder when you build a web application , so what should I do I tried this and some variations of this but it wont work

<APPLET code="a/SwingCapture.class" width=350 height=200></APPLET> applet not found
tried SwingCapture.class , /a/SwingCapture.class
<img src="a/sol.jpg" width="1024" height="1024" alt="sol"/> image ok
[ February 09, 2007: Message edited by: jon casari ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So the SwingCapture class is inside of a directory called "a" which in uderneath the directory where the HTML file is located? Can you download the class manually through the browser by typing in "http://.../a/SwingCapture.class"?
 
jon casari
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes , I can download it
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In that case check the web server access logs to see which files the JVM is actually trying to download. Incidentally, the code attribute does not take a filename like "a/SwingCapture.class", but a qualified class name like "a.SwingCapture" ("a.SwingCapture.class" may also work).
 
The moth suit and wings road is much more exciting than taxes. Or this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic