Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/mwexler/public_html/tp/textpattern/lib/txplib_db.php on line 14
The Net Takeaway: Java Classpath issues...

OTHER PLACES OF INTEREST

Danny Flamberg's Blog
Danny has been marketing for a while, and his articles and work reflect great understanding of data driven marketing.

Eric Peterson the Demystifier
Eric gets metrics, analytics, interactive, and the real world. His advice is worth taking...

Geeking with Greg
Greg Linden created Amazon's recommendation system, so imagine what can write about...

Ned Batchelder's Blog
Ned just finds and writes interesting things. I don't know how he does it.

R at LoyaltyMatrix
Jim Porzak tells of his real-life use of R for marketing analysis.

 

HOW DID YOU GET HERE?

baidu.com
https:
https:
https:
baidu.com
https:
baidu.com
https:
baidu.com
https:

 

 

 

Java Classpath issues... · 05/06/2004 07:15 PM, Tech

One of the most confusing aspects of Java (both running and programming) is the annoying ClassPath.

This is like the executable search path in DOS/Win32 cmd.exe, but in Java, you have to add each .JAR file to the list!

The Java runtime command (and the javac compiler) allows the -classpath option to define a specific path, but that often means accidentally excluding any classpath you may have already defined. BTW, you can have multiple entries in the classpath, look out for Windows vs. Unix differences:
Unix: java -classpath dir1:dir2:dir3 …
Windows: java -classpath dir1;dir2;dir3 …

As K-Zone points out, “The reason for the difference is that Windows uses the colon (:) character as part of a filename, so it can’t be used as a filename separator. Naturally the directory separator character is different as well: forward slash (/) for Unix and backslash (\) for Windows.”

Ok, so how to “append” to the classpath for this run? Use the environment variable:
Unix: java -classpath $CLASSPATH:dir1:dir2 …
Windows: java -classpath %CLASSPATH%;dir1:dir2 …

A quickie is to use the “current dir” or ”.”:
SET CLASSPATH=.;%CLASSPATH%

BTW, to see the classpath in Judoscript:
usage { desc = 'Prints the classpath nicely.';}
for x in systemProperty('java.class.path').csv('${:}' )
{ println x;}

* * *

 

Name
E-mail
http://
Message
  Textile Help
Please note that your email will be obfuscated via entities, so its ok to put a real one if you feel like it...

Admin
powered by Textpattern 4.0.4 (r1956)