This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: calling external classes method from kawa


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]