On Nov 27, 2012, at 10:01 PM, Daniel J Sebald wrote:
> On 11/27/2012 08:45 PM, Ben Abbott wrote:
>>
>> On Nov 27, 2012, at 6:14 PM, Daniel J Sebald wrote:
> [snip]
>>> Well, if you have Java on your system (which I assume is the case if you do any web browsing...type "java" or "javac" at a shell command line to confirm) then this should be a configuration issue (emphasis "should"). Java is supposed to be a very portable environment.
>>>
>>> Perhaps your definition of JAVA_HOME is wrong, but in my case I can set JAVA_HOME to any valid directory and "dlgtest(0)" functions properly.
>>>
>>> Dan
>>
>> MacOS X has Java. If I understand the problem correctly ,.. the problem is that for MacOS X, the GUI loop must be in the main program thread. What I'm not sure of is if the GUI loop can support both a Qt and Java (I suspect it can not, but don't know).
>
> Oh, you are running Octave as its GUI? I think several of us have been running with the --no-gui option.
>
> I just found out a little while ago that running these Java commands while inside the GUI doesn't work. Nothing happens or it crashes.
>
> Dan
No. The gui does not work yet on MacOS X.
The problem with Qt is not the same as the problem for Java. For the Qt GUI, the main thread includes the GUI loop (at least that is my understanding). The problem for the gui on MacOS X has to do with forking. I get the error below.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The problem with Java is that the GUI loop is not the main thread, but MacOS requires that the first thread spawned be the main()/GUI thread (I'm not an expert in how Cocoa works, and am only repeating what I've read here and else were).
There you obviously have a problem, you can't have Qt and Java running their own GUI loop in the main thread (at least not in a trivial way).
Michael.