?
Solved

Java Applet NoSuchMethodError

Posted on 2011-03-15
8
Medium Priority
?
559 Views
Last Modified: 2012-08-13
Hello I have an applet that I'am trying to launch, and i notice when deploying it to a web page using the applet code of

<applet code="ddcg.NoteCount.class" width="350" height="200" archive="axmsound.jar, ddcg.jar">
</applet>

Now when i try to launch it I notice nothign pops up, so upon further investigation into the java console I realize that the method getPitchName()  is not found.  Now the thing is ddcg is dependant on axmsound to work, and the method getPitchName() exist in axmsound.jar, where as the application itself lives in the ddcg.jar, and the application code that live inside the ddcg.jar imports some of the classes and methods inside axmsound

So basically how can I make the applet detect the axmsound? it seems to work fine when working in netbean but when it comes to actually launching my applet it doesnt work.  Help is greatly appreciated thank you!.
0
Comment
Question by:Alanf718
[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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 1000 total points
ID: 35140843
Make sure the same jars are being deployed to the web that are using in NB

Is there a url we can try yet?
0
 
LVL 47

Expert Comment

by:for_yan
ID: 35140912
Is getPitchName() a static method?
If it is, you should prefic it with the class name.
If not you should instantiate instance of some class
and then use it rto run this method - you'll be rather missing class
than missing method, if your axmsound.jar is inaccessible
0
 

Author Comment

by:Alanf718
ID: 35141039
getPitchName() is in fact a static method, and I only have the code existing on my local machine.  but I assure you that the jar files are the same, wether or not Iam "declaring" them right or whatever the case may be in the html applet code is another issue.

The begging of the error in ints interity is

Exception in thread "thread applet-ddcg.NoteCount.class-1" java.lang.NoSuchMethodError: axmsound.data.Pitch.getPitchName(I)...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 86

Expert Comment

by:CEHJ
ID: 35141070
>> but I assure you that the jar files are the same,

How do you know?
0
 
LVL 47

Expert Comment

by:for_yan
ID: 35141100
One not very elegant method, but the one which may be useful when having issues with applets is to
expand this jar into the code base of the Applet


As far as I recall, I used to have 'No such method" errors when I had some version mismatches
0
 
LVL 26

Assisted Solution

by:ksivananth
ksivananth earned 1000 total points
ID: 35141104
make sure you have right version of axmsound.jar and then try changing the order of the jars in archive list...
0
 

Author Closing Comment

by:Alanf718
ID: 35141229
I tried copying the actual output jar files that netbeans packaged for me as opposed to the ones i was jarring myself, and it worked! seemed like the jars even though containing the same files werent the correct "version" so it wasnt being recognized, thanks for all the help!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35141263
:)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

764 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