• 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

Problem in loading applet in IE - " 'CODE' Parameter" for jre1.5

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using jre version 1.5 for IE & am tryin gto load the applet thr' the browser. But it is giving me these exceptions & is showing "Applet notinited".

The exceptions it is showing are:

APPLET tag missing CODE parameter.
java.lang.NullPointerException: name
at sun.applet.AppletClassLoader.getResourceAsStream(Unknown Source)
at sun.applet.AppletPanel$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.security.AccessControlException: access denied (java.awt.AWTPermission accessClipboard)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkSystemClipboardAccess(Unknown Source)
at sun.awt.windows.WToolkit.getSystemClipboard(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I have also signed the jar file but then also it is giving me access denied exception....

Plz can anybody help me out.

Thanx.

Regards,
- Neha
 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neha,
For applets, you need to have following syntax .

<APPLET CODE = "wjhk.jupload.JUploadApplet" ARCHIVE = "wjhk.jupload.jar" WIDTH = "600" HEIGHT = "400">
</APPLET>

are you passing on all the values?


Does your applet works with 'appletviewer'
syntax for appletviewer is as follows

appletviewer yourappletname.html

check it out.
 
Neha D
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rajendar,
Yes I am able to run my applet thr' appletviewer. It was also being loaded thr' browser when I was using jre1.4.2_06. This problem is encountered when I am loading it using jre1.5.

Plz can you suggest me a solution.

Thanx.

Regards,
- Neha
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neha,
Jre1.5 is to be used with jdk1.5 ? did u check out your classpath ?
you r running the jdk1.4 with jre1.5 ? it may not work . am not sure..
and did u enabled the javaTM plugin via control panel ,if u r working on windows?
 
Neha D
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Rajendar,

I am using jdk1.5.0 with jre1.5.0.
The Java PlugIn is also enabled.

Now it is giving me these exceptions....

load: class classname not found.
java.lang.ClassNotFoundException: classname
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more



The class name here indicates the class name of my applet....

Do you knw why is this happening???

Thanx.

- Neha
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neha,
This error indicates that the applet is not able to find the class.

whts the syntax you used for Applet tag.
<applet code=class-filename
[codebase=directory-URL] width=area-width height=area-height [archive=jar-file-URL] [name=ID] [additional-attributes] ... >

class-filename should be given the full name ,including the .class extension too.

or
check the case and location of the .class file on the Web server

or else

There may be a mismatch between the version of the Java SDK that the applet was created with and the version of the Java RE (run-time environment) locally environment installed. This is only an issue if the applet was created with a later version of the Java SDK than the local Java RE. Note: This only seems to be a problem with Internet Explorer
 
Neha D
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Rajendar,

Even the applet code is written properly... Now there's some new problem. It is giving me these exceptions:

APPLET tag missing CODE parameter.
java.lang.NullPointerException: name
at sun.applet.AppletClassLoader.getResourceAsStream(Unknown Source)
at sun.applet.AppletPanel$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.progressUpdate(Unknown Source)
at sun.plugin.util.ProgressMonitor.updateProgress(Unknown Source)
at sun.net.ProgressSource.updateProgress(Unknown Source)
at sun.net.www.MeteredStream.justRead(Unknown Source)
at sun.net.www.MeteredStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
at sun.plugin.net.protocol.http.HttpUtils.cleanupConnection(Unknown Source)
at sun.plugin.cache.CachedJarLoader.decompress(Unknown Source)
at sun.plugin.cache.CachedJarLoader.access$500(Unknown Source)
at sun.plugin.cache.CachedJarLoader$5.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.cache.CachedJarLoader.download(Unknown Source)
at sun.plugin.cache.CachedJarLoader.load(Unknown Source)
at sun.plugin.cache.JarCache.get(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-6" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
at sun.plugin.util.GrayBoxPanel.setImage(Unknown Source)
at sun.plugin.util.GrayBoxPanel.setError(Unknown Source)
at sun.plugin.util.GrayBoxPainter.getGrayBoxPanel(Unknown Source)
at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-
classname java.lang.NullPointerException
at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-4" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
at sun.plugin.util.GrayBoxPainter.access$000(Unknown Source)
at sun.plugin.util.GrayBoxPainter$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Now plz can you tell me what is going wrong??

Thanx.
- Neha
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neha,
can you post the code and the html ,so that can check it out
 
Neha D
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rajendar,

I am so sorry but there are so many packages & many number of files.... so wont be able to provide u the code... & also confidential code....

so am so sorry....
well i'll try & let you knw abt it again....

Thanx.

Regards,
- Neha
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its ok neha,
i will check out for the solution and will write back.
 
Neha D
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rajendar,

Thanx a lot for ur support. Even I'll try to find out the solution & if it works properly i'll let u knw..

Thanx..

Regards,
- Neha.....
reply
    Bookmark Topic Watch Topic
  • New Topic