Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2000 08:45:12 -0500
From:      Dave Glowacki <dglo@ssec.wisc.edu>
To:        dskeehn@pacbell.net
Cc:        ports@FreeBSD.org
Subject:   Re: FreeBSD Port: mysql-jdbc-mm-1.2c 
Message-ID:  <200010231345.IAA20952@hyde.ssec.wisc.edu>
In-Reply-To: Your message of "Sun, 22 Oct 2000 19:04:25 PDT." <39F39CA9.7381D7E6@pacbell.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
Suzanne & Daniel Keehn wrote:
> I am trying to read your make file to figure out where the java classes 
> are located on a FreeBSD machine. My CLASSPATH is lacking. I don't have root
> access.
> Could you give me a clue of how to start. The admin who installed the
> package
> is of no help to me.
> FreeBSD has really great method for installing,but I need a little help.

Classes for FreeBSD ports are usually installed in
/usr/local/share/java/classes, *BUT* they're generally wrapped
in a .zip or .jar file, which is what needs to in your CLASSPATH.

My CLASSPATH looks like this (I've wrapped the lines for readability):

    /usr/local/jdk1.1.8/lib/classes.zip:\
    /usr/local/share/java/classes/mysql_comp.jar:\
    /usr/local/share/java/classes/jsdk.jar:\
    /usr/local/share/java/classes/collections.jar:\
    /usr/local/share/java/classes/ApacheJServ.jar:.

I've got the following chunk of code in my .profile to automatically
add all the files in /usr/local/share/java/classes to my CLASSPATH.
This code will work with sh, ksh, or bash.  It's a bit more general
than you probably need because it works on both my home FreeBSD
machine and my Solaris-based machine at work.

    # initialize path variables for FreeBSD port classes
    #
    if [ -z "$JCLASS" ]; then
      if [ -d "/usr/local/share/java/classes" ]; then
        JCLASS="/usr/local/share/java/classes"
      fi
      if [ -d "/usr/local/classes" ]; then
        JCLASS="/usr/local/classes"
      fi
    fi
    if [ ! -z "$JCLASS" ]; then
      if [ -d "$JCLASS" ]; then
        foundclass=
        for i in "$JCLASS"/*.jar "$JCLASS"/*.zip; do
          if [ -f "$i" ]; then
            CLASSPATH="$i:$CLASSPATH"
            foundclass=true
          fi
        done
        if [ -z "$foundclass" ]; then
          CLASSPATH="$JCLASS/classes:$CLASSPATH"
        fi
      fi
    fi

Hope some of this helps!


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010231345.IAA20952>