Solved

Java Applet NoSuchMethodError

Posted on 2011-03-15
8
546 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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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 250 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

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…
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…
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…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

813 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now