Monday, July 9, 2012

Evil C


This is a collection of strange C (and some Java) constructs. It's probably best not to use them, but you should know why they work
.

The cast-to-bool operator

Node *left, *right;
int childCount() 

{

Calling C Code from Java


**Using native code with Java applications and the Sun JDK



Introduction


This article shows how to access C code (also called native code) from within Java code. The C code exists as a PowerPC shared library containing several Process Manager calls. The functions in the shared library are used to get and store process information. A Java front-end calls the shared library at specified intervals to retrieve and display the process information. Timing for these calls is accomplished using a thread. The front-end also includes a preferences dialog with a pseudo-custom control written in Java. This program runs as a Java application, not an applet.