Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NativeStreams error - UnsatisfiedLinkError #260

Closed
rveronese opened this issue Jul 15, 2014 · 3 comments
Closed

NativeStreams error - UnsatisfiedLinkError #260

rveronese opened this issue Jul 15, 2014 · 3 comments
Labels

Comments

@rveronese
Copy link

Hi to all..i get this error when trying to redirect the native streams using NativeStreams class. It's running on Windows, where perhaps hasn't be tested yet!

Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'fdopen': Impossibile trovare la procedura specificata.

at com.sun.jna.Function.<init>(Function.java:179)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:430)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:410)
at com.sun.jna.Library$Handler.invoke(Library.java:205)
at com.sun.proxy.$Proxy1.fdopen(Unknown Source)
at uk.co.caprica.vlcj.runtime.streams.NativeStreams.redirectErrorTo(NativeStreams.java:119)
at uk.co.caprica.vlcj.runtime.streams.NativeStreams.<init>(NativeStreams.java:89)
at com.rtlc_project.client.Client.main(Client.java:93)
@caprica
Copy link
Owner

caprica commented Jul 15, 2014

Indeed this experimental class has not been tested on Windows.

This implementation uses "fdopen" and other similar functions from the native "C" library.

I guess that function does not exist in the Microsoft C runtime library, or the vlcj LibC class is not loading the msvcrt.dll correctly. Maybe try changing the loadLibrary call in that class from "msvcrt" to "libmsvcrt", but that is a total guess.

@rveronese
Copy link
Author

Just tried and it doesn't find the target library...thanks for your help anyway!

There is maybe an alternative way to do the redirect?

@rveronese
Copy link
Author

I've solved with a very basic batch script executing the jar file and redirecting the STDERR...if anyone need here's the code
java -jar filename.jar 2>3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants