Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
178 views

ShObjIdl location for JNA usage

I'm trying to use shobjidl_core.h library to run code that changes the wallpaper of one specific monitor, specifically I need to run these two functions: GetMonitorDevicePathAt, SetWallpaper. Now, ...
Mamiglia's user avatar
  • 143
0 votes
1 answer
272 views

How to search for Windows dynamic link library that contains a windows api function

I'm using the JNA to interact with the Windows API. I want to use the LogonUserW function in the WinBase.h header. In order to load it using the JNA's Native.load, I need to know the dynamic link ...
José Alvarado Torre's user avatar
0 votes
1 answer
415 views

Why is my shared library (dll) not getting linked with the stdc++-6.dll properly?

So I was trying to build and load a dll into a Java application using the Jni interface, and basically I've used a few libraries consisting of the Win32 API. The build seems to be fine, everything ...
Animesh Sahu's user avatar
  • 8,046
0 votes
0 answers
213 views

Finding/Resolving dependent DLLs of a DLL using Java

I want to figure out which dependent DLLs are missing when loading a DLL fails. By loading a DLL using Java's System#loadLibrary, I only get a long negative exit code such as -1073741515 instead of a ...
BullyWiiPlaza's user avatar
0 votes
0 answers
170 views

How to execute remote COM dlls?

I am having a problem about running a COM dll remotely on windows PCs. I have a COM dll registered in all the client stations (windows) of my network and a .NET application hosted on a server in my ...
Antonio Pedro Ferreira's user avatar
1 vote
1 answer
2k views

Cant load DLL when copied to other computer

I have built Mecab.dll using Visual Studio 2017 Community Build tools and able to load in Java using JNI. When I copy the DLL to other computer and try to load in java, it does work. Dependency ...
Kiran Kyle's user avatar
0 votes
1 answer
381 views

Native.loadLibrary() returns null when project is a gradle dependency

Implemented a java driver project which exploits some .dll files with help of JNA. It works pretty well as a project when i build and run. However, I am not able to load .dll file when this driver ...
CanCode's user avatar
  • 154
0 votes
1 answer
116 views

Capstone Disassembler Java Bindings: "Invalid memory access"

I'm using the Java bindings of the Capstone disassembler. When I run the code example import capstone.Capstone; import org.junit.Test; public class DisassemblerTest { private static byte[] CODE =...
BullyWiiPlaza's user avatar
2 votes
1 answer
731 views

Identifying missing DLLs for OpenCV using Java Bindings

I'm using opencv_java400-x64.dll provided by the OpenCV release. It works well on my system (Windows 10 Pro). On other user's system's (usually Windows 7) some of them cannot load the DLL and receive ...
BullyWiiPlaza's user avatar
0 votes
0 answers
163 views

Dynamic Load Debug vs Release Native Libraries In Java with Debug Postfix

On windows, native DLLs are sometimes built such that the debug versions have a 'd' postfix on them: Mylibd.dll vs MyLib.dll (Boost does this as an example). How does one go about dynamically loading ...
Caleb's user avatar
  • 930
1 vote
1 answer
3k views

System.loadLibrary() error -- unable to specify a relative or absolute path

I have an issue with specifying the path to the x64 OpenCV DLL. I was using static{ System.loadLibrary(Core.NATIVE_LIBRARY_NAME); } to load the OpenCV x64 DLL and it worked fine in NetBeans (...
user2426320's user avatar
1 vote
1 answer
495 views

How to attach DLL file in maven based project

Can you tell me how to in elegant way attach dll file to my project based on maven ? When I put into system32 id does work (of course due to that system32 belongs to PATH). However, my aim is to ...
user avatar
0 votes
0 answers
2k views

Java application randomly crashes with DLL issues

I have a Java application which communicates with .Net application via com. Of late (since we have migrated from Windows Server 2003 to Windows Server 2012 R2) the Java application keeps on crashing ...
Nayan Sonthalia's user avatar
1 vote
0 answers
662 views

Modify java.library.path for wildfly 8.2.0

I have a set of dlls which need to be there in java.library.path for Wildfly 8.2.0. My problem is, there are some older versions of same DLLs present in system32 (Windows system folder). Whenever I ...
keenUser's user avatar
  • 1,319
1 vote
0 answers
591 views

Compile Linux shared object for use with JNA in Windows

I have a Java application running on Linux that talks through JNA to a library coded as a shared object written in C. I would like to be able to run this on Windows, so I've compiled the library under ...
Reticulated Spline's user avatar
0 votes
0 answers
282 views

how to deploy java application with native code from 64 bit windows to 32 bit windows?

i hope caps lock haters are now pleased and in paradise. as you can see, all letters are small. enjoy yourself. anyway, i have a question about java. i have application written in java which uses ...
SYOB SYOT's user avatar
  • 1,130
1 vote
2 answers
419 views

How does the JVM draw buttons and other controls under Windows?

While java programs are platform independent, the JVM itself is platform dependent. I am interested in knowing how Java draws the application GUI (buttons and text) on the screen. Under Windows, ...
Ibrahim's user avatar
  • 203
0 votes
0 answers
293 views

How can I add to the system 'Path' variable and have the new path used by a DLL immediately?

Here's the situation. I am attempting to load the JRI for R integration in Java. Here's what I know to make it work: -Make sure that the path to the JRI DLL is in the java.library.path (so java can ...
Simon Perkins's user avatar
0 votes
1 answer
570 views

Java program w/JNA+DLL requires "Run as Administrator" under C:\Program Files on Win10?

I have a Java 8 program which runs fine everywhere on my Windows 10 computer except when run from under C:\Program Files or C:\Program Files (x86) where it requires to be "Run as Adminstrator" to work....
simpleuser's user avatar
  • 1,672
1 vote
1 answer
303 views

Error with jGrasp and MinGW - Cannot compile - code 0xc000007b

I had a Windows 7 computer, where I wrote C programs with jGrasp. After switching to Windows 10 I installed jGrasp, MinGW (including g++), and Java. I set my PATH to the MinGW bin and the Java jre bin....
TechTyler's user avatar
3 votes
4 answers
4k views

Loading .DLL in Java

I want to call a .DLL method in Eclipse. Here is my code : class TestJNI1 { public native void LireNoVersion(); public void a() { System.loadLibrary("tttt.dll"); ...
0xmax's user avatar
  • 543
0 votes
1 answer
942 views

How to properly call this DLL with JNA? EXCEPTION_ACCESS_VIOLATION

I am trying to access the methods of a C DLL with Java and JNA from Windows. Sometimes everything goes fine, but other times I get an EXCEPTION_ACCESS_VIOLATION (it seems to be random when it works ...
Marcos Fernandez's user avatar
0 votes
0 answers
625 views

Not able to call DLL Method in Apache Spark

I've setup Apache Spark in windows system and have a java program which reads file.txt gets the data and then calls my first.dll file Now everytime I run it, I get an Exception Exception in thread "...
niyant's user avatar
  • 489
6 votes
0 answers
6k views

Sometimes (randomly) application crash with ntdll.dll as faulting module

We have homegrown java application that uses JIntegra.jar. The JAVA application also connects to a application running in .NET. The application works fine most of the time. But sometimes for some ...
Nayan Sonthalia's user avatar
0 votes
1 answer
875 views

Calling a getversion function from kernel32.dll on java

I'm trying to call a Getversion function from kernel32.dll on Java. I wish to run a Java app that runs that function. However, I'm finding the information available very confusing and it's getting me ...
Sonicbang's user avatar
0 votes
0 answers
382 views

Why am I only able to successfully load dynamic linking libraries using "-Djava.library.path=" in Linux but not Windows

I am using a library that requires that I load load dynamic linking libraries. My source code that uses these libraries is identical, the only difference is the operating system that I am using and ...
user avatar
0 votes
0 answers
97 views

Wrong result accessing device by JNA

I trying to access a device using JNA The first command return a statusCode 263 insteadof zero. I searched and found this code, means "INVALID_DEVICE_NAME". The device's manual say: The ...
patricK's user avatar
  • 1,095
0 votes
2 answers
2k views

the module "ntvinv.dll" was loaded but the entry-point DLLRegisterServer was not found

I have an application which was working fine till windows 2003 server. Recently we migrated to Windows server 2012 R2 64-bit. Since we migrated to 64-bit windows, we also migrated to 64-bit JAVA. The ...
Nayan Sonthalia's user avatar
13 votes
4 answers
17k views

JNI C++ DLL - 'UnsatisfiedLinkError: %1 is not a valid Win32 application'

I am trying to actually get JNI working before I dive in with my actual code, but after I compile a DLL from C++ and run my Java application I get: Exception in thread "main" java.lang....
condorcraft110 II's user avatar
4 votes
0 answers
512 views

Java VM EXCEPTION_ACCESS_VIOLATION WITH JNI?

If anyone can help me with my problem. when I try to run a function from the DLL by using the API java jni the JMV generates this exeception: # # An unexpected error has been detected by Java ...
Kamal's user avatar
  • 41
1 vote
0 answers
41 views

java.lang.UnsatisfiedLinkError from LocalService but not from NetworkService

I have a program in java I run through a service I wrote who uses JNI to start a JVM and launch the program. The program dynamically loads other jni dlls when it needs to. The problem is that if i ...
ItamarBe's user avatar
  • 490
0 votes
1 answer
1k views

java cannot load dll outside jre

Why it seems that is impossible to load a library (.dll) in Java, if it is not located in /jre/bin folder. It's crazy, but I have 2 dll's: aa.dll bb.dll, which depends on aa.dll If I copy these dll'...
Alexandru Popa's user avatar
0 votes
0 answers
1k views

Load 32 or 64 bit dll with Java 32bit on 64 bit Windows 7

I am attempting to load a compiled 32 bit or 64 bit DLL file with my Java code running under JRE 1.7 32bit on a Windows 7 64bit. The DLL is named RecorderWindowsIA32.dll (32 bit) or ...
slowmo's user avatar
  • 81
3 votes
2 answers
5k views

jacob - Can't co-create object

My environment is Java 7, on Windows 7 - 64 bit. So here's my requirement and procedures I followed I wanted to execute a library called test.dll from Java I first downloaded the latest version of ...
sanbhat's user avatar
  • 17.6k
2 votes
2 answers
839 views

Can anyone explain the following piece of anonymous/mischief code for windows?

Warning: DO NOT EXECUTE THIS CODE ON ANY MACHINE. IT COULD BE A MALICIOUS CODE Hi, I got a file on fb, from someone which obviously looked like a virus. So I downloaded it happy that I am not on ...
Dexters's user avatar
  • 2,485
0 votes
1 answer
200 views

How to invoke a dll

I know there are threads with same title already but the problem i am facing is different from them. I have an java application which is to view/print PDF files. Then i had to get an .exe for the jar ...
Vishal Thakur's user avatar
2 votes
1 answer
444 views

32-bit DLL causing UnsatisfiedLinkError

I am trying to create 32-bit and 64-bit versions of a library. Command: gcc -D_WIN32 -O2 -shared -I%JAVA_HOME%\include -I%JAVA_HOME%\include\win32 \ -Ic:\OpenSSL-Win32\include -Lc:\OpenSSL-Win32 -...
MeanwhileInHell's user avatar
0 votes
1 answer
4k views

WinScard Smart Card dll 32 bit 64 bit compatibility

I have to make use of the WinScard.dll library to access the smart card . I have a Java application that loads and makes use of this library to access the smart card . 32 Bit systems : Initially our ...
rockstar's user avatar
  • 3,538
5 votes
3 answers
2k views

Why do I get UnsatisfiedLinkError when calling a MinGW-compiled function (not loading the library) on Windows?

I'm making a simple JNI test app using Eclipse on Windows. My C++ compiler is MinGW 4.6.2. Java is throwing an UnsatisfiedLinkError when I try to invoke a function in my test DLL (the DLL itself loads ...
0xbe5077ed's user avatar
  • 4,725
5 votes
1 answer
33k views

jvm.dll missing error when launching application [closed]

I was trying to run CapeClear SOA Editor application on Windows 7 64bit but it would not start and produced an error saying that it couldn't load jvm.dll. I have 64 bit JDK version 7u13 installed. ...
Alex's user avatar
  • 9,419
2 votes
2 answers
5k views

How to build JNI .dll?

I have a java project in Eclipse that contains some JNI code. JNI code is cross platform - for Windows and Linux. How can I build a dll? Thanks.
Taras's user avatar
  • 2,566
3 votes
3 answers
5k views

Exiting from Native code in JNI kills Java application

I am calling a method of my native dll from JNI. It works fine but at one place in a my native code, I am calling exit(1) so that native code stops working but what happens is that it also causes to ...
awatan's user avatar
  • 1,210
1 vote
3 answers
1k views

How to launch java swing app which used precompled DLL from cmd?

When i'm using double click my java app starts perfectly. My path: PATH=...C:\Program Files\Java\jdk1.7.0_02\bin;... But when i'm running app from cmd: C:\Program Files\Java\jdk1.7.0_02\bin>java....
Dmitry Zagorulkin's user avatar
0 votes
1 answer
872 views

Loading multiple dependent libraries via JNI and DllMain

I have a JNI library that depends on a third party library. I can load and use the library by first doing a System.Load on the third party library then doing System.Load on my library. This works. I ...
msam's user avatar
  • 4,277
3 votes
0 answers
389 views

How to catch a stack trace from jvm.dll?

I've got a C++ console application that uses a third-party dll (jvm.dll, indirectly) that uses printf to print various error messages (Java stacktrace). I need to catch these stacktraces to a string ...
xarx's user avatar
  • 657
1 vote
1 answer
2k views

OSGI framework hangs when loading native library

Situation: Open source OSGI framework SMILA (http://www.eclipse.org/smila/) started as Windows Service with the aid of Apache commons-daemon (http://commons.apache.org/daemon/). Trying to load a DLL ...
user1245060's user avatar
1 vote
1 answer
2k views

Eclipse (Helios) fails to load DLL

My Java program fails with the following error on Windows. Exception in thread "main" java.lang.UnsatisfiedLinkError: no XSvcSocket in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown ...
Shyam's user avatar
  • 13
0 votes
2 answers
1k views

Use Dependency Walker To Verify C Function in DLL

I'm new to dependency walker and I'm trying to determine if my dll contains a C function that I'm trying to call from Java via JNI. When I select the dll that should contain the C function in ...
c12's user avatar
  • 9,817
0 votes
1 answer
277 views

How do I load a JVM when a DLL is loaded and free it when the DLL is unloaded

I'm developing a dll which invokes a jar to do most of the work through JNI. How can I create the DLL such that it creates the JVM only one time when the DLL is loaded and frees it when the DLL is ...
shawn's user avatar
  • 4,193
5 votes
2 answers
6k views

Where does SWT write dll files on windows?

I cannot find on the Internet where SWT tries to write the dll files. I have a computer where the jar does not run only because SWT cannot write DLLs. UPDATE 1 java.lang.reflect....
hurtledown's user avatar