JOGL, Java OpenGL bindings (graphics), is now hosted at http://jogamp.org/. In addition, JogAMP provides JOAL, Java OpenAL bindings (audio), and JOCL, Java OpenCL bindings (cpu/gpu).
The JogAmp project itself is a nice example of using JNA/JNI. The GlueGen...
viewJava Native Access (JNA) is the successor of the Java Native Interface (JNI). Both allow your java code to make use of an existing library, like a dll, or .so file that was written in C or C++.
The major advantage of JNA over JNI is requiring no boilerplate code.
The libraries that you use JNA for can be built in windows system dlls, to custom made dlls of large projects.
Despite how large java and the java community are, there are real cases (I have experienced one...
viewPHP and Java are generally used for vastly different purposes. However they share a fairly common syntax based on C++. If you use both, here are some differences to remember.
A simple PHP function might be
public function add_three_numbers($x, $y, $z)
{
$answer = $x + $y + $z;
print('foobar message'.$answer."\n");
return $answer;
}
...
$sum = $this->add_three_numbers(1, 2, 3);
while the Java equivalent is...
Let's say you have a table of inventory items for an electronics store. The primary key is an integer id, and there are no other constraints on the table. Other columns are
type, brand, model, price, etc
some sample rows are
id | item | brand | model | price
---------------------------------------------------
1 tv sharp acquos 1299
2 tv sony bravia...