-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/22/11 9:20 PM, Alexander Hansen wrote:
> On 11/22/11 6:30 PM, Alan Rakes wrote:
>
>> I recently installed the java package to my Octave 3.4.3
>> installation. It appears to fail whenever I try to create any
>> dialog windows while running Octave. Based on the error
>> messages, I believe it is related to how it is installed, so I
>> thought I would start with the fink list first.
>
>> I am currently running 10.6.8 on an Intel Core i7 MB Pro. Here
>> is the error message I get when I try to make a simple error
>> dialog from within Octave.
>
>> octave:1> errordlg('This is an error'); 2011-11-22 18:21:18.595
>> octave[92136:903] Apple AWT Java VM was loaded on first thread
>> -- can't start AWT. error: [java] java.lang.InternalError: Can't
>> start the AWT because Java was started on the first thread. Make
>> sure StartOnFirstThread is not specified in your application's
>> Info.plist or on the command line error: called from: error:
>> /sw/share/octave/3.4.3/packages/java-1.2.8/errordlg.m at line
>> 35, column 7 octave:1>
>
>
>> Any suggestions? I'll post this to the Octave-forge lists if
>> you are certain it is on their end.
>
>> Thanks, Alan
>
> There is issue in Apple's Java implementation, in which AWT can't
> be run in the main thread. There are a lot of Google hits about
> that. . I tried one of the workarounds that showed up online, and
> that changed the error (the line being run is the meat of
> errordlg.m):
>
> octave:2> ret = java_invoke ("org.octave.JDialogBox", "errordlg",
> 'message', 'title') 2011-11-22 20:46:17.676 octave[99584:1803]
> Apple AWT Java VM was loaded on first thread -- can't start AWT.
> error: [java] java.lang.InternalError: Can't start the AWT because
> Java was started on the first thread. Make sure StartOnFirstThread
> is not specified in your application's Info.plist or on the command
> line octave:2> ret = java_invoke ("org.octave.JDialogBox",
> "errordlg", 'message', 'title', '-Djava.awt.headless=true')
> #workaround error: [java] java.lang.NoSuchMethodException:
> errordlg
>
> $ jar tvf /sw/share/octave/3.4.3/packages/java-1.2.8/octave.jar 0
> Mon Oct 31 08:40:02 EDT 2011 META-INF/ 60 Mon Oct 31 08:40:02 EDT
> 2011 META-INF/MANIFEST.MF 13005 Mon Oct 31 08:39:58 EDT 2011
> org/octave/ClassHelper.class 1456 Mon Oct 31 08:39:58 EDT 2011
> org/octave/OctClassLoader.class 3406 Mon Oct 31 08:39:58 EDT 2011
> org/octave/Octave.class 1355 Mon Oct 31 08:39:58 EDT 2011
> org/octave/OctaveReference.class 5914 Mon Oct 31 08:40:00 EDT 2011
> org/octave/Matrix.class 12472 Mon Oct 31 08:40:00 EDT 2011
> org/octave/JDialogBox.class 2267 Mon Oct 31 08:40:00 EDT 2011
> org/octave/DlgListener.class 3593 Mon Oct 31 08:40:00 EDT 2011
> org/octave/TeXtranslator.class 321 Mon Oct 31 08:40:00 EDT 2011
> org/octave/TeXcode.class 1778 Wed May 04 05:11:30 EDT 2011
> org/octave/images/question.png 1205 Wed May 04 05:11:30 EDT 2011
> org/octave/images/error.png 1508 Wed May 04 05:11:30 EDT 2011
> org/octave/images/warning.png 963 Wed May 04 05:11:30 EDT 2011
> org/octave/images/information.png 1463 Wed May 04 05:11:30 EDT 2011
> org/octave/images/octave.png
>
> At this point, I don't really have any good ideas. I'm sure the
> .m files need to be patched, but there's not really much point in
> it if they won't do anything even if patched.
Following up: I figured _something_ out, at any rate.
The change in the error when I added '-Djava.awt.headless=true' was a
a bit of a red herring. The error message "error: [java]
java.lang.NoSuchMethodException: errordlg" is due to having the wrong
number of arguments, and it'll show up regardless of what one puts in.
- --
Alexander Hansen, Ph.D.
Fink User Liaison
http://finkakh.wordpress.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk7U9t8ACgkQB8UpO3rKjQ+u/ACfW+PdwgHnPl/2Gy7plMsymtix
4XIAnAiP3H7AK5UaGbaUZgx208ULEidD
=zE/Z
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Fink-beginners mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.beginners
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-beginners