Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
63 views

I'm making a Java app that scans the Windows Recent Files folder and resolves .lnk shorcuts to their actual file paths. I'm doing so using JNA the JNA API and simulating IShellLinkW and IPersistFile. ...
Syed Maroof Hussain's user avatar
2 votes
1 answer
129 views

In the java 25 move, we're removing some code that uses reflection in a soon-to-be-disallowed way. Instead, we're looking at using JNA. I need to access a file descriptor (the unix kind) and I thought ...
Erik's user avatar
  • 2,071
3 votes
1 answer
104 views

Background and environment: I have a Windows software installed, which has a Component Model Object. The COM provides a function: long GetValue(VARIANT* v, short a, short b, [optional] VARIANT c, [...
Tyrael's user avatar
  • 61
1 vote
1 answer
101 views

When launching my minecraft forge 1.8.9 mod in a dev env (Intellij Idea) it launches perfectly fine but when exporting the mod and using it In-Game it crashes on start-up with this error: Description: ...
Zacgamingpro1234's user avatar
0 votes
0 answers
48 views

As you already know mouse wheel scroll does not work properly on MacOS. To fix this I tried to intercept all scroll events and modify them. This is what I have currently import ...
George Shalvashvili's user avatar
1 vote
1 answer
405 views

I'm trying to use Windows graphics API to capture windows through my Java application with the help of JNA. I have successfully achieved this, but when running multiple captures it seems to block and ...
joe's user avatar
  • 49
2 votes
0 answers
84 views

I'm integrating in Java with a DLL that allows me to add an instance to be notified. I have tried several solutions and in none of them was the COM object able to notify me. I suspect that the way I ...
Kildary Klein's user avatar
2 votes
0 answers
82 views

I have a Go method that returns 2 byte arrays and 2 strings defined as: // export GetDetails func GetDetails() (unsafe.Pointer, unsafe.Pointer, *C.char, *C.char) { ... return C.CBytes(arr1), C....
scottstots's user avatar
0 votes
1 answer
118 views

I am using android library called "autoreplyprint.aar" , this library contains another.jar file called "jna-4.5.1.jar". I have used following code to bind it in my MAUI project, &...
Nikhil Sathawara's user avatar
1 vote
1 answer
240 views

This is a specific issue I found while making MRE for my earlier question. It's not clear if it's the same issue, even though it seems related, so I'm asking it as a separate question. Consider the ...
Xellos's user avatar
  • 752
2 votes
1 answer
68 views

I'm trying to write JNA wrappers for LibRaw and I'm stumbling over one particular C structure: typedef struct { enum LibRaw_image_formats type; ushort height, width, colors, bits; ...
Marek P's user avatar
  • 21
-1 votes
1 answer
141 views

I'm working on a class project and about half of our group knows c++ and the other half only knows Java FX. Our project is a synthesizer, which involves a good amount of DSP and GUI stuff. I figured ...
Taylor's user avatar
  • 3
2 votes
2 answers
266 views

I have a transparent stage and I need when user click inside this stage then mouse event to be passed to a window that is behind my JavaFX stage (for example, if there is a text editor behind my stage ...
SilverCube's user avatar
  • 1,148
0 votes
2 answers
236 views

I'm new to JNA and trying to put together a very minimal proof-of-concept for accessing structs from a C++ shared library. Unfortunately, it doesn't run and I cannot figure it out. Here's my code: ...
H3007's user avatar
  • 62
0 votes
0 answers
32 views

I have multiple structs declared in the header files with many different primitive types as: uint8_t, uint16_t, uint8_t[], uint8_t[], uint8_t[][], ... , uint16_t[][], ..., uint32_t[][] In Java, when I ...
user29803958's user avatar
0 votes
1 answer
96 views

This follows on from my earlier question. I now need to access a C++ struct that has multiple members of type std::vector<double> or std::vector<int>. However while I seem to successfully ...
H3007's user avatar
  • 62
0 votes
1 answer
65 views

Background: I'm not a professional developer - I used C a few decades ago and Java a few years ago. I'm rusty. I'm trying to write JNA wrappers for LibRaw and I'm struggling to get the right JNA '...
Marek P's user avatar
  • 21
15 votes
4 answers
17k views

When running a new project utilising LeadIQ's play boilerplate, we will run into an UnsatisfiedLinkError in older versions of JNA below version 5.7.0. I think this is due to incompatible binaries ...
Zack's user avatar
  • 269
0 votes
0 answers
51 views

I created two dll libraries in C# , shuchu.dll AND yinyong.dll The contents of shuchu dll namespace shuchu { public class Class1 { [DllExport("getInfo", CallingConvention =...
Achelous's user avatar
0 votes
0 answers
86 views

I’m working on a Java application where I want to create a transparent, non-clickable window with only a clickable button. To manipulate the window’s native properties, I am using JNA (Java Native ...
JamesB's user avatar
  • 529
0 votes
1 answer
118 views

I'm trying to call a method from a .dll, using com.sun.jna.Native. It works fine when run from IntelliJ, but crashes when executed as a .jar file. How do I fix it, so that the .jar is able to call the ...
CAA's user avatar
  • 970
0 votes
0 answers
63 views

I'm trying to test the ability of calling a COM compiled from C# in a Java application using JNA. C# code: namespace MyComLibrary { [Guid("SOME_GUID")] [InterfaceType(ComInterfaceType....
Michael Azarzar's user avatar
0 votes
1 answer
73 views

Whenever I commit/push using SourceTree, I get the following popup. It looks like SoucreTree is creating some executables on the fly. Jna can't be opened because Apple cannot check it for malicious ...
pixel's user avatar
  • 26.8k
0 votes
1 answer
130 views

I have a native .so library that has the following function: void foo(void* handle); It works well in C#: [DllImport("library.so", CallingConvention = (CallingConvention) 3)] private static ...
Eng.Fouad's user avatar
  • 118k
0 votes
1 answer
56 views

I wrote a simple rust file as #[no_mangle] pub extern "C" fn add(a: i32, b: i32) -> i32 { a + b } and tried to invoke it in Java. So I loaded it and defined 2 native methods: ...
Sheldon Wei's user avatar
  • 1,252
1 vote
2 answers
176 views

I'm deploying Apache Cassandra on a managed RHEL8 instance. I can install and start Cassandra successfully if I remount /tmp without the noexec flag. Overnight the noexec flag is reinstated by company ...
Andreas Larfors's user avatar
119 votes
10 answers
53k views

JNA seems a fair bit easier to use to call native code compared to JNI. In what cases would you use JNI over JNA?
Marcus Leon's user avatar
1 vote
0 answers
102 views

I need to get PowerShell current directory in Java code using PowerShell PID. For example, if there is a PowerShell instance and a user is in E:\Temp directory I need to get E:\Temp. If the user does ...
SilverCube's user avatar
  • 1,148
2 votes
2 answers
164 views

I need to access a "native" C library from Java via Java Native Access (JNA). The idiomatic way to do this seems to be defining an interface that extends Library and that declares all the ...
user25710790's user avatar
0 votes
1 answer
38 views

I am writing a Kotlin Multiplatform wrapper for google/leveldb. Links for context: leveldb-builds: where the binaries are compiled for Linux, Windows, Apple and Android targets (arm32, arm64, x64, ...
Lamberto Basti's user avatar
58 votes
1 answer
233k views

I have implemented a JNA bridge to FDK-AAC. Source code can be found in here When bench-marking my code, I can get hundreds of successful runs on the same input, and then occasionally a C-level crash ...
Sheinbergon's user avatar
  • 3,111
1 vote
1 answer
610 views

I am developing a Rust library named Galileo with FFI to Android, and am trying to run it in Android emulator. It compiles fine with the command and produces x86 directory where you'd expect: cargo ...
Maxim Gritsenko's user avatar
0 votes
1 answer
73 views

I have an Apache NiFi dataflow that transports data between two directories on my system through POSIX message queues using two NiFi processors that I made. These processors use JNA to make the calls ...
CakeDefense's user avatar
2 votes
0 answers
129 views

My Java application takes a screenshot of the screen and then displays it. Normally this would be a funny prank where a user would click around and there would be no response as they're trying to ...
Benjamin Ing's user avatar
0 votes
0 answers
446 views

I'm trying to use Tesseract. java.lang.NoClassDefFoundError: Could not initialize class net.sourceforge.tess4j.TessAPI I've checked if this library is found via jna debug. Found library resource at ...
Cesar's user avatar
  • 537
0 votes
1 answer
273 views

Context I created a Lanterna TUI which works perfect on Ubuntu, and I am testing it on Windows 11. When I run the command with javaw, a separate terminal is created that is glitches as soon as one ...
a.t.'s user avatar
  • 2,907
8 votes
2 answers
22k views

It is possible to call C methods through the JNA interface in Java. How can I reach the same functionality with Go? package main import "fmt" import "C" //export Add func Add(x, ...
dmotta's user avatar
  • 1,923
1 vote
1 answer
46 views

I want to write a test which would confirm that my string is successfully printed to console via JNA using WriteFile function. Specs: Windows 11 Home, Version 22H2 Java 22 JNA 5.14.0 Kernel32.java ...
Max Trunnikov's user avatar
0 votes
0 answers
87 views

Im trying to set messaging between two instances of my kotlin desktop (windows) project. The app is a music player and the idea is that once an instance of the app is already running, new instances ...
Parkinson's user avatar
0 votes
2 answers
846 views

I'm looking for possible reasons for a strange issue with JNA. I have a Java application which uses bunch of shared libraries, all self made, programmed by me and my colleague. We are using JNA 5.x to ...
al.'s user avatar
  • 504
0 votes
1 answer
388 views

After making a JavaFX Application, the hardest part has been trying to export it. I am using openjfx 19 and openjdk 11 and want to export the Application using the javafx-maven-plugin javafx:jlink. In ...
Ayame4's user avatar
  • 1
5 votes
2 answers
5k views

I have a Java desktop application which is supposed to run in both GNU Linux distributions (Debian and Ubuntu) and MUSL Linux distributions (Alpine). My application uses a native library also and ...
Gaurav Jeswani's user avatar
0 votes
2 answers
259 views

How using Java JNA get a pointer from a native method and pass it to another native method? //C code .h ... extern "C" HN2QCONN __stdcall N2QLibConnCreate(LPCTSTR lpszIniFile, LPCTSTR ...
KUL's user avatar
  • 531
0 votes
2 answers
150 views

Please help me create the correct JNA objects for the C code. I have a dynamic library n2q_lib.dll . This library used its own configuration file and possibly other libraries that are located in the ...
mynameis's user avatar
1 vote
1 answer
624 views

This comes up periodically but none of the answers work for me or are complete enough for me understand what is going on. For example, How to load a native API with JNA. I can get the primary lib to ...
David Maffitt's user avatar
0 votes
0 answers
71 views

When I use the jna method, java calls c# with a constant error. java.lang.Error: Invalid memory access c# code is below (64 bit), namespace EwpDeleteBlank { public static class RemoveBlankPage ...
marlon's user avatar
  • 1
0 votes
2 answers
69 views

Is there some way to convert a BufferedImage to X11 Pixmap? It looks like JNA has com.sun.jna.platform.unix.X11.Pixmap but I can't find a way to convert anything to that format.
robbie.huffman's user avatar
17 votes
7 answers
32k views

I have installed Elasticsearch 6.x in my Debian 7 (wheezy). I tried to start with service elasticsearch start but its give me an error message root@debian:~# sudo -i service elasticsearch start [...
Gagantous's user avatar
  • 538
0 votes
0 answers
92 views

I have install OPENSSL in my computer, and there is a file named "libcrypto-3-x64.dll" in my "system32" folder. Can I use JNI or JNA to work with libcrypto-3-x64.dll ? I can use ...
Pining Doggie's user avatar
1 vote
1 answer
105 views

I'm making a small app to test the integration of a native library (linux and windows) into java code with jna. To do this I just call a single method into the library and check the result using ...
raoul volfoni's user avatar

1
2 3 4 5
41