Solved

java.lang.NoClassDefFoundError?????

Posted on 1997-03-13
1
264 Views
Last Modified: 2008-03-06
I am trying to use a  Java Midi API from outside of Sun's API.  The API is called MidiShare and I am having a great deal of trouble getting it to work. Whenever I try to load a MidiShare applet I revieve this information......

AppAccelerator(tm) 1.0.2a for Java, x86 version.
>Copyright (c) 1996 Borland International. All Rights Reserved.
># Failed to pull over zip file
>http://www.grame.fr:80/Java_classes/MidiDisplay.zip
># Security Exception: link:JMidi
># Applet exception: error: java.lang.NoClassDefFoundError
>java.lang.NoClassDefFoundError
>  at grame.appletsmidi.MidiApplet.<init>(MidiApplet.java)
>  at grame.appletsmidi.MidiDisplayApplet.<init>(Compiled Code)
>  at netscape.applet.EmbeddedAppletFrame.run(Compiled Code)
>  at java.lang.Thread.run(Compiled Code)
># Applet exception: error: java.lang.NoClassDefFoundError
>java.lang.NoClassDefFoundError
>  at grame.appletsmidi.MidiApplet.<init>(MidiApplet.java)
>  at grame.appletsmidi.MiniKeyboardApplet.<init>(Compiled Code)
>  at netscape.applet.EmbeddedAppletFrame.run(Compiled Code)
>  at java.lang.Thread.run(Compiled Code)

The MidiShare API consists of three main parts.  A Player32.dll which is supposed to go into the windows system directory, two more dll's (JMidi.jll, Jplayer.jll) that go into the Netscape/program/java/bin folder, and a class folder called grame which goes directly into the Netscape/program/java/class directory.(I have done all this)
 
I am using the JDK1.1 and Nescape Nav gold 3.1 on a pentium system.  Can you please tell me what this message means and what I need to do to fix this problem.

Any help will be very much appreciated.
0
Comment
Question by:Mystosus
1 Comment
 

Accepted Solution

by:
amarshal earned 200 total points
ID: 1219003
You are trying to download native code as an applet, which is throwning a securtity exception (line 4).  Native interfaces, like your dll's, are not allowed in applets.  Allowing such would make Java as insecure as ActiveX.  In addition to being insecure, it makes the Java applet platform depended; it would not run on a Mac or Sun machine.

The NoClassDefError is a result of the security exception disallowing the classes/dlls to be loaded.

Unfortunately, since it is a security exception, there is no fix for this.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question