* Recognizing gcj as default StandardVM (JRE System Library)
@ 2003-08-02 13:55 Mark Wielaard
2003-08-02 15:44 ` Jan Schulz
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mark Wielaard @ 2003-08-02 13:55 UTC (permalink / raw)
To: eclipse
Hi,
It took me some time to convince eclipse to recognize gcj/gij/libgcj as
standard vm. It is probably best to patch
org.eclipse.jdt.internal.launching.StandardVMType to better detect that
it is running as native binary. But for the moment I have just created a
/usr/bin/java executable which contains:
#!/bin/sh
/usr/bin/gij-ssa -Dsun.boot.class.path=/usr/share/java/libgcj-3.5-tree-ssa.jar $*
That way everything works out of the box for me.
(sun.boot.class.path is clearly not a documented standard system
property so Eclipse should really not use it.)
If there is a better way to do this, please let me know.
Cheers,
Mark
P.S. The mailinglist archives at http://sources.redhat.com/ml/eclipse/
don't seem to work.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Recognizing gcj as default StandardVM (JRE System Library)
2003-08-02 13:55 Recognizing gcj as default StandardVM (JRE System Library) Mark Wielaard
@ 2003-08-02 15:44 ` Jan Schulz
2003-08-02 16:55 ` Tom Tromey
2003-08-02 21:45 ` Mark Wielaard
2003-08-02 16:07 ` Tom Tromey
2003-08-08 16:08 ` Andrew Haley
2 siblings, 2 replies; 8+ messages in thread
From: Jan Schulz @ 2003-08-02 15:44 UTC (permalink / raw)
To: eclipse
Hallo Mark,
Just something about me: I'm the debian maintainer of the eclipse
packages and I taking this list and the binaries as something to learn
from :) I would really be happy if eclipse could be run with a free
VM. Unfortunatelly I don't have much experience with gcj, so please be
patient with me. But I will read up te required knowledge...
* Mark Wielaard wrote:
>It took me some time to convince eclipse to recognize gcj/gij/libgcj as
>standard vm.
Does this mean that eclipse will run with a (patched?) gcj as
'*/bin/java' (not native, but in the VM)?
[running natively]
What will happen with all the plugins? Are they still recognised when
eclipse is started as native binary? Are they still runable?
>That way everything works out of the box for me.
>(sun.boot.class.path is clearly not a documented standard system
>property so Eclipse should really not use it.)
File a bugreport :)
Jan
--
Jan Schulz jasc@gmx.net
"Wer nicht fragt, bleibt dumm."
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Recognizing gcj as default StandardVM (JRE System Library)
2003-08-02 13:55 Recognizing gcj as default StandardVM (JRE System Library) Mark Wielaard
2003-08-02 15:44 ` Jan Schulz
@ 2003-08-02 16:07 ` Tom Tromey
2003-08-08 16:08 ` Andrew Haley
2 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2003-08-02 16:07 UTC (permalink / raw)
To: Mark Wielaard; +Cc: eclipse
>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:
Mark> It took me some time to convince eclipse to recognize
Mark> gcj/gij/libgcj as standard vm. It is probably best to patch
Mark> org.eclipse.jdt.internal.launching.StandardVMType to better
Mark> detect that it is running as native binary.
Yeah, that's on my to-do list. BTW thanks for finding the location to
change, that will make it a little easier :-)
Mark> That way everything works out of the box for me.
Mark> (sun.boot.class.path is clearly not a documented standard system
Mark> property so Eclipse should really not use it.)
Time for another eclipse.org bug report.
Mark> P.S. The mailinglist archives at http://sources.redhat.com/ml/eclipse/
Mark> don't seem to work.
I'll fix this a bit later.
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Recognizing gcj as default StandardVM (JRE System Library)
2003-08-02 15:44 ` Jan Schulz
@ 2003-08-02 16:55 ` Tom Tromey
2003-08-02 21:54 ` Mark Wielaard
2003-08-02 21:45 ` Mark Wielaard
1 sibling, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2003-08-02 16:55 UTC (permalink / raw)
To: Jan Schulz; +Cc: eclipse
>>>>> "Jan" == Jan Schulz <jasc.usenet@gmx.de> writes:
>> It took me some time to convince eclipse to recognize gcj/gij/libgcj as
>> standard vm.
Jan> Does this mean that eclipse will run with a (patched?) gcj as
Jan> '*/bin/java' (not native, but in the VM)?
What Mark is talking about is using the JDT with gcj. Right now that
is not easy to set up.
Note that once you have it set up, it still isn't perfect. There is
no way to debug this setup with the JDT debugger. One idea to make a
gdb wrapper that can speak JDWP. I'm not sure if we're going to do
this or not.
Jan> [running natively]
Jan> What will happen with all the plugins? Are they still recognised when
Jan> eclipse is started as native binary? Are they still runable?
We compile all the plugins we can, but not all of them are compiled.
In some cases libgcj is missing a needed package. (And in some of
these cases we could remove a class or two and make it work -- e.g.,
sharing with the precompiled ant and tomcat is on our to-do list...)
So, we can still interpret the plugins that are not compiled.
One thing we'd like to do is modify the PDE to teach it about gcj.
Then it would be really easy to compile your own plugins. This would
probably speed up compilation as well, since right now we just stick
everything on the class path for each compilation -- ugly.
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Recognizing gcj as default StandardVM (JRE System Library)
2003-08-02 15:44 ` Jan Schulz
2003-08-02 16:55 ` Tom Tromey
@ 2003-08-02 21:45 ` Mark Wielaard
1 sibling, 0 replies; 8+ messages in thread
From: Mark Wielaard @ 2003-08-02 21:45 UTC (permalink / raw)
To: eclipse
Hi Jan,
On Sat, 2003-08-02 at 17:43, Jan Schulz wrote:
> Just something about me: I'm the debian maintainer of the eclipse
> packages and I taking this list and the binaries as something to learn
> from :) I would really be happy if eclipse could be run with a free
> VM. Unfortunatelly I don't have much experience with gcj, so please be
> patient with me. But I will read up te required knowledge...
No worries. Although gcj normally takes a "radically traditional"
approach to the language by just treating it as another thing to compile
to native code (like C, C++, Fortran, Mercury, etc.) it also comes with
gij, an interpreter for byte code. Although using gij doesn't give you
much of the advantages of normal natively compiled applications and
shared libraries produced with gcj. You can still play with it to see
what can be done in a way that might be more
> * Mark Wielaard wrote:
> >It took me some time to convince eclipse to recognize gcj/gij/libgcj as
> >standard vm.
>
> Does this mean that eclipse will run with a (patched?) gcj as
> '*/bin/java' (not native, but in the VM)?
With the just released RPMs I have been able to run the natively
compiled eclipse (eclipse plus plugins all compiled to native code). And
I have been able to run a traditional eclipse release (as downloaded
from eclipse.org) with just the gij interpreter that comes with those
RPMs. You can run such a traditional eclipse with the '-vm gij-ssa'
option. (Using the interpreter is clearly slower then using native code,
but I was surprized by how fast it still was.)
The /usr/bin/java script wrapper around gij is mostly for convenienve
since eclipse expects a java byte code interpreter (that is called
'java') to execute user created code. And it expects that java binary to
have the sun.boot.class.path system property to be set.
> [running natively]
> What will happen with all the plugins? Are they still recognised when
> eclipse is started as native binary? Are they still runable?
I don't have that much experience with Eclipse but it seemed that most
things worked out of the box.
Cheers,
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Recognizing gcj as default StandardVM (JRE System Library)
2003-08-02 16:55 ` Tom Tromey
@ 2003-08-02 21:54 ` Mark Wielaard
0 siblings, 0 replies; 8+ messages in thread
From: Mark Wielaard @ 2003-08-02 21:54 UTC (permalink / raw)
To: eclipse
Hi,
On Sat, 2003-08-02 at 18:48, Tom Tromey wrote:
>
> What Mark is talking about is using the JDT with gcj. Right now that
> is not easy to set up.
No, it took me a long time to figure out how to set it up. But once you
know that it expects a /usr/bin/java binary to be available and that
when running that binary on some byte code it can access the
system property sun.boot.class.path which should point to a jar or zip
file containing the core classes in byte code format then it is really
easy to setup:
- Install native eclipse (and the dependencies) from the RPMs you
provided.
- Create a /usr/bin/java shell script containing to following:
#!/bin/sh
gij-ssa -Dsun.boot.class.path=/usr/share/java/libgcj-3.5-tree-ssa.jar $*
And you are done!
Just start using the new project -> java wizard
and new file -> class wizard and you have your Hello World program
running in seconds.
Cheers,
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
* Recognizing gcj as default StandardVM (JRE System Library)
2003-08-02 13:55 Recognizing gcj as default StandardVM (JRE System Library) Mark Wielaard
2003-08-02 15:44 ` Jan Schulz
2003-08-02 16:07 ` Tom Tromey
@ 2003-08-08 16:08 ` Andrew Haley
2003-08-14 17:38 ` Tom Tromey
2 siblings, 1 reply; 8+ messages in thread
From: Andrew Haley @ 2003-08-08 16:08 UTC (permalink / raw)
To: Mark Wielaard; +Cc: eclipse
Mark Wielaard writes:
> Hi,
>
> It took me some time to convince eclipse to recognize gcj/gij/libgcj as
> standard vm. It is probably best to patch
> org.eclipse.jdt.internal.launching.StandardVMType to better detect that
> it is running as native binary. But for the moment I have just created a
> /usr/bin/java executable which contains:
>
> #!/bin/sh
> /usr/bin/gij-ssa -Dsun.boot.class.path=/usr/share/java/libgcj-3.5-tree-ssa.jar $*
That's rather ingenious. :-)
> That way everything works out of the box for me.
> (sun.boot.class.path is clearly not a documented standard system
> property so Eclipse should really not use it.)
Oh, I dunno. I found full docs for sun.boot.class.path on the
javasoft web site.
> If there is a better way to do this, please let me know.
2003-08-08 Andrew Haley <aph@redhat.com>
* launching/org/eclipse/jdt/internal/launching/StandardVMType.java
(fgCandidateJavaLocations): Add gij-ssa and gij.
Index: launching/org/eclipse/jdt/internal/launching/StandardVMType.java
===================================================================
RCS file: /usr/cygnus/eclipse-cvsroot/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java,v
retrieving revision 1.7
diff -c -2 -p -r1.7 StandardVMType.java
*** launching/org/eclipse/jdt/internal/launching/StandardVMType.java 16 Jun 2003 18:50:29 -0000 1.7
--- launching/org/eclipse/jdt/internal/launching/StandardVMType.java 8 Aug 2003 15:57:32 -0000
*************** public class StandardVMType extends Abst
*** 61,66 ****
"bin" + fgSeparator + "java.exe", //$NON-NLS-2$ //$NON-NLS-1$
"jre" + fgSeparator + "bin" + fgSeparator + "java", //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
! "jre" + fgSeparator + "bin" + fgSeparator + "java.exe"}; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
!
/**
* Starting in the specified VM install location, attempt to find the 'java' executable
--- 61,68 ----
"bin" + fgSeparator + "java.exe", //$NON-NLS-2$ //$NON-NLS-1$
"jre" + fgSeparator + "bin" + fgSeparator + "java", //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
! "jre" + fgSeparator + "bin" + fgSeparator + "java.exe", //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
! "bin" + fgSeparator + "gij-ssa", //$NON-NLS-2$ //$NON-NLS-1$
! "bin" + fgSeparator + "gij" //$NON-NLS-2$ //$NON-NLS-1$
! };
/**
* Starting in the specified VM install location, attempt to find the 'java' executable
2003-08-08 Andrew Haley <aph@redhat.com>
* Makefile.am (AM_CXXFLAGS): Define BOOT_CLASS_PATH.
* Makefile.in: Rebuild.
* java/lang/natRuntime.cc (insertSystemProperties): Add
"sun.boot.class.path".
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.311
diff -c -2 -p -w -r1.311 Makefile.am
*** Makefile.am 27 Jul 2003 19:04:41 -0000 1.311
--- Makefile.am 8 Aug 2003 15:49:40 -0000
*************** AM_CXXFLAGS = -fno-rtti -fnon-call-excep
*** 102,106 ****
-Wswitch-enum \
@LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \
! -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\""
if USING_GCC
AM_CFLAGS = @LIBGCJ_CFLAGS@ $(WARNINGS)
--- 102,107 ----
-Wswitch-enum \
@LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \
! -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" \
! -DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\""
if USING_GCC
AM_CFLAGS = @LIBGCJ_CFLAGS@ $(WARNINGS)
Index: java/lang/natRuntime.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natRuntime.cc,v
retrieving revision 1.38
diff -c -2 -p -w -r1.38 natRuntime.cc
*** java/lang/natRuntime.cc 25 Jul 2003 13:04:15 -0000 1.38
--- java/lang/natRuntime.cc 8 Aug 2003 15:49:40 -0000
*************** java::lang::Runtime::insertSystemPropert
*** 586,589 ****
--- 586,592 ----
sb->toString ());
}
+
+ // The path to libgcj's boot classes
+ SET ("sun.boot.class.path", BOOT_CLASS_PATH);
// The name used to invoke this process (argv[0] in C).
Andrew.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Recognizing gcj as default StandardVM (JRE System Library)
2003-08-08 16:08 ` Andrew Haley
@ 2003-08-14 17:38 ` Tom Tromey
0 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2003-08-14 17:38 UTC (permalink / raw)
To: Andrew Haley; +Cc: Mark Wielaard, eclipse
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> 2003-08-08 Andrew Haley <aph@redhat.com>
Andrew> * launching/org/eclipse/jdt/internal/launching/StandardVMType.java
Andrew> (fgCandidateJavaLocations): Add gij-ssa and gij.
BTW, this is the sort of patch we could put into an eclipse.org
bugzilla PR for eventual application to the upstream eclipse.
I wouldn't mind if PRs like this had a `CC: eclipse@sources.redhat.com'
so that we would automatically be notified of changes affecting us...
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-08-14 17:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-02 13:55 Recognizing gcj as default StandardVM (JRE System Library) Mark Wielaard
2003-08-02 15:44 ` Jan Schulz
2003-08-02 16:55 ` Tom Tromey
2003-08-02 21:54 ` Mark Wielaard
2003-08-02 21:45 ` Mark Wielaard
2003-08-02 16:07 ` Tom Tromey
2003-08-08 16:08 ` Andrew Haley
2003-08-14 17:38 ` Tom Tromey
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).