Is there a better alternative for -cp/CLASSPATH ?

Timothy Madden terminatorul at gmail.com
Tue Dec 13 16:21:46 UTC 2011


Hello

Is there a way to launch java applications (classes), without having to 
know and to specify where the .class files are installed all the time ?

Currently I have to set CLASSPATH or use the -classpath option on the 
java command line every time I want to start a Java application (I hear 
it is recomanded I do not set CLASSPATH in advance, but instead set it, 
or use -cp,  upon every invocation of java; this way every Java 
application is invoked with its own CLASSPATH).

Is there no way I could type just:
	`java net.grinder.Grinder´
without having to specify the installation files/directory for The Grinder ?

Is there no such thing as a local registry/repository/catalog of 
installed java classes/jars, that the launcher could use ?

Thank you,
Timothy Madden




More information about the discuss mailing list