Solved

Java Applet NoSuchMethodError

Posted on 2011-03-15
8
544 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>> but I assure you that the jar files are the same,

How do you know?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 47

Expert Comment

by:for_yan
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
:)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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…

771 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

12 Experts available now in Live!

Get 1:1 Help Now