View previous topic :: View next topic |
Author |
Message |
jarsofclay n00b


Joined: 30 May 2002 Posts: 7 Location: philippines
|
Posted: Thu May 30, 2002 2:37 am Post subject: java environment |
|
|
Hi all,
i installed ibm jdk1.3.1 and jre, and i followed the configuration of java manual here in gentoo, but i have an error in configuring the classpath (no java-gnome/java-gtk and log4j as in manual's example) so i manually set my java path to the java programs and its classpatht, there's no problem in compiling my simple application using javac, but when im about to execute its .class program using java, i got the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: simpleApp/class
-----------------------------------------
my $HOME/.bas_profile contains this path vars:
export JAVA_HOME=/opt/ibm-jdk-1.3.1
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib/rt.jar
export CLASSPATH=$CLASSPATH:.
--------------------------------------------
note: im in current directory.
any idea?
Thanks,
Mike _________________ For we have this treasure in Jars of Clay, to show that this all-surpassing power is from God and not from us - 2Cor4:7 |
|
Back to top |
|
 |
jarsofclay n00b


Joined: 30 May 2002 Posts: 7 Location: philippines
|
Posted: Thu May 30, 2002 8:20 am Post subject: |
|
|
well, my java environment is now working, thanks anyway
Mike _________________ For we have this treasure in Jars of Clay, to show that this all-surpassing power is from God and not from us - 2Cor4:7 |
|
Back to top |
|
 |
vekdet n00b

Joined: 04 Jun 2002 Posts: 2
|
Posted: Tue Jun 04, 2002 5:25 am Post subject: |
|
|
hi,
i've got the same problem,
know someone how to solve it?
or would you please post, how you solve it, jarsofclay?
till now i've read the java-how-to from gentoo. but i don't really know how to handle the problem.
-vekdet- |
|
Back to top |
|
 |
Cr0t l33t


Joined: 27 Apr 2002 Posts: 945 Location: USA
|
Posted: Tue Jun 04, 2002 6:14 am Post subject: |
|
|
I started posting the JAVA Problem a while ago and I still think that JAVA is broken. I had to set several VARs to get it working and it still doesn't work that great. _________________ cya |
|
Back to top |
|
 |
vekdet n00b

Joined: 04 Jun 2002 Posts: 2
|
Posted: Tue Jun 04, 2002 11:27 am Post subject: |
|
|
so what VAR's have you set?
i've just set the VAR's that are in /etc/env.d/java/20java
on my other linux-systems, i don't have to use other VAR's.
i followed the instructions on
http://www.gentoo.org/doc/java.html
but i can't really set the system-classpath, cause java-config doesn't find package.env or classpath.env in /usr/share/
i use sun-jdk-1.4.0 and it is installed into /opt/sun-jdk-1.4.0 but there is no package.env or classpath.env.
so i deceided to create a file classpaht.env in /usr/share/sun-jdk-1.4.0 thats points to /opt/sun-jdk-1.4.0/jre/lib/rt.jar (the classpath of java i use in other systems)
but this doesn't work.
what can i do to make java runable?
vekdet |
|
Back to top |
|
 |
Cr0t l33t


Joined: 27 Apr 2002 Posts: 945 Location: USA
|
Posted: Tue Jun 04, 2002 5:39 pm Post subject: |
|
|
Code: | export VERSION="Sun JDK 1.4.0"
export JAVA_HOME=/opt/sun-jdk-1.4.0
export CLASSPATH=/opt/sun-jdk-1.4.0/jre/lib/rt.jar
export JDK_HOME=/opt/sun-jdk-1.4.0
export JAVAC=${JAVA_HOME}/bin/javac
export ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
export ADDLDPATH="/opt/sun-jdk-1.4.0/jre/lib/"
export ENV_VARS="JAVA_HOME CLASSPATH JDK_HOME JAVAC ADDPATH ADDLDPATH" |
I put these line into /etc/profile but I have still problems running and compiling JAVA Code. _________________ cya |
|
Back to top |
|
 |
|