The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

noclassdefounderror

Posted by Sankar Mukherjee on December 12, 2001 at 10:51 AM

> When I run the following code I get a NoClassDefFoundError
> when UIManager.setLookAndFeel method is invoked.
> I'm using Visual J++ 6.0 and j2sdk1.4.0-beta3.

> Any ideas? I'm new to this and still struggling with
> the details. Thanks in advance.
> ------------------------------------------
> import javax.swing.*;
> public class Foo
> {
> public static void main(String[] args)
> {
> try
> {
> UIManager.setLookAndFeel
> (
> "javax.swing.plaf.metal.MetalLookAndFeel"
> );
> }
> catch (Exception exception)
> {
> System.out.println (exception);
> }
> }
> }


You have to give full java class definition of UIManager like
"com.sun.java.swing.plaf.metal.MetalLookAndFeel")





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us