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

Nice allow user manually load the native library #361

Closed
ivanooi opened this issue Aug 2, 2021 · 4 comments
Closed

Nice allow user manually load the native library #361

ivanooi opened this issue Aug 2, 2021 · 4 comments

Comments

@ivanooi
Copy link

ivanooi commented Aug 2, 2021

Hi,

Nice if you are able to allow users to load the native library manually. Thanks

@hedgecrw
Copy link
Contributor

hedgecrw commented Dec 6, 2021

This is not how this library was designed to work. Do you have a specific use-case for this reason to better understand the request?

@ivanooi
Copy link
Author

ivanooi commented Dec 6, 2021

Hi, thanks for the reply.

Yes, this is due to the IT requirement which limits app access to Windows system folder...

Thanks ya

@hedgecrw
Copy link
Contributor

hedgecrw commented Dec 6, 2021

Gotcha.

Please try starting up your Java application by prepending -Djava.io.tmpdir=/your/tmp/path to your startup call. As an example:

java -Djava.io.tmpdir=/Users/hedgecrw -jar jSerialComm-2.8.0-test.jar

This should allow you to specify which "temporary" file folder is used by jSerialComm to extract its native DLL.

On Windows, it seems like Java may not respect this flag (but please try it first), but you may be able to achieve the same result by setting the TMP environment variable (either through the Settings->System Properties->Environment Variables GUI or via SET TMP=C:\Users\hedgecrw in a command terminal).

@hedgecrw
Copy link
Contributor

These instructions have been updated in both the jSerialComm README as well as the Troubleshooting Wiki.

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

No branches or pull requests

2 participants