Hello all,

I have installed Sun JDK1.6.0 on my FreeBSD 6.2 laptop, and I cant seem to get 
the CLASSPATH set right in my .profile file. I really need to know the syntax 
of using the wildcard * to open folders in the CLASSPATH variable to cutdown on 
all the typing.

Can I do the following:

CLASSPATH=$CLASSPATH:./:/usr/local/jdk1.6.0/*.zip:/usr/local/jdk1.6.0/lib/*/*.jar;
    export CLASSPATH

PATH=/usr/local/jdk1.6.0/bin:/usr/local/jdk1.6.0/jre/bin:/sbin:/bin:/usr/sbin:/u
sr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:$HOME/bin; 
export PATH

JAVA_HOME=/usr/local/jdk1.6.0/jre; export JAVA_HOME

CLASSPATH=/usr/local/jdk1.6.0/:/usr/local/jdk1.6.0/lib/:/usr/local/jdk1.6.0/jre/
lib/:/usr/local/jdk1.6.0/lib/applet/:/usr/local/jdk1.6.0/lib/audio/:/usr/local/j
dk1.6.0/lib/cmm/:/usr/local/jdk1.6.0/lib/deploy/:/usr/local/jdk1.6.0/lib/desktop
/*:/usr/local/jdk1.6.0/lib/ext/*:/usr/local/jdk1.6.0/lib/fonts/*:/usr/local/jdk1
.6.0/lib/i386/*:/usr/local/jdk1.6.0/lib/im/*:/usr/local/jdk1.6.0/lib/images/*:/u
sr/local/jdk1.6.0/lib/locale/*:/usr/local/jdk1.6.0/lib/management/*:/usr/local/j
dk1.6.0/lib/oblique-fonts/*:/usr/local/jdk1.6.0/lib/security/*:/usr/local/jdk1.6
.0/lib/zi/*; 
export CLASSPATH

$ which java_vm
/usr/local/jdk1.6.0/jre/bin/java_vm

$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)

But when I test the libraries I get this:

$ jconsole
Exception in thread "main" java.lang.UnsatisfiedLinkError: 
/usr/local/jdk1.6.0/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open 
shared object file: No such file or directory


What did I do wrong when I set the CLASSPATH??

1/21/07 11:42:32 PM
 To:    [email protected]
 Cc:    
 Subject:       setting Java CLASSPATH
 Attachments:   
Message 7 of 31 
Hello all;

I have a problem understanding the syntax for setting the classpath variable. 
Why is the classpath set in this manner--->('CLASSPATH=$CLASSPATH:.'). Why is 
the variable-identifier $CLASSPATH used with the single ('.'), and should it 
include the 
following:/usr/local/jdk1.5.0_10/src.zip:/usr/local/jdk1.5.0_10/lib/dt.jar
:/usr/local/jdk1.5.0_10/lib/tools.jar:/usr/local/jdk1.5.0_10/lib/htmlconverter.jar
:/usr/local/jdk1.5.0_10/jre/lib/charsets.jar:/usr/local/jdk1.5.0_10/jre/lib/deploy.jar
:/usr/local/jdk1.5.0_10/jre/lib/rt.jar; export CLASSPATH

Thanks in advance for your help,

Cecil


 
_______________________________________________
CWE-LUG mailing list
[email protected]
http://www.cwelug.org/
http://www.cwelug.org/archives/
http://www.cwelug.org/mailinglist/

Reply via email to