News:

Play our  New Fibsboard Position of the Week --> perhaps give your comments/reasons thx..here's the link  http://www.fibsboard.com/position-of-the-week/

Main Menu

Look And Feel On Recent Mac Os X

Started by inim, November 19, 2005, 03:57:55 AM

Previous topic - Next topic

inim

Hi,

i installed JavaFibs 1.008 for a friend on a Mac OS X 10.3 (Panther) and started it from the command line. Here is the Java version:


java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode)


I got this exception:


Class Not Found
java.lang.ClassNotFoundException: com.apple.mrj.swing.MacLookAndFeel
       at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:219)
       at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1682)
       at javax.swing.UIManager.setLookAndFeel(UIManager.java:429)
       at z.a(z.java)
       at z.<init>(z.java)
       at JavaFIBS2001.main(JavaFIBS2001.java)

Class Not Found
java.lang.ClassNotFoundException: com.apple.mrj.swing.MacLookAndFeel
       at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:219)
       at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1682)
       at javax.swing.UIManager.setLookAndFeel(UIManager.java:429)
       at z.a(z.java)
       at z.<init>(z.java)
       at JavaFIBS2001.main(JavaFIBS2001.java)



As a work around, we started the program from the GUI (where it worked) and looked at the "look and feel". Both Windows and Mac were greyed out. We set the PLAF to "Metal" and voila, both start methods worked.

I', not a Mac expert and just wanted to record this, may be my fault actually. Anyone on Mac has seen similar problems?

inim
This space is available for rent by advertisers. Call 0900-INIMITE today, and see your sales skyrocketing in no time! New customers receive free Vl@9rå and a penis enlargement set as a bonus! We support banners, flash banners, and scrollers. Discrete handling by our HQ on the Dutch Antilles.

inim

#1
The error stayed after upgrading to JDK 1.4.2_09. But here is a hint i found on Apple Developer Network:

http://developer.apple.com/documentation/J.../TP40001901-SW1

QuoteIn Mac OS X, Swing uses apple.laf.AquaLookAndFeel as the default look and feel (LAF).

And a few lines later there is the notion of
Quote-Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel
to enable Metal PLAF. So i wonder if using -Dswing.defaultlaf=apple.laf.AquaLookAndFeel as a command line switch would do the trick to override Javafib's hardcoded Mac-PLAF com.apple.mrj.swing.MacLookAndFeel.

I think recent Mac OS X Javas may have changed the PLAF class, but i need help to verify it as I do not have access to a Mac at the moment.  Any help welcome.

inim
This space is available for rent by advertisers. Call 0900-INIMITE today, and see your sales skyrocketing in no time! New customers receive free Vl@9rå and a penis enlargement set as a bonus! We support banners, flash banners, and scrollers. Discrete handling by our HQ on the Dutch Antilles.

cthulhu

#2
I love when they change things in the code without keeping backward compatibility.

Probably an easy fix will make it work for both. Thanks for reporting it. And I just had a new version almost set up for release. Guess I should include this fix too first though.

And no, you won't be able to override my hardcoded plaf with that line. Sorry.

cthulhu

Fixed. And now I only need someone to test it to see if it really works.