posted 19 years ago
You can do that, but it isn't really "calling" Java code. When you do system() in C, you are executing the Java code as a separate process.
If you really want to call Java code from C, within a single process, you can do it. You use a part of JNI (Java Native Interface) called the Invocation Interface. Using this, a C program can start up a JVM, then tell the JVM to load classes, run methods, retrieve data from Java objects etc.
Google for Java Native Interface and Java Invocation Interface.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.