Linux in General > Linux Development & Programming

java swing and awt !

(1/2) > >>

creator:
Hi !
I am using java awt package under linux (red hat 9.0), and running jdk1.4. The program compiles, but fails on run!!! The same program executes under windows :)
wht do i do?
And i have imported com.sun.java.swing for swing packages..my javac doesnt find swing package! Do i have to set classpaths? how do i do it to make a permanent change in the CLASSPATH ?

Thanks in advance :)
Vish!

Ricky:
Can you tell us that wht u have done to compile and run ur probrame. little description !!

creator:
Yeah...
I use javac ...the program runs under Windoz env..perfectly....
the same program...gives me a runtime error under linux..
it says ..GNU cannot load awtToolKit !
and gives me a host of other following errors!
what do I do ?
Please Let me know ...
Thank you!

worst yet ....programs with the swing package that run under windows wont compile under linux ...says
cannot find package javax.swing.*
and therefore
cannot resovle symbol JFrame ., JPanel...and so on...
how do i deal with this...
Thanks in advance :)

aaa:

--- Quote ---worst yet ....programs with the swing package that run under windows wont compile under linux ...says
cannot find package javax.swing.*
and therefore
cannot resovle symbol JFrame ., JPanel...and so on...
how do i deal with this...

--- End quote ---
did you set the CLASSPATH ?

sudipta_cht:
Go to the /etc/profile file
in it, just before the environment variables are exported, write
CLASSPATH="$CLASSPATH:/usr/java/j2sdk1.4.whatever/lib/tools.jar:."
Also, on the line that exports all these variables, add the CLASSPATH variable, too. That should work.

Navigation

[0] Message Index

[#] Next page

Go to full version