logoalt Hacker News

chasiltoday at 3:21 AM1 replyview on HN

In pieces of my code, I need to call setuserid() to manage some of the security that I designed in 2010.

There was no Rust at that point, and I used the most basic tool that could do it.

Could I have done this in Java with gymnastics of JNI, linking C into the JRE?

Definite maybe.


Replies

pjmlptoday at 8:45 AM

Yes, nowadays with Panama, and before Rust was around, JNA was already there so using JNI wasn't strictly necessary.