[3134] in java-interest

home help back first fref pref prev next nref lref last post

Re: Calling Java from C

daemon@ATHENA.MIT.EDU (Elliotte Rusty Harold)
Wed Nov 1 11:46:42 1995

From: "Elliotte Rusty Harold" <Elliotte@blackstar.com>
To: BC Krishna <bc@futuretense.com>
Date:          Wed, 1 Nov 1995 10:06:14 EST
Reply-To: Elliotte@blackstar.com
Cc: java-interest@java.sun.com

> 
> Here's a really stupid question:
> 
> Is it possible to call Java from a C program?

Since Java is not as of yet a true compiled language, the only way to call Java code from C
is by using the system() call (or your OS's equivalent) to execute 
the Java interpreter with
appropriate command line arguments.

If you need to get output from the Java program you should probably 
write it to a file and periodically check the contents of the file 
until the program is done running.

--
Elliotte Rusty Harold    Black Star Publishing Co., Inc.
elliotte@blackstar.com   116 East 27th Street
elharo@escape.com        NY NY 10016
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post