native

What is native implementation in Java

If we look at the Java Object class then we can find some of the methods like public native int hashCode(), protected native Object clone(), so my question is what are these natives and how do these methods work? ...

How to determine if Native JavaScript Object has a Property/Method?

I thought this would be as easy as: if(typeof(Array.push) == 'undefined'){ //not defined, prototype a version of the push method // Firefox never gets here, but IE/Safari/Chrome/etc. do, even though // the Array object has a push method! } And it does work fine in Firefox, but not in IE, Chrome, Safari, Opera, they return all pr...

Native C/C++ code on an Android platform

Hi, Does anybody know the answer to the following questions? Is it possible for device manufactures can develop native C++ applications on an Android platform? How can I develop my own native C++ application / library that has an upper layer Java front-end / API on an Android platform? Thanks, Munish ...

Cannot load symbols in GlowCode x64

This question might be too application specific to be out here on SO, but here goes. I am trying to profile a simple native c++ application using GlowCode-x64 6.2 . The problem is that no matter which settings I set in the "Options->Symbol server and search path" the symbols are never loaded. My .pdb files are all in the same folder a...

Separate DLL and native call in different plugin

I want to separate some DLLs from the associated native JNI classes. Plugins: In plugin A the dlls are placed and loaded when the plugin is loaded. In plugin B (depend on A) the JNI classes are placed which include the native method calls for the DLLs in A. At runtime i get a UnsatisfiedLinkError because the JNI class can't be foun...

Is there a best practice for accessing C++ native COM functions to interop from C#

For example, if I have 100 C++ methods (basically a native library) that interacts with a core window component. I want to basically make a wrapper for these c++ methods in C#, so all my new hire employees can use that instead of C++, etc. the C++ code is legacy and scares me, so I Want to deal with it just once. Is the approach here, ...

Which is the fastest way to access native code from Java?

Which is the fastest way of calling a native library from Java? The ones I know about are NativeCall - what we're currently using JNA - haven't used it, but looks reasonable JNI - looks horrendous to write, but we'll do it if we get the speed ...

How to get "native" look for WPF widgets on windows XP?

I have just started playing around with WPF. I've noticed that while some widgets automatically pick up the native look and feel (e.g, buttons, menus), some others don't (e.g., labels, panels and windows have white backgrounds). How do I make all widgets look normal by default in WPF? ...

Why am I getting this UnsatisfiedLinkError with native code?

I have a library called HelloWorld.so and a program HelloWorld.java with this content: class HelloWorld { private native void print(); public static void main(String[] args) { new HelloWorld().print(); } static { System.loadLibrary("HelloWorld"); } } Now when I try to run HelloWorld.java I g...

is "else if" faster than "switch() case" ?

Hello, I'm an ex Pascal guy,currently learning C#. My question is the following: Is the code below faster than making a switch? int a = 5; if (a == 1) { .... } else if(a == 2) { .... } else if(a == 3) { .... } else if(a == 4) { .... } else ...

What does 'native' mean in the context of two related technologies?

The scenario in question relates to the much-maligned Microsoft Jet database engine. The assertion was that the Data Access Objects (DAO) data access technology is 'native' to Jet, the implication being that creating an object via the DAO model is 'superior' to doing the same via SQL code executed from within in the Microsoft Access user...

How is native code handled by the JVM

Consider an case that I have to call C++ code from my Java Program. The C++ code creates thousands of Objects. Where are these dynamic objects stored ? I suspect in the JVM heap because the native code will be a part of the same process as the JVM. If yes, do the rules of Java Garbage collector thread apply on Objects of the C++ code ?...

Large initial memory footprint for native app

Hi, I've noticed that the native C++ application I'm working on has quite a large memory footprint (20MB) even before it enters any of my code. (I'm referring to the "private bytes" measure in Windows, which as I understand it is the most useful metric). I've placed a break point on the first line of the "main()" function and sure en...

Use windows static libraries from java code with minimal effort (prefereably using JNA)

I have to use some static windows library (*.lib) from java code, I can write C++ JNI wrappers, but I'd rather not do it (not that experienced in C++). What would be the easiest (least developement effort) way use it, performance is not important, since that code will just be fetching some data, that most probrably will be worked on on...

Difference between native and managed code?

For example, when looking at the GlowCode profiler website it says: "GlowCode 6.2 and x64 profile native, managed, and mixed C++, C#, .NET code" What do they mean? ...

Convert BITMAP to PNG using IImage interface on Windows Mobile

I've got a handle to a BITMAP structure (HBITMAP) in a Windows Mobile application -- I'd like to save the bitmap as a PNG file, using the IImage interface if possible. (There's no BMP file in this situation, the BITMAP is only in memory). It looks like I could use IImagingFactory's IImagingFactory::CreateImageEncoderToFile method to sav...

Connect PHP code to Java backend

I am implementing a website using PHP for the front end and a Java service as the back end. The two parts are as follows: PHP front end listens to http requests and interacts with the database. The Java back end run continuously and responds to calls from the front end. More specifically, the back end is a daemon that connects and ma...

Calling built-in java native methods

Is it possible to call the JVM's built-in native code, i.e. the code that various class in java.lang and java.io call? In other words, can you bypass the built-in java API to access various system-level calls such as file-system access? I know I could do this by building my own native code library and calling that via JNI, but it would b...

Complete Way to Compile Complex Native Applications to Android ARM

Hello! This is my first S/O question, please be gentle! I'd like to know more about porting C applications to native ARM for use on Android devices. I can make simple programs using the prebuild toolchain which comes with the source, but how can I use this toolchain with applications which are more than one file and require configure a...

Is it possible to share an enum declaration between C# and unmanaged C++?

Is there a way to share an enum definition between native (unmanaged) C++ and (managed) C#? I have the following enum used in completely unmanaged code: enum MyEnum { myVal1, myVal2 }; Our application sometimes uses a managed component. That C# component gets the enum item values as ints via a managed C++ interop dll (from the nativ...