Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Java CLASSPATH on SuSE

  Asked By: Joao    Date: Oct 13    Category: Java    Views: 2728
  

I just installed Java on SuSE and of course, the first thing I need to do is
setup the
CLASSPATH. Can anyone tell me a robust CLASSPATH assignment to catch
every directory I need?

beneath $JAVA_HOME there's...

./bin
./include
./lib
./usr
./jre
./jre/lib
./jre/bin
./jre/plugin

Should I really put them all in there?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Lily Brown     Answered On: Oct 13

no.

/etc/profile:

PATH="/usr/local/bin:/usr/bin:/bin:/sbin:/usr/X11R6/bin:/usr/games:/usr/local/j2\
sdk1.4.0_03/bin"


then you can run java, javac.

i never need to mess about with classpaths.

 
Answer #2    Answered By: Thomas Camaroon     Answered On: Feb 13

Using wildcards in java classpath

Wild cards were introduced from Java 6. Class path entries can contain the basename wildcard character *, which is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR. For ex. a classpath entry consisting simply of * expands to a list of all the jar files in the current directory.


java -cp "lib/*" %MAINCLASS%

More about Classpath

http://net-informations.com/java/basics/path.htm

Camaroon

 
Didn't find what you were looking for? Find more on Java CLASSPATH on SuSE Or get search suggestion and latest updates.




Tagged: