caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chan Ngo <chan.ngo2203@gmail.com>
To: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Invoking Java programs from an OCaml program
Date: Mon, 14 Dec 2015 18:25:51 +0100	[thread overview]
Message-ID: <8D722630-1CB1-413B-9F90-1F975FA5B64B@gmail.com> (raw)
In-Reply-To: <CAAPK4qARiq_ittwShNfRwXNJDtHGPVQLsvnFGRJP=o_mYfpmSw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]

Hi,

An alternative, if you want to do as follows:
- Compile Java program to an executable (not jar file)
- Call this executable and get the return values from it

So you can think about Unix module in OCaml, you can use the standard I/O to realize a communication channel between your OCaml code and the executable Java.
https://ocaml.github.io/ocamlunix/ocamlunix.html <https://ocaml.github.io/ocamlunix/ocamlunix.html>

Hope that helps,

Best,

---
Chan Ngo
INRIA,
(+33)02 99 84 72 84
chan.ngo@inria.fr <mailto:chan.ngo@inria.fr>
http://people.rennes.inria.fr/Chan.Ngo <http://people.rennes.inria.fr/Chan.Ngo>


> On Dec 14, 2015, at 5:40 PM, Soichi Sumi <s-sumi@ist.osaka-u.ac.jp> wrote:
> 
> I want to invoke Java programs and use their result
> from an OCaml program in my research.
> 
> I have tried OCaml-Java to realize the integration
> and succeeded to execute some example.However,
> it cannot invoke objects defined by me, as far as
> I read OCaml-Java document. I think it only realize
> seamless integration of Java standard library and OCaml.
> 
> Is there anyway to use Java Object which defined by me
> or to invoke jar file and use the result?
> 
> If you know another way to use the result produced by
> Java programs, I want to know the way too.
> 
> Any help appreciated.
> 
> --Soichi Sumi
> --OCaml-Java HP : www.ocamljava.org <http://www.ocamljava.org/>
> 
> =========================================
> Soichi Sumi
> Graduate School of Information Science and Technology
> Osaka University
> 1-5, Yamadaoka, Suita, Osaka, Japan
> Email: s-sumi@ist.osaka-u.ac.jp <mailto:s-sumi@ist.osaka-u.ac.jp>
> =========================================


[-- Attachment #2: Type: text/html, Size: 3470 bytes --]

  reply	other threads:[~2015-12-14 17:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 16:40 Soichi Sumi
2015-12-14 17:25 ` Chan Ngo [this message]
2015-12-15  5:21   ` Paul Pelzl
2015-12-16 13:29     ` Chan Ngo
2015-12-18 10:25       ` Seungcheol Jung
2015-12-18 22:55         ` Sebastien Ferre
2015-12-21  8:53         ` forum
2015-12-15  9:06 ` forum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8D722630-1CB1-413B-9F90-1F975FA5B64B@gmail.com \
    --to=chan.ngo2203@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).