caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Problem with OCamljava
@ 2008-03-06 11:25 Till Crueger
  2008-03-07 15:51 ` [Caml-list] " forum
  0 siblings, 1 reply; 2+ messages in thread
From: Till Crueger @ 2008-03-06 11:25 UTC (permalink / raw)
  To: caml-list

Hi,
I have a Problem compiling with OCamljava. I first tried compiling  
everything at once, giving all sources directly to ocamljava.jar, but I  
only got the error:
"error in apply: java.lang.reflect.InvocationTargetException"

Then I tried compiling the files each on its own to see where the error  
came from. Some of the files gave me the same error as above, some did  
not. The most simple of the files producing this error was this one:

type ident =
       IdentVar of string
    |  IdentPtr of int
    ;;

let get_ptr =
    function
       IdentVar _ -> failwith "Uninitialized Variable"
    |  IdentPtr p -> p
    ;;

type primitive =
       Inc
    |  Dec
    |  Put
    |  Get
    |  Print
    |  Zero
    |  Moveto of ident
    ;;

type expression =
       ExpSequence of expression list
    |  ExpPrim of primitive
    |  ExpLoop of (ident * expression)
    |  ExpDecl
    ;;

I don't really see what I am doing wrong here, so I hope one of you can  
shed some light on this. All works fine when using ocamlc/ocamlopt for  
compilation.

Thanks,
    Till

P.s. I am using the following JVM:

till@ReiToei:> java -version
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
till@ReiToei:> exit

-- 
"If everybody minded their own business," the Duchess said in a hoarse  
growl, "the world would go round a deal faster than it does."
   --Lewis Caroll (Alice in Wonderland)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-07 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-06 11:25 Problem with OCamljava Till Crueger
2008-03-07 15:51 ` [Caml-list] " forum

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).