The Artima Developer Community
Sponsored Link

Java Buzz Forum
JARPATH

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
JARPATH Posted: May 6, 2004 9:07 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: JARPATH
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

The concept of the CLASSPATH has been with us since the beginning. The concept of the Jar file has also been with us for some time now, although I still remember the time when it was introduced in JDK 1.1.

I've always felt that there is something wrong with both concepts, but couldn't pin it down.

Today I had an A-ha moment: The way Java's going about putting classes into a CLASSPATH is just silly. We should be using something like a JARPATH, not CLASSPATH.

The Java class file is no longer the unit of distribution of modern Java systems. We deliver our systems as a set of Jar files. Yet we insist on maintaining a CLASSPATH.

This is the wrong level of granularity.

We sort of already have a solution for this problem in the context of web apps with its WEB-INF/lib directory. We also can use the JRE extension mechanism whereby you can put a jar file into the $JRE_HOME/lib/ext.

But can't we persuade Sun to introduce a JARPATH environment variable? So that instead of doing:

export CLASSPATH=$CLASSPATH:/opt/jboss-3.2.3/client/concurrent.jar:\
/opt/jboss-3.2.3/client/getopt.jar:\
/opt/jboss-3.2.3/client/gnu-regexp.jar:\
/opt/jboss-3.2.3/client/jacorb.jar:\
/opt/jboss-3.2.3/client/jbossall-client.jar:\
/opt/jboss-3.2.3/client/jboss-client.jar:\
/opt/jboss-3.2.3/client/jboss-common-client.jar:\
/opt/jboss-3.2.3/client/jbosscx-client.jar:\
/opt/jboss-3.2.3/client/jbossha-client.jar:\
/opt/jboss-3.2.3/client/jboss-iiop-client.jar:\
/opt/jboss-3.2.3/client/jboss-j2ee.jar:\
/opt/jboss-3.2.3/client/jboss-jaas.jar:\
/opt/jboss-3.2.3/client/jbossjmx-ant.jar:\
/opt/jboss-3.2.3/client/jboss-jsr77-client.jar:\
/opt/jboss-3.2.3/client/jbossmq-client.jar:\
/opt/jboss-3.2.3/client/jboss-net-client.jar:\
/opt/jboss-3.2.3/client/jbosssx-client.jar:\
/opt/jboss-3.2.3/client/jboss-system-client.jar:\
/opt/jboss-3.2.3/client/jboss-transaction-client.jar:\
/opt/jboss-3.2.3/client/jcert.jar:\
/opt/jboss-3.2.3/client/jmx-connector-client-factory.jar:\
/opt/jboss-3.2.3/client/jmx-ejb-connector-client.jar:\
/opt/jboss-3.2.3/client/jmx-invoker-adaptor-client.jar:\
/opt/jboss-3.2.3/client/jmx-rmi-connector-client.jar:\
/opt/jboss-3.2.3/client/jnet.jar:\
/opt/jboss-3.2.3/client/jnp-client.jar:\
/opt/jboss-3.2.3/client/jsse.jar:\
/opt/jboss-3.2.3/client/log4j.jar:\
/opt/jboss-3.2.3/client/xdoclet-module-jboss-net.jar

I can simply do:

export JARPATH=$JARPATH:/opt/jboss-3.2.3/client

Read: JARPATH

Topic: [Apr 26, 2004 23:16 PDT] 3 Links Previous Topic   Next Topic Topic: Feeling Groovy again

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use