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

Use 'Java Native Access' (JNA) instead of PowerShell tricks? #16

Closed
SackCastellon opened this issue Apr 18, 2018 · 3 comments
Closed

Use 'Java Native Access' (JNA) instead of PowerShell tricks? #16

SackCastellon opened this issue Apr 18, 2018 · 3 comments

Comments

@SackCastellon
Copy link
Contributor

SackCastellon commented Apr 18, 2018

I just found java-native-access/jna and I think instead of calling the PowerShell we could use Shell32Util.getKnownFolderPath(Guid.GUID guid) together with KnownFolders to get the corresponding folder path.

For example:

String desktopPath = Shell32Util.getKnownFolderPath(KnownFolders.FOLDERID_Desktop);

What do you think?

@soc
Copy link
Collaborator

soc commented Apr 19, 2018

Wouldn't depending on JNA turn this < 10kB library into a 3.7MB dependency?

Even with bare JNI, I believe this would require shipping multiple DLLs inside the JAR file for whatever platform Windows runs on?

@SackCastellon
Copy link
Contributor Author

SackCastellon commented Apr 19, 2018

  • Yes 😅
  • Maybe

@soc
Copy link
Collaborator

soc commented Aug 16, 2019

I'm closing this – my plan is to wait for Project Panama to enable first-class access to native code.

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