From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28706 invoked by alias); 8 Aug 2003 16:08:00 -0000 Mailing-List: contact eclipse-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: eclipse-owner@sources.redhat.com Received: (qmail 28693 invoked from network); 8 Aug 2003 16:07:59 -0000 From: Andrew Haley MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16179.51902.472349.505360@cuddles.cambridge.redhat.com> Date: Fri, 08 Aug 2003 16:08:00 -0000 To: Mark Wielaard Cc: eclipse@sources.redhat.com Subject: Recognizing gcj as default StandardVM (JRE System Library) In-Reply-To: <1059832556.11511.53.camel@elsschot.wildebeest.org> References: <1059832556.11511.53.camel@elsschot.wildebeest.org> X-Mailer: VM 7.14 under Emacs 21.2.1 X-SW-Source: 2003-q3/txt/msg00046.txt.bz2 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 * 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 * 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.