public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
From: D-Man <dsh8290@rit.edu>
To: sourcenav@sources.redhat.com
Subject: Re: Using SourceNav for Java
Date: Thu, 01 Mar 2001 11:31:00 -0000	[thread overview]
Message-ID: <20010301143053.C24127@harmony.cs.rit.edu> (raw)
In-Reply-To: <p05010403b6c1d185b903@[192.168.1.2]>

On Tue, Feb 27, 2001 at 04:53:28PM -0500, Brad Cox wrote:
| I've subscribed to this list after trying everything else I could 
| think of to get Java compiling via SN and GCJ. Can't seem to make it 
| find the core java libraries (java.io.*). I've tried including the 
| .jars as files, as directories, by expanding the jars into 
| directories and including the files as files and as directories). 
| Nothing works.
| 
| How does SN regard jars anyway? As includes? As directories? As 
| files? As linker command line options?
| 
| Thanks! I'd really appreciate the help.
| 

I regularly use SN to compile a java project.  This particular project
has an ant build file (ant is similar to make but is simpler and only
works for Java stuff).  I have a .bat file which then executes bash
(from cygwin) to run a shell script that runs ant with the proper VM
options (ant is a java program).

How are you "including" your jar files?  They must be in the CLASSPATH
environment variable, or given to the JVM (java or javac) on the
command line with the -classpath option.  For example, my shell scrip
that runs ant :


# some variables to make the script less redundant
ANT_HOME="d:\\apps\\ant"
ANT_LIB="$ANT_HOME\\lib"
ANT_JAR="$ANT_LIB\\ant.jar;$ANT_LIB\\jaxp.jar;$ANT_LIB\\parser.jar;"


`cygpath --unix "$JAVA_HOME\\bin\\java"`        \
        -mx80m                                  \
        -classpath "${JAVA_HOME}\\lib\\tools.jar;${CLASSPATH};${ANT_JAR}"    \
        -Dant.home=$ANT_HOME                    \
        org.apache.tools.ant.Main $*




Oh, yeah, you said you were using gcj, not Sun's jdk.  I have used gcj
before, but not for anything very significant.  Check its commandline
options.  You probably need to include it with some sort of classpath
option.  If you are using gcj to compile to native, I don't know how
it handles jar files.  As for the standard libary stuff, it is
included in libgcj.so (a shared library file).  AFAIK the standard
library is implemented as C++.  It might be in Java at the source
level, and then compiled to C++ object code by gcj, but I've gotten
linker errors before that looked like C++ symbols.  (after the Java
parsing front-end gcj uses g++'s C++ backend for object files and
linking)

BTW, the jar file must be in the classpath, not the directory
the jar file is in.  

HTH,
-D

  reply	other threads:[~2001-03-01 11:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-27 13:39 source nnavigator on macintosh Christian Fleury
2001-02-27 13:41 ` Mo DeJong
2001-02-27 13:50   ` Using SourceNav for Java Brad Cox
2001-03-01 11:31     ` D-Man [this message]
2001-03-01 14:14       ` Brad Cox
2001-03-01 16:09         ` D-Man
2001-03-01 16:51           ` Tom Tromey
2001-03-02 10:36             ` Brad Cox
2001-03-02 11:35               ` Mo DeJong
2001-02-27 13:58 ` source nnavigator on macintosh Syd Polk
2001-02-28 14:32 Using SourceNav for Java Ian Roxborough

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010301143053.C24127@harmony.cs.rit.edu \
    --to=dsh8290@rit.edu \
    --cc=sourcenav@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).