wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Problem in javax.swing.* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Problem in javax.swing.*" Watch "Problem in javax.swing.*" New topic

Problem in javax.swing.*

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289

i installed java in linux i am new to Linux
i have a application in java which use javax.swing.*,
if i run that its giving ClassNotFoundExecption for JFrame.
i think its classpath problem
can you help how can i fix this.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

Which version of which Linux distribution are you using, and which version of Java are you using?

Swing has been a part of Java SE for a very long time (since Java 1.2), so it shouldn't be missing.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

GCJ, the default Java implementation for many Linux distributions, does not implement Swing.
Consult your distribution's documentation for instructions on how to install Sun Java.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289

red hat linux 9
which is working before that.
i reinstalled the Linux,jre1.6,j2se 1.5
now its giving this error
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

Red Hat Linux 9 is one of those distributions that uses GCJ as the default. Follow that link for some pointers on how to enable other Java installs.
By the way, Red Hat Linux 9 has been unsupported for four years now. You may want to upgrade to a supported operating system to keep current with bug and security updates.
subject: Problem in javax.swing.*
Similar Threads
Which Linux is best with Java
Java Problem on Linux
Red Hat fun! a.k.a.-Hey, Barry!
Does anyone think MS's .NET steals Sun's Java?
Setting path in linux