Questions tagged [native-methods]

110 questions
0
votes
0 answers

How to capture the child window programmatically

Creating application to automate UI actions (Record & Playback). In this, i can able to capture the application window successfully if its single window/form application. If there is a child window over the parent window, it always capture the child…
Prithiv
  • 362
  • 4
  • 15
0
votes
0 answers

Method origin in packed jar

I have two jars x and y. x is being used as dependency by y. x is generated by compiling swig generated java files. There is a native class A in x which should have method a() but absent, while it is present in y when unzipped. Is there a way I can…
Utkarsh Kumar
  • 49
  • 1
  • 6
0
votes
1 answer

Error trying to access native method

Am developing a BlackBerry app and I have a third party JAR file which i make it as library and i am extending it in my application. The problem is when I try to access to some method of that library, the simulator gives me the error…
0
votes
1 answer

Why NativeMethodAccessorImpl declare InvocationTargetException

NativeMethodAccessorImpl invoke method declare it can throws IllegalArgumentException or InvocationTargetException public Object invoke(Object obj, Object[] args) throws IllegalArgumentException, InvocationTargetException { // We can't…
user7294900
  • 47,183
  • 17
  • 74
  • 157
0
votes
1 answer

How to use a native .so with Glassfish 3.1

I am trying to build a web interface for an embedded device, that will display network statistics. I am using Glassfish 3.1 Application Server, and I would like to use jnetpcap to listen to network traffic. jnetpcap relies on the libpcap native…
0
votes
1 answer

How to use JNI in a Dynamic web project?

I've written a native method to access port. I am able to run the JNI in a simple Java project. However, when I try to run it in a web project, I'm getting an exception like this: Exception in thread "main" java.lang.UnsatisfiedLinkError:
Anand
  • 1
  • 2
0
votes
1 answer

Native methods and platform independency

Here's a comment extracted from source code of Java's public static native long currentTimeMillis() method of java.lang.System class. * Returns the current time in milliseconds. Note that * while the unit of time of the return value is a…
Beginner
  • 1,766
  • 10
  • 24
0
votes
2 answers

How do I locate the source of an Unmanaged exception?

I have a WinForms application in which I want to be able to provide an HTML editing feature. So I've translated Lutz Roeder's HTML Writer from C# into VB.NET, and converted it from a windows form into a Custom User Control, which is now hosted in…
ChrisA
  • 4,107
  • 5
  • 26
  • 41
0
votes
1 answer

Enums and constants, how does it all work?

I have been all over the internet for the last few days in search of the answer to my question, and with no luck. So, I am attempting to understand the role of constants in a program and how they are referenced in classes. I have been looking…
JMadelaine
  • 2,269
  • 1
  • 9
  • 15
0
votes
1 answer

How to use NativeMethods.GetUpdateRect on Mono on Lubuntu 16.04.1?

I'm trying to port a great Windows Forms program to Linux and get this error: System.EntryPointNotFoundException: GetUpdateRect at (wrapper managed-to-native) CDBurnerXP.Controls.NativeMethods:GetUpdateRectInternal …
JimH44
  • 395
  • 2
  • 12
0
votes
0 answers

Java native code and implementation of InetAddressImplFactory.isIPv6Supported()

In below inner class of java.net.InetAddress, there is a native method - isIPv6Supported(). Suppose, I am using Springs as application framework and deploying my application in Weblogic server, question is that whether this native method will be…
pjj
  • 1,679
  • 10
  • 28
0
votes
2 answers

Trying to load an application's icon(s) using LoadImage, but the function returns 0

I am trying to load an application's icon(s) using the LoadImage WinAPI function, but for some reason it always returns 0. I have read the documentation, but I cannot understand what I've done wrong. I get no exceptions except for when trying to…
Visual Vincent
  • 17,424
  • 5
  • 24
  • 66
0
votes
1 answer

Input Values for Nativemethods.GetSystemMetrics Function in .Net

This function appears to be a way to access all sorts of system values. For example nativemethods.GetSystemMetrics(4096) returns whether a session is remote or local. All I can find on the web are specific examples--does anyone know where I could…
Jeff
  • 7,466
  • 32
  • 92
  • 150
0
votes
1 answer

JNI UnsatisfiedLink Error

So I'm new to JNI and I'm following a simple hello word example but I keep getting error UnsatisfiedLinkError. What am I doing wrong? Here's my .h file: /* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class…
0
votes
0 answers

JNI: How to get class of jdoubleArray as a 'jclass' on the JNI/C++ side?

I wrote a native Java function that passes a 2D array of double. What is a "double [][]" on the Java side, becomes a "jobjectArray" on the JNI/C++ side. So I need to use GetObjectArrayElement() to access the elements of the "outer" array, and these…
MuldeR
  • 547
  • 1
  • 4
  • 15