English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Problem with OCamljava
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-03-06 (11:25)
From: Till Crueger <crueger@i...>
Subject: Problem with OCamljava
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 =
       IdentVar _ -> failwith "Uninitialized Variable"
    |  IdentPtr p -> p

type primitive =
    |  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  


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)