CLASSPATH nightmare!!!

Hi

I'm, as you would, guess new to Java and I have two problems I would apprciate some help with.

1. I have a fresh instalation of JDK on my Redhat distro and it works perfectly untill I try to import the javax.* librarys. Now I know that most people seem to have a problem with setting their CLASSPATH correctly but believe me, I have tryied every possible option. Just to assure you here are some of the options tryied.

1. Setting CLASSPATH in the bashrc file through

export CLASSPATH=$CLASSPATH:/usr/jdk/jre/lib

2.Giving the classpath as a command when compiling through

javac -cp /usr/jdk/jre/lib NYCTax.java

and any other combination of the two (not that there are to may :).

But still I get thenoClassDefFoundError.

What ever I try when I check to se if I've succesfully included the javax library by typing $ java javax.swing.JFrame (for example). I get the same error message.

My second question is regarding trying to get the java VM going on mozilla. Ive tried loading the plugin libjavaplugin_oij.so into the Mozilla plugin folder. And I've tried adding the folder in which this plugin is placed to the classpath of the mozilla run file. But nothing seems to work. All I get is the frame with a pice of Jiggsawpuzzle and the prompt that the java-VM plugin is missing. What am I not doing correctley.

/Newbii

[1403 byte] By [BrainDr@ina] at [2007-10-2 21:05:01]
# 1
Did you add the "-cp" to the "java" command, as well as to the "javac" command?
MLRona at 2007-7-13 23:50:14 > top of Java-index,Java Essentials,New To Java...
# 2
Ayy I did Captain.....
BrainDr@ina at 2007-7-13 23:50:14 > top of Java-index,Java Essentials,New To Java...
# 3

I remember encountering a similar problem (from a while ago, things may have changed) on redhat. I believe you may be inadvertantly using kaffe. What are the results of

which java

>1. Setting CLASSPATH in the bashrc file through

>export CLASSPATH=$CLASSPATH:/usr/jdk/jre/lib

You should never have to import the core classes and this won't help anyway as there are no classes in that directory - they're in the rt.jar.

>Ive tried loading the plugin libjavaplugin_oij.so into the Mozilla plugin folder.

I've always used a symbolic link. And you have to restart it.

IanSchneidera at 2007-7-13 23:50:14 > top of Java-index,Java Essentials,New To Java...
# 4
I hope this link will be of help to you. http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/classpath.html
prashanthjanagamaa at 2007-7-13 23:50:14 > top of Java-index,Java Essentials,New To Java...