This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: calling external classes method from kawa
- From: Damien MATTEI <Damien dot Mattei at unice dot fr>
- To: kawa at sourceware dot org
- Cc: Per Bothner <per at bothner dot com>
- Date: Fri, 3 Jun 2016 10:33:51 +0200
- Subject: Re: calling external classes method from kawa
- Authentication-results: sourceware.org; auth=none
- References: <201606021612 dot 24180 dot Damien dot Mattei at unice dot fr> <02f35a54-28ec-632a-496e-4ea1161ff0c8 at bothner dot com> <201606031018 dot 34393 dot Damien dot Mattei at unice dot fr>
Great !!! it works at runtime too:
Sidonie : DataBase : helloStatic : Hello !
i can start doing serious things in kawa now, not only with bigloo....
i needed to access java ODBC written routines already uses with bigloo scheme
now i will be able to reuse them in kawa too...
regards,
damien
Le Friday 03 June 2016 10:18:33 Damien MATTEI, vous avez écrit :
> thanks you,
>
> finally we got it:
> [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:/home/mattei/NetBeansProjects/Sidonie/build/web/WEB-INF/classes kawa.repl -C ResultatGeneralFKawa.scm
> (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
>
> no more warnings at compilation (will check the runtime later)
>
> for info -J option seems unrecognized on my kawa version (compiled from sources) but that's not a problem as it compiles the other way:
>
> [mattei@moita Jkawa]$ kawa -J-cp -J/home/mattei/NetBeansProjects/Sidonie/build/web/WEB-INF/classes -C ResultatGeneralFKawa.scm
> Unrecognized option: -J-cp
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
>
> Damien
>
> Le Thursday 02 June 2016 18:20:26 Per Bothner, vous avez écrit :
> >
> > On 06/02/2016 08:06 AM, Damien MATTEI wrote:
> >
> > > [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:~/NetBeansProjects/Sidonie/build/web/WEB-INF/classes kawa.repl -C ResultatGeneralFKawa.scm
> > > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
> > > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' in java.lang.Object
> > > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oca.DataBase
> > > [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:~/NetBeansProjects/Sidonie/build/web/WEB-INF/classes/eu/oca kawa.repl -C ResultatGeneralFKawa.scm
> > > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
> > > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' in java.lang.Object
> > > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oca.DataBase
> > > [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:~/NetBeansProjects/Sidonie/build/web/WEB-INF/classes/eu/oca/DataBase.class kawa.repl -C ResultatGeneralFKawa.scm
> > > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
> > > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' in java.lang.Object
> > > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oca.DataBase
> >
> > I don't believe '~' would work for the home directory.
> > It is normally expanded by the shell - but only when it's the first character in a "word".
> >
> > > [mattei@moita Jkawa]$ locate Sidonie.war
> > > /home/mattei/Sidonie.war
> > > /home/mattei/NetBeansProjects/Sidonie/dist/Sidonie.war
> > > /usr/local/apache-tomcat-8.0.27/webapps/Sidonie.war
> > > [mattei@moita Jkawa]$ java -cp /usr/local/share/java/kawa-2.1.jar:/home/mattei/NetBeansProjects/Sidonie/dist/Sidonie.war kawa.repl -C ResultatGeneralFKawa.scm
> > > (compiling ResultatGeneralFKawa.scm to eu.oca.kawafunct.ResultatGeneralFKawa)
> > > ResultatGeneralFKawa.scm:178:5: warning - no known slot 'helloStatic' in java.lang.Object
> > > ResultatGeneralFKawa.scm:178:5: warning - no declaration seen for eu.oca.DataBase
> >
> > I don't believe a 'war' file can be used as if it were a 'jar' file.
> > It has a special layout, where classes are in WEB-INF/classes, which the JVM doesn't know about.
> > For that to work, you have to get a non-empty result from
> >
> > jar tvf /home/mattei/NetBeansProjects/Sidonie/dist/Sidonie.war eu/oca/DataBase/helloStatic.class
> >
> > > any idea?
> >
> > Don't use '~' in paths.
> >
> > > if i can not do it in kawa, i will make it with bigloo as i have not this problem with it ,but i will keep trying again later...
> >
> > It's almost certainly not a Kawa bug.
> >
>
>
>
--
Damien.Mattei@unice.fr, Damien.Mattei@oca.eu, UNS / OCA / CNRS