944,180 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 8713
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
Jan 24th, 2005
1

Question about java.lang.UnsatisfiedLinkError in MMAPI

Expand Post »
Hello everyone,


When running the following block of source codes (the MMAPI library I am using is downloaded from http://www.sun.com/software/communitysource/j2me/mmapi/)

Java Syntax (Toggle Plain Text)
  1. public static void main(String[] args) {
  2.  
  3. try {
  4. Player player = Manager.createPlayer"http://localhost/sample.wav");
  5. player.start();
  6. } catch (MediaException e) {
  7. e.printStackTrace();
  8. } catch (IOException e) {
  9. e.printStackTrace();
  10. }
  11. }

java.lang.UnsatisfiedLinkError will be thrown,

Java Syntax (Toggle Plain Text)
  1. Exception occurs in thread “main� java.lang.UnsatisfiedLinkError: com/sun/mmedia/WaveOut.nOpen(IIIII)I
  2. at com.sun.mmedia.WaveOut.open(Unknown Source)
  3. at com.sun.mmedia.WavPlayer.doPrefetch(Unknown Source)
  4. at com.sun.mmedia.BasicPlayer.prefetch(Unknown Source)
  5. at com.sun.mmedia.BasicPlayer.start(Unknown Source)

I am wondering how to solve this issue?


Thanks in advance,
George
Reputation Points: 11
Solved Threads: 0
Junior Poster
George2 is offline Offline
189 posts
since Nov 2004
Jan 24th, 2005
0

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

public static void main(String[] args) {
	
	try {
		Player player = Manager.createPlayer"http://localhost/sample.wav");
		player.start();
	} catch (MediaException e) {
		e.printStackTrace();
	} catch (IOException e) {
		e.printStackTrace();
	}
}

could the problem be leaving out a parenthesis?

Java Syntax (Toggle Plain Text)
  1. public static void main(String[] args) {
  2.  
  3. try {
  4. Player player = Manager.createPlayer("http://localhost/sample.wav");
  5. player.start();
  6. } catch (MediaException e) {
  7. e.printStackTrace();
  8. } catch (IOException e) {
  9. e.printStackTrace();
  10. }
  11. }
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Jan 24th, 2005
0

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

Thanks server_crash,


Quote originally posted by server_crash ...
public static void main(String[] args) {
	
	try {
		Player player = Manager.createPlayer"http://localhost/sample.wav");
		player.start();
	} catch (MediaException e) {
		e.printStackTrace();
	} catch (IOException e) {
		e.printStackTrace();
	}
}

could the problem be leaving out a parenthesis?

Java Syntax (Toggle Plain Text)
  1. public static void main(String[] args) {
  2.  
  3. try {
  4. Player player = Manager.createPlayer("http://localhost/sample.wav");
  5. player.start();
  6. } catch (MediaException e) {
  7. e.printStackTrace();
  8. } catch (IOException e) {
  9. e.printStackTrace();
  10. }
  11. }
Your reply is very helpful. I think you are very careful. It is a copy&paste mistake of myself. My actual source codes are the same as you have correctly written. But it still has the exceptions which I quoted. I am wondering what is the cause of this issue and how to solve it.


regards,
George
Reputation Points: 11
Solved Threads: 0
Junior Poster
George2 is offline Offline
189 posts
since Nov 2004
Jan 25th, 2005
1

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

Is this for a mobile device? The library you downloaded is:
Micro Edition Mobile Media API Reference Implementation Version 1.0 (MMAPI)
You may be experiancing problems because you are trying to run the app as a PC app, and the library is not designed for the PC environment. Hence the Link error.
Reputation Points: 11
Solved Threads: 1
Junior Poster in Training
jerbo is offline Offline
84 posts
since Sep 2004
Jan 25th, 2005
0

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

If you simply want to play a .wav file, there are much simplier ways of doing this. That is of course, if your wanting to do this on a pc....
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Jan 25th, 2005
0

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

Thanks jerbo,


Quote originally posted by jerbo ...
Is this for a mobile device? The library you downloaded is:
Micro Edition Mobile Media API Reference Implementation Version 1.0 (MMAPI)
You may be experiancing problems because you are trying to run the app as a PC app, and the library is not designed for the PC environment. Hence the Link error.
I am writing an application for Foundation profile of J2ME. It is not running on PC (J2SE). Do you know how to solve this issue?


regards,
George
Reputation Points: 11
Solved Threads: 0
Junior Poster
George2 is offline Offline
189 posts
since Nov 2004
Jan 26th, 2005
0

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

Unfortunatly, I have not done any development work using J2ME. Sorry I couldn't help; it was a shot in the dark.
Reputation Points: 11
Solved Threads: 1
Junior Poster in Training
jerbo is offline Offline
84 posts
since Sep 2004
Jan 26th, 2005
0

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

Check out this:

http://www.javakb.com/Uwe/Forum.aspx...-sound-in-J2ME

I don't know if this will help or not. I haven't had any experience working with j2me either.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Jan 26th, 2005
0

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

Thanks server_crash,


Quote originally posted by server_crash ...
Check out this:

http://www.javakb.com/Uwe/Forum.aspx...-sound-in-J2ME

I don't know if this will help or not. I haven't had any experience working with j2me either.
I have read this discussion and it is very helpful. But I think this discussion is not similar to my issue. My issue is that the sound can not be played, and the discussion is dealing with how to solve delay issue (the sound can be played in this discussion). I am wondering your comments.


regards,
George
Reputation Points: 11
Solved Threads: 0
Junior Poster
George2 is offline Offline
189 posts
since Nov 2004
Jan 26th, 2005
0

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

Never mind jerbo,


Quote originally posted by jerbo ...
Unfortunatly, I have not done any development work using J2ME. Sorry I couldn't help; it was a shot in the dark.
Your previous replies are very helpful. Thanks all the same.


regards,
George
Reputation Points: 11
Solved Threads: 0
Junior Poster
George2 is offline Offline
189 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: stopping an application execution
Next Thread in Java Forum Timeline: JComboBox -- Item is not in the list????????





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC