954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Question about java.lang.UnsatisfiedLinkError in MMAPI

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/ )

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();
	}
}


java.lang.UnsatisfiedLinkError will be thrown,

Exception occurs in thread “main java.lang.UnsatisfiedLinkError: com/sun/mmedia/WaveOut.nOpen(IIIII)I
	at com.sun.mmedia.WaveOut.open(Unknown Source)
	at com.sun.mmedia.WavPlayer.doPrefetch(Unknown Source)
	at com.sun.mmedia.BasicPlayer.prefetch(Unknown Source)
	at com.sun.mmedia.BasicPlayer.start(Unknown Source)


I am wondering how to solve this issue?


Thanks in advance,
George

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 
public static void main(String[] args) {
	
	try {
		Player player = <strong>Manager.createPlayer"http://localhost/sample.wav");</strong>
		player.start();
	} catch (MediaException e) {
		e.printStackTrace();
	} catch (IOException e) {
		e.printStackTrace();
	}
}


could the problem be leaving out a parenthesis?

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();
	}
}
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

Thanks server_crash,

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

could the problem be leaving out a parenthesis?

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();
	}
}

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

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 

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.

jerbo
Junior Poster in Training
84 posts since Sep 2004
Reputation Points: 11
Solved Threads: 1
 

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

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

Thanks 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

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 

Unfortunatly, I have not done any development work using J2ME. Sorry I couldn't help; it was a shot in the dark.

jerbo
Junior Poster in Training
84 posts since Sep 2004
Reputation Points: 11
Solved Threads: 1
 

Check out this:

http://www.javakb.com/Uwe/Forum.aspx/java-programmer/14139/re-playing-sound-in-J2ME

I don't know if this will help or not. I haven't had any experience working with j2me either.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

Thanks server_crash,

Check out this:

http://www.javakb.com/Uwe/Forum.aspx/java-programmer/14139/re-playing-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

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 

Never mind 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

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 

Thanks server_crash,

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

I knew it was a little different, but I was hoping you could use their methods of playing sound in your app.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

Thanks for all the people who helped me on this thread.


regards,
George

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 

had any luck in solving the error...is there any workaround for it..please let me know..
-agal

mmapi
Newbie Poster
1 post since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

Thanks agal,

had any luck in solving the error...is there any workaround for it..please let me know.. -agal

The issue is still not solved. Do you have similar issue? Please let me know if you have solved the issue.


regards,
George

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 

If you downloaded the source code and it's suppose to work, my only guess would be that some kind of "library" is missing which is operating system independent.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

Thanks server_crash,

If you downloaded the source code and it's suppose to work, my only guess would be that some kind of "library" is missing which is operating system independent.

Your reply is very helpful. Do you know what libraries are missing or how to detect what libraries are missing?


regards,
George

George2
Junior Poster
189 posts since Nov 2004
Reputation Points: 11
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You