[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: bad class path



Kathy,

Here's what I typically have in my profile/environment settings on Linux:
snip------------------------------------
#add the JAVA_HOME environment variable
#JAVA_HOME=/usr/java/IBMJava2-131
#JAVA_HOME=/usr/java/IBMJava2-141
JAVA_HOME=/usr/java/j2sdk1.4.1
#JAVA_HOME=/usr/java/SUNj2sdk1.4.1_04
JDK_HOME=$JAVA_HOME
PATH="$PATH:$JAVA_HOME/bin"
PATH="$PATH:$JAVA_HOME/lib"
CLASSPATH="."

#add JSSE to the classpath
CLASSPATH="$CLASSPATH:$JAVA_HOME/lib/jre/lib/jsse.jar"

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME JDK_HOME
J2EE_HOME CLASSPATH CATALINA_HOME

snip-------------------------------
As you can see I can easily switch JDKs (probably not an issue on Solaris)
by commenting the correct one. Every other path/classpath setting 'rolls up'
to the JDK_HOME variable. Futher down I add jars to the classpath on an as
needed basis for jars such as JavaMail etc.

You might find that you variable is in the wrong case casuing problems.

If in doubt you can always consult the font of knowledge, also know as
http://groups.google.com

best of luck... Angus


-----Original Message-----
From: Kathy Z [mailto:kathy5592@yahoo.com]
Sent: Thursday, August 07, 2003 8:09 AM
To: ajug-members@ajug.org
Subject: bad class path


I need your guys help.
We installed j2se1.4.1_03 on SunOS 5.8.
I set
Java_home=/user/j2se
PATH=.:/usr/j2se/bin:/usr/j2se/bin:/bin:/lib:/usr/bin:/usr/local/bin:/usr/uc
b


When I compiled java class by using javac
pkgname/xxx.java, I got an error saying:
bad class file:
/usr/j2se/jre/lib/rt.jar(java/lang/Object.class) class
file has wrong version 48.0, should be 47.0.

Could you tell me what is wrong here? It seems JRE
does not work with jdk.....

Thanks for help in advance.

Kathy


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com