?
Solved

java.lang.NoClassDefFoundError?????

Posted on 1997-03-13
1
Medium Priority
?
276 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 400 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

777 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