Question about java.lang.UnsatisfiedLinkError in MMAPI

Reply

Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Question about java.lang.UnsatisfiedLinkError in MMAPI

 
1
  #1
Jan 24th, 2005
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/)

  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,

  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
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
0
  #2
Jan 24th, 2005
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?

  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. }
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
0
  #3
Jan 24th, 2005
Thanks server_crash,


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?

  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
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 84
Reputation: jerbo is an unknown quantity at this point 
Solved Threads: 1
jerbo jerbo is offline Offline
Junior Poster in Training

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
1
  #4
Jan 25th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
0
  #5
Jan 25th, 2005
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....
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
0
  #6
Jan 25th, 2005
Thanks jerbo,


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
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 84
Reputation: jerbo is an unknown quantity at this point 
Solved Threads: 1
jerbo jerbo is offline Offline
Junior Poster in Training

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
0
  #7
Jan 26th, 2005
Unfortunatly, I have not done any development work using J2ME. Sorry I couldn't help; it was a shot in the dark.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
0
  #8
Jan 26th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
0
  #9
Jan 26th, 2005
Thanks server_crash,


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
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Re: Question about java.lang.UnsatisfiedLinkError in MMAPI

 
0
  #10
Jan 26th, 2005
Never mind jerbo,


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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC