LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-20-2002, 02:41 PM   #1
chansky
LQ Newbie
 
Registered: Aug 2002
Location: Manitoba, Canada
Distribution: SuSe
Posts: 10

Rep: Reputation: 0
Question Can't compile Java Swing Applet with javac


I'm having problems in compiling any Swing Applets with javac. I get the error message of "Package javax.swing not found in import." I'm currently using JDK2.

I can compile any applets using AWT but no luck with Swing Applets.

However, I don't get the same problem with Swing Applets in Windows 98 using the same JDK2.

Any ideas?

Don't tell me Linux is not as good as Windows.
 
Old 09-20-2002, 03:03 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
"Don't tell me Linux is not as good as Windows." why on earth should we say that? I call your comment a silly thing do you think there would be anyone here if we thought windows was better????

well the error message says it didn't find it in the import... did you import it? is it in your classpath?
 
Old 09-20-2002, 03:48 PM   #3
chansky
LQ Newbie
 
Registered: Aug 2002
Location: Manitoba, Canada
Distribution: SuSe
Posts: 10

Original Poster
Rep: Reputation: 0
hi Chris,

yes, i have "import javax.swing.*" in my source file. But I don't know how to check my classpath. Any advices?
 
Old 09-20-2002, 03:59 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
echo $CLASSPATH
 
Old 09-23-2002, 04:50 PM   #5
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
if u didn't set the classpath it should point to your j2sdk anyway i guess. is there a directory javax/swing? both should be
chmod 0755
u know what i mean?
i have no better idea by now...
cheers jens
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
use gcc or javac for java compile? jordanGSU Programming 22 10-15-2004 09:12 AM
A simple question:how to compile java applet in linux? nickhx Programming 5 08-11-2004 03:11 AM
Help php compile javac or java system environment variable antony_csf Programming 1 06-16-2004 01:12 PM
Help php exec, system function for compile javac or java antony_csf Programming 0 06-15-2004 01:45 AM
Cannot Get Swing to work in a Java Applet? Checkers Linux - Software 0 03-17-2003 03:23 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration