Solved

java.lang.NoClassDefFoundError?????

Posted on 1997-03-13
1
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

726 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