Re: cannot figure out how to use gcj of the gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hill0093 wrote:
When I run gcj --main=Program Program.class
in the directory where all the dependent classes are,
except the imports from the standard libraries,
it doesn’t seem to pick up the dependent classes.
But when I run
gcj --main=Program  Program.java
in the same directory,
it seems to pick up the dependent classes.
Does that seem right?


I don't want to analyze the righteousness of gcj, but I can confirm that you are seeing the expected behavior. If you want more than a single class linked, list them all.


Also I have another program that uses only imported classes
and that gives the same error
Java.Lang.UnsupportedOperationException
whether I use either of the above gcj commands, but it runs in Windows using the sun Java1.5 SDK
under JCreator LE.
The surprising thing to me is that gcj doesn’t tell
me where error came from, no line numbers, no clue.
What do I do?

As is documented here:

http://gcc.gnu.org/onlinedocs/gcj/libgcj-Runtime-Properties.html#libgcj-Runtime-Properties

You can set the gnu.gcj.runtime.NameFinder.use_addr2line system property to true and you might get line numbers.

If that does not produce the line numbers, the you are in the unfortunate situation that your libgcj has had the debugging information stripped out of it.

The source code to libgcj is available from the same place you got libgcj, so you can look at it and fix it if you desire.

If you cannot fix it, follow the other options I suggested in the other e-mail.


However, a consolation is that yet another simpler
program runs under both systems.
public class HelloJav { public static void main(String[] args) { System.out.println("HelloJav"); } }
No imports, no dependent classes.

Another thing that bothers me is that the gcc-java forum
seems to be dead.

I am not familiar with that forum. But mail sent to java@xxxxxxxxxxx will be answered in short order.

Does any one use Java?

I do.  So do many others.

I feel way out in left field.

I am sorry to hear that.

David Daney

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux