Second Java process starts up for certain operations, but not with Java Bridge?
Second Java process starts up for certain operations, but not with Java Bridge?
- Subject: Second Java process starts up for certain operations, but not with Java Bridge?
- From: Marc Liyanage <email@hidden>
- Date: Fri, 5 Sep 2003 20:11:14 +0200
I am using a Java library (Apache FOP) in my Obj-C app, via the Java
bridge.
This library creates PDF documents for me, it takes XML data (XSL-FO)
and creates the finished pages as a PDF byte stream. I am taking this
stream back via the Java bridge and then I create a PDF NSImage
instance which I can display. Works beautifully.
*But*, for some input documents it hangs in the Java code and blocks my
app. It is triggered when images are used in the document.
I compared it with a regular FOP run on the command line for the exact
same input code, i.e. not from within my Cocoa app. There I can see
that during processing, for a very brief time like 1-2 seconds, a
second Java process is launched, and this one even appears in the Dock
quickly and then disappears again.
I know that this is usually the case when some Java GUI classes are
loaded, because these seem to require a connection with the window
server. I had the same issue with Tomcat when loading JPEG coder
classes earlier on Mac OS X and also on Linux, where a running X11
server was required, even for non-GUI apps because of this issue.
Now, my problem is that this second process does *not* seem to get
launched when the FOP library is used from within my app via the
bridge.
Does anyone here know just what I would need to do in order to get this
to happen? I wouldn't mind the process popping up quickly, I just want
to get the identical behavior as on the command line. What is different
in the Java process when launched from within a Cocoa app?
Thanks...
-Marc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.