public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
* Re: Using SourceNav for Java
@ 2001-02-28 14:32 Ian Roxborough
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Roxborough @ 2001-02-28 14:32 UTC (permalink / raw)
  To: Brad Cox, sourcenav

It's been a long time since I touched that code.  But IIRC,
I don't think there is a rule for .jar files (zipped up java or class
files, yeah?).  It probably won't be hard to add a rule providing
that there is no complexity involved in handling jar files.

My knowedge of java is pretty limited.

Ian.

On Tue, 27 Feb 2001, Brad Cox wrote:
> Date: Tue, 27 Feb 2001 16:53:28 -0500
> To: Mo DeJong <mdejong@redhat.com>, sourcenav@sources.redhat.com
> From: Brad Cox <bcox@virtualschool.edu>
> Subject: Using SourceNav for Java
> 
> 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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using SourceNav for Java
  2001-03-02 10:36           ` Brad Cox
@ 2001-03-02 11:35             ` Mo DeJong
  0 siblings, 0 replies; 8+ messages in thread
From: Mo DeJong @ 2001-03-02 11:35 UTC (permalink / raw)
  To: sourcenav

On Fri, 2 Mar 2001, Brad Cox wrote:

> At 6:04 PM -0700 03/01/2001, Tom Tromey wrote:
> >The original report doesn't mention what version of gcj is in use, or
> >the system, or anything, so I can't help too much.
> 
> I'm using the latest versions of everything: SN, GCC, GCJ, freshly 
> downloaded, on Redhat 7.0.

I assume you are talking about GCC 2.96 here. Saying "I have
the latest version" is meaningless that could be gcc 3.0
for all we know.

I would suggest that you try to recreate a test case
that demonstrates the build problem outside of SN.
This is trivial since SN writes out a snMakefile
before doing a build. This might be a gcj bug or
we might need to exec gcj with some other arguments
from inside SN. There is no way for us to know,
you will have to do some more detective work (aka Hacking)
to figure out what is wrong and how to fix it.

Mo DeJong
Red Hat Inc

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using SourceNav for Java
  2001-03-01 16:51         ` Tom Tromey
@ 2001-03-02 10:36           ` Brad Cox
  2001-03-02 11:35             ` Mo DeJong
  0 siblings, 1 reply; 8+ messages in thread
From: Brad Cox @ 2001-03-02 10:36 UTC (permalink / raw)
  To: D-Man, sourcenav

At 6:04 PM -0700 03/01/2001, Tom Tromey wrote:
>The original report doesn't mention what version of gcj is in use, or
>the system, or anything, so I can't help too much.

I'm using the latest versions of everything: SN, GCC, GCJ, freshly 
downloaded, on Redhat 7.0.
-- 
---
Dr. Brad Cox; bcox@superdistributed.com
Phone: 703 361 4751 Fax: 703 995 0422 Cellular: 703 919-9623
http://superdistributed.com: A new paradigm for a new millinneum
PGP Signature: E194 C6E5 92D8 B8FB 20E8  8667 929A 95A0 FCB6 7C62

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using SourceNav for Java
  2001-03-01 16:09       ` D-Man
@ 2001-03-01 16:51         ` Tom Tromey
  2001-03-02 10:36           ` Brad Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2001-03-01 16:51 UTC (permalink / raw)
  To: D-Man; +Cc: sourcenav

>> | >  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).

>> | I still don't see why it can't find stuff like java.io.* then.

gcj uses libgcj.so for linking, but when compiling your Java code it
needs to read libgcj.jar (or libgcj.zip for somewhat older versions of
gcj) too.  Think of the .jar file as the Java equivalent of C header
files...

>> Maybe you need to add -lgcj to the gcj command line?  This is what I
>> would do if ld failed to find some C/C++ symbols (in a C/C++ project).

This should be done automatically by gcj.  If this is the failure then
the odds are the libgcj.so isn't installed at all, or is installed
incorrectly.


The original report doesn't mention what version of gcj is in use, or
the system, or anything, so I can't help too much.  gcj-related
questions really belong on the `java@gcc.gnu.org' mailing list anyway.

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using SourceNav for Java
  2001-03-01 14:14     ` Brad Cox
@ 2001-03-01 16:09       ` D-Man
  2001-03-01 16:51         ` Tom Tromey
  0 siblings, 1 reply; 8+ messages in thread
From: D-Man @ 2001-03-01 16:09 UTC (permalink / raw)
  To: sourcenav

On Thu, Mar 01, 2001 at 05:15:45PM -0500, Brad Cox wrote:
| At 2:30 PM -0500 03/01/2001, D-Man wrote:
| >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.
| 
| Thanks... I'll look into that.
| 
| >  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).
| 
| I still don't see why it can't find stuff like java.io.* then.

Maybe you need to add -lgcj to the gcj command line?  This is what I
would do if ld failed to find some C/C++ symbols (in a C/C++ project).

-D

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using SourceNav for Java
  2001-03-01 11:31   ` D-Man
@ 2001-03-01 14:14     ` Brad Cox
  2001-03-01 16:09       ` D-Man
  0 siblings, 1 reply; 8+ messages in thread
From: Brad Cox @ 2001-03-01 14:14 UTC (permalink / raw)
  To: D-Man, sourcenav

At 2:30 PM -0500 03/01/2001, D-Man wrote:
>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.

Thanks... I'll look into that.

>  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).

I still don't see why it can't find stuff like java.io.* then.
-- 
---
Dr. Brad Cox; bcox@superdistributed.com
Phone: 703 361 4751 Fax: 703 995 0422 Cellular: 703 919-9623
http://superdistributed.com: A new paradigm for a new millinneum
PGP Signature: E194 C6E5 92D8 B8FB 20E8  8667 929A 95A0 FCB6 7C62

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Using SourceNav for Java
  2001-02-27 13:50 ` Using SourceNav for Java Brad Cox
@ 2001-03-01 11:31   ` D-Man
  2001-03-01 14:14     ` Brad Cox
  0 siblings, 1 reply; 8+ messages in thread
From: D-Man @ 2001-03-01 11:31 UTC (permalink / raw)
  To: sourcenav

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Using SourceNav for Java
  2001-02-27 13:41 source nnavigator on macintosh Mo DeJong
@ 2001-02-27 13:50 ` Brad Cox
  2001-03-01 11:31   ` D-Man
  0 siblings, 1 reply; 8+ messages in thread
From: Brad Cox @ 2001-02-27 13:50 UTC (permalink / raw)
  To: Mo DeJong, sourcenav

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.


At 1:41 PM -0800 02/27/2001, Mo DeJong wrote:
>On Tue, 27 Feb 2001, Christian Fleury wrote:
>
>>  Any project to port sorce nav on MacOS 9.1
>
>That is not going to happen. MacOS has
>no exec, so it would be really really
>hard to do properly.
>
>  > and/or MacOS X?
>
>That might happen, but there are no plans.
>
>Mo DeJong
>Red Hat Inc

-- 
---
Dr. Brad Cox; bcox@superdistributed.com
Phone: 703 361 4751 Fax: 703 995 0422 Cellular: 703 919-9623
http://superdistributed.com: A new paradigm for a new millinneum
PGP Signature: E194 C6E5 92D8 B8FB 20E8  8667 929A 95A0 FCB6 7C62

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-03-02 11:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-28 14:32 Using SourceNav for Java Ian Roxborough
  -- strict thread matches above, loose matches on Subject: below --
2001-02-27 13:41 source nnavigator on macintosh Mo DeJong
2001-02-27 13:50 ` Using SourceNav for Java Brad Cox
2001-03-01 11:31   ` D-Man
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

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).