December 01, 2008, 07:20:10 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Look into the LINK section. Please add your favorite backgammon links.
 
  Home   Forum   Chat links PLAY NOW! Help Search Calendar Members Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Look And Feel On Recent Mac Os X  (Read 1612 times)
0 Members and 1 Guest are viewing this topic.
inim
This space is available for rent by advertisers.
Beginner
**
Offline Offline

Posts: 155


This space is available for rent by advertisers


« on: November 19, 2005, 04:57:55 AM »

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:

Code:
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:

Code:
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
Logged

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.
FIBS Board backgammon forum
« on: November 19, 2005, 04:57:55 AM »



 Logged
inim
This space is available for rent by advertisers.
Beginner
**
Offline Offline

Posts: 155


This space is available for rent by advertisers


« Reply #1 on: November 23, 2005, 01:33:24 AM »

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

 
Quote
In Mac OS X, Swing uses
Code:
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
Code:
-Dswing.defaultlaf=apple.laf.AquaLookAndFeel
as a command line switch would do the trick to override Javafib's hardcoded Mac-PLAF
Code:
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
« Last Edit: November 23, 2005, 01:51:58 AM by inim » Logged

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
Moderator
Beginner
*
Offline Offline

Posts: 99


« Reply #2 on: November 24, 2005, 01:53:25 AM »

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.
« Last Edit: November 24, 2005, 02:07:42 AM by cthulhu » Logged
cthulhu
Moderator
Beginner
*
Offline Offline

Posts: 99


« Reply #3 on: November 24, 2005, 02:12:38 AM »

Fixed. And now I only need someone to test it to see if it really works.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  



Rent Games - Cheap Gas - Loans - Phoenix Pools
Terms & Conditions | Privacy policy
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!