public inbox for eclipse@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Mark Wielaard <mark@klomp.org>
Cc: eclipse@sources.redhat.com
Subject: Recognizing gcj as default StandardVM (JRE System Library)
Date: Fri, 08 Aug 2003 16:08:00 -0000	[thread overview]
Message-ID: <16179.51902.472349.505360@cuddles.cambridge.redhat.com> (raw)
In-Reply-To: <1059832556.11511.53.camel@elsschot.wildebeest.org>

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.

  parent reply	other threads:[~2003-08-08 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-02 13:55 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 [this message]
2003-08-14 17:38   ` Tom Tromey

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=16179.51902.472349.505360@cuddles.cambridge.redhat.com \
    --to=aph@redhat.com \
    --cc=eclipse@sources.redhat.com \
    --cc=mark@klomp.org \
    /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).