Re: Using POI to create XLS from a C app



Rob Y. wrote:
You can call C->Java via JNI.

It is a bit of work, but not that much worse than what you have
already coded.

Sounds interesting. What I don't get is that, presumably POI needs to
be instantiated and remain so for the duration of the process. If I
had a C app calling into POI via JNI, would that be possible? I guess
I'm assuming JNI needs to embed the Java interpreter in your C app (or
dynamically link to it), and that each Java call would encapsulate a
complete instance of the Java environment, which would have to clean
itself up upon completion of the JNI call.

Maybe it's more flexible than that? (actually, I always thought JNI
was to allow Java to call out to C, so maybe there's a lot more to it
than I know about)

JNI can also be used to call Java from C.

You can start the JVM and create objects that you can keep
over multiple invocations.

I can create a simple example if needed.

Arne
.



Relevant Pages

  • Re: Clear the Screen
    ... cannot be implemented in any standard way across platforms. ... Even the 'standard' C and C++ languages which, like Java, aim for platform ... do not implement such functionality. ... of a development commitment needs be made by using JNI. ...
    (comp.lang.java)
  • Re: Opinions on complexity
    ... Java because it is the language I know the best. ... The only thing I was asking for, was some advice on the TCP/IP stack implementation. ... and combined with the RFCs for the protocol will speed your development. ... But, if Java is your choice, you really only need to JNI the low level socket functions that give you access to the interface device, writing you protocol stack in pure java. ...
    (comp.lang.java.programmer)
  • Re: [Q] Making functional called in one thread run in the context of another?
    ... I spent some time looking into methods to create java wrappers, and this way seemed to be about the only method in use. ... I need the java wrapper to be able to create and modify C++ objects that are handled by the C++/MFC code (of course the java code doesn't interact with MFC objects directly). ... The problem comes when a callback needs to make a JNI call itself. ...
    (comp.lang.java.programmer)
  • Re: Java .net Integration
    ... As I know CORBA and J-Integra have huge overhead as ... The best way is to use pure JNI. ... developing tools to automate JNI code writing. ... (without java coding). ...
    (comp.lang.java)
  • Re: Using POI to create XLS from a C app
    ... had a C app calling into POI via JNI, ... I'm assuming JNI needs to embed the Java interpreter in your C app (or ...
    (comp.lang.java.programmer)