*
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


JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Problem in javax.swing.*" Watch "Problem in javax.swing.*" New topic
Author

Problem in javax.swing.*

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289

Hi
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.


-Chiru
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14193
    
  20

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 8 API documentation
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8914
    
    8

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
Bartender

Joined: Oct 29, 2001
Posts: 8914
    
    8

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.
 
GeeCON Prague 2014
 
subject: Problem in javax.swing.*