[Top][All Lists]

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

Re: Using a workspace-based VM in Eclipse

From: Mark Wielaard
Subject: Re: Using a workspace-based VM in Eclipse
Date: Thu, 22 Dec 2005 23:54:20 +0100

Hi Tom,

On Thu, 2005-12-22 at 12:34 -0700, Tom Tromey wrote:
> Once that is done, check out the fakejdk project from
> :pserver:address@hidden:/cvs/rhug, module 'fakejdk'.
> (This ought to auto-build, but if not, apply the usual Clean hack.)
> This just makes a little project consisting of symlinks -- it is a
> huge hack.

One of the symlinks didn't work for me. Attached is a patch for the
tools.jar to try and find it in some other location. Generated by
eclipse of course :)

> Now, go to Window->Preferences->Java->Installed JREs and choose
> 'Add...' to add a new one.  I named mine "Cacao".  For the JRE home
> directory, choose $workspace/fakejdk.  Then turn off "Use default
> system libraries" and you can edit the Source attachment of the new
> JRE to point to the classpath directory in the workspace.

Strangely the attach source step didn't work. I always get:
Assertion failed; Path for IClasspathEntry must be absolute

> Once this is done you can pick this JRE for launchers, or to build
> other projects against.  This is nice because it means these projects
> don't have to necessarily depend on Classpath -- there is a layer of
> indirection, so you can build and run them against the system VM if
> you prefer to do that, without modifying the shared build setup.

Wow! That is really nice. It seems to work instantly. Edit the project
or edit classpath and on a rerun your changes are there :)


Index: build
RCS file: /cvs/rhug/fakejdk/build,v
retrieving revision 1.1
diff -u -r1.1 build
--- build       22 Dec 2005 19:01:09 -0000      1.1
+++ build       22 Dec 2005 22:51:40 -0000
@@ -38,7 +38,13 @@
 cd $top/lib
 # FIXME: tools.jar
 # We have to merge with java-gcj-compat.
-cp /usr/lib/jvm/java-1.4.2-gcj- tools.jar
+if test -f /usr/lib/jvm/java-1.4.2-gcj-; then
+  cp /usr/lib/jvm/java-1.4.2-gcj- tools.jar
+elif test -f /usr/lib/jvm/java-1.4.2-gcj-4.0-; then
+  cp /usr/lib/jvm/java-1.4.2-gcj-4.0- tools.jar
+  cp /usr/lib/jvm/java-*-gcj-*/lib/tools.jar tools.jar
 cd $top/jre/bin
 ln -s $classpath/install/bin/$vm java

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]