Yuva,

Consult JNI section in Java tutorial, the part of
calling Java from C: create JVM, find class, method,
call, release.

This can be done either by creating a flat wrapper
DLL over JNI and call with cd, or use the pcall approach
(addon or j602) and use JNI directly from J.

JNI is very similar to COM custom interface calling.
See general\pcall\progress.ijs for v-table based
COM calling.


--- Eric Iverson <[EMAIL PROTECTED]> wrote:

> Interesting. This is the opposite direction of what I had guessed. I don't 
> see off hand of any easy way to do this with the existing architectures. 
> There is a fairly general and easy way of loading and using classes 
> dynamically in a java application. This means that a cd (the way J calls 
> dlls) like facility to the j.jar front end. An interesting project but not 
> one we are likely to undertake unless it was funded.
> 
> For your immediate requirement it would be pretty easy to write a java 
> program that prodided access to the md5.jar and to call that program from J 
> with argument and results passing through files.
> 
> ----- Original Message ----- 
> From: "Yuvaraj Athur Raghuvir" <[EMAIL PROTECTED]>
> To: "Programming forum" <[email protected]>
> Sent: Thursday, July 12, 2007 8:17 PM
> Subject: Re: [Jprogramming] J and Java/Jar interop
> 
> 
> > Hello Eric,
> >
> > As an example, I want to use the md5 algorithm and md5.jar is available as 
> > a
> > utility library.
> >
> > So, how to pass the file contents to this library and consume the results 
> > in
> > J?
> >
> > Note that J is the orchestrator - everything is done in J script and for 
> > md5
> > implementation, the jar file is invoked.
> >
> > This requires a "spot" interop with a Java jar file in-memory. I was
> > wondering if I could write a J wrapper around the jar file and invoke it.
> > And that when I had this question.
> >
> > Just curious if this is available in general or not. Or if it is planned.
> >
> > Regards,
> > Yuva
> >
> >
> > On 7/12/07, Eric Iverson <[EMAIL PROTECTED]> wrote:
> >>
> >> Please describe a bit more what you are looking for. Do you want to use
> >> the
> >> J Engine (shared library) from your Java application? You can do this now
> >> by
> >> providing a java native wrapper around the dll. For j.jar this wrapper is
> >> jnative.dll (libjnative.so libjnative.dylib). Someone familiar with java
> >> native interfaces could easily build the required custom wrapper. At this
> >> time we have no plans to release more information, material, or examples
> >> in
> >> this area. We'd be happy to provide a custom J native interface as part 
> >> of
> >> a
> >> consulting project.
> >>
> >> ----- Original Message -----
> >> From: "Yuvaraj Athur Raghuvir" <[EMAIL PROTECTED]>
> >> To: "Programming forum" <[email protected]>
> >> Sent: Thursday, July 12, 2007 9:48 AM
> >> Subject: [Jprogramming] J and Java/Jar interop
> >>
> >>
> >> > Hello,
> >> >
> >> > I see many interesting integration with exe and dll. However, I am
> >> missing
> >> > the Java jar integrations. Is that possible?
> >> >
> >> > I am looking for an in-memory integration where J and Java can exchange
> >> > data.
> >> >
> >> > Of course spawning a process and working based on files is a 
> >> > possibility
> >> I
> >> > am already aware off.
> >> >
> >> > Regards,
> >> > Yuva
> >> > ----------------------------------------------------------------------
> >> > For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 



 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to