Questions tagged [native-code]

Machine code and assembly code is sometimes called native code when referring to platform-dependent parts of language features or libraries.

Machine code and assembly code is sometimes called native code when referring to platform-dependent parts of language features or libraries.

447 questions
8
votes
4 answers

Theoretically speaking , can I get the openJDK JIT , and compile my java code to native?

I just wonder how can I get rid of the java jre dependency and produce native code and deliver the compiled code as the application? So does it possible? P.S. I know about gcj compiler is it what its doing ?
user63898
  • 26,293
  • 71
  • 223
  • 438
8
votes
0 answers

Cannot load symbols created with Ngen for Native Image DLLs

I am investigating a crashing program but cannot load symbols for native image DLLs in Visual Studio 2013. The application is 32-bit and uses .NET 4.0.30319. I confirmed this by checking what version of clr.dll is loaded into process from the…
krtzer
  • 103
  • 7
7
votes
1 answer

Can swift code be used in Codename One native code instead of Objective-C

I need to insert native code in my Codename One app. I am a completely newbie in iOS programming so I need to learn Objective-C. However I read that Swift was the successor of Objective-C and I would feel more comfortable with Swift syntax. But I…
HelloWorld
  • 2,111
  • 13
  • 21
7
votes
1 answer

Why native wrapped functions in Dart are such heavyweight in comparison with "DEFINE NATIVE ENTRY" functions that are very lightweight?

I cannot understand: "Why this reassurance?". This is wrapper for custom native function from dart/runtime/vm/native_entry.cc: It intended for the Dart programmers that want write native extensions. void…
mezoni
  • 8,044
  • 4
  • 24
  • 42
7
votes
2 answers

How to create callbacks between android code and native code?

I have a requirement for creating call backs between native code ( c language code) and Android code . I wrote JNI functions for calling C code from the android like this JNI code here #include void initSocket(); #ifdef…
RajaReddy PolamReddy
  • 21,702
  • 18
  • 110
  • 161
7
votes
1 answer

Android NDK: How to override onBackPressed in NativeActivity without java?

My app is written entirely in C/C++ using NativeActivity, it has no Java code (based on "native-activity" NDK example). Pressing "back" button closes it (destroys activity), but I need other behaivor of this button because I have my own UI and menus…
Roman Shuvalov
  • 325
  • 2
  • 12
7
votes
2 answers

Multicore Java Program with Native Code

I am using a native C++ library inside a Java program. The Java program is written to make use of many-core systems, but it does not scale: the best speed is with around 6 cores, i.e., adding more cores slows it down. My tests show that the call to…
Mahdi
  • 1,646
  • 19
  • 30
7
votes
1 answer

Invalid indirect reference on NewObject call

OK, so I have the native code below. I'm trying to return an array of FilePermissionInfo from it, populated with some data returned by stat(). The problem is that I get the following error when NewObject is called the first time: 06-15…
Marcel N.
  • 13,120
  • 5
  • 43
  • 68
6
votes
1 answer

Relation between the NDK version and the Android version

Is there any relation (constraint/compatibility restriction) between the version of the NDK used to compile the native code and the Android version running on the device where the APK is installed? For example, I compile the native code with Android…
Traian
  • 2,646
  • 22
  • 32
6
votes
4 answers

How is the zero length array represented in memory?

The Java primitive objects are mapped to native primitives. So my question is how is a char value[] = new char[0]; is being represented? Does it depend on the gcc compiler implementation (of the native code)? Would that mean that all empty Java…
Jim
  • 17,102
  • 31
  • 115
  • 227
6
votes
2 answers

Do Java Atomics only require atomicity with respect to the VM

I was looking at the Java source code for the AtomicInteger class (found here) to see which atomic primitives are required to implement a JVM. I noticed they use the undocumented Unsafe API to implement their atomic integer operations and that the…
S E
  • 2,987
  • 3
  • 19
  • 32
6
votes
1 answer

Native Compilation for C# desktop apps

I have a C# desktop application. I would like to compile it into native code for speed execution and add a level of protection to my code. I notice that MS offers this for Window Apps? But not desktop Apps? I have also heard (somewhere) that I could…
Andrew Simpson
  • 6,145
  • 9
  • 59
  • 153
6
votes
3 answers

How to use OSGi fragments to contribute platform-dependent native code with the same filename?

I am using the JNotify project to listen to file system events. This depends on one native library per OS:processor architecture. For example, there's one library for Windows x86, one library for x86-64 etc. Monolithic bundle Originally, I had one…
Dan Gravell
  • 7,049
  • 4
  • 36
  • 55
5
votes
1 answer

Android Native NDK OpenGL ES: unimplemented API

I am working to implement an OpenGL ES 2.0 fully in C++ for Android. Currently our program runs without JNI or any java class in the project, using instead only NativeActivity. Focusing on the application rendering part itself, we got a simple…
ThreaderSlash
  • 1,273
  • 2
  • 26
  • 42
5
votes
2 answers

How does CreateStdDispatch know what method to invoke?

i'm faced with implementing an IDispatch interface. There are four methods, and fortunately 3 of them are easy: function TIEEventsSink.GetTypeInfoCount(...): HResult; { Result := E_NOTIMPL; } function TIEEventsSink.GetTypeInfo(...): HResult; { …
Ian Boyd
  • 220,884
  • 228
  • 805
  • 1,125
1 2
3
29 30