From harmony-commits-return-833-apmail-incubator-harmony-commits-archive=incubator.apache.org@incubator.apache.org Mon Feb 06 15:51:38 2006 Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 55540 invoked from network); 6 Feb 2006 15:51:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Feb 2006 15:51:37 -0000 Received: (qmail 28771 invoked by uid 500); 6 Feb 2006 15:51:37 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 28727 invoked by uid 500); 6 Feb 2006 15:51:36 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 28716 invoked by uid 99); 6 Feb 2006 15:51:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 07:51:36 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 06 Feb 2006 07:51:33 -0800 Received: (qmail 55205 invoked by uid 65534); 6 Feb 2006 15:51:12 -0000 Message-ID: <20060206155112.55204.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r375302 [1/2] - in /incubator/harmony/standard/site: docs/ docs/documentation/ docs/images/ docs/subcomponents/classlibrary/ xdocs/ xdocs/documentation/ xdocs/images/ xdocs/subcomponents/classlibrary/ Date: Mon, 06 Feb 2006 15:51:09 -0000 To: harmony-commits@incubator.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: tellison Date: Mon Feb 6 07:51:07 2006 New Revision: 375302 URL: http://svn.apache.org/viewcvs?rev=375302&view=rev Log: Added some Eclipse-based development info. Added: incubator/harmony/standard/site/docs/documentation/dev_eclipse.html incubator/harmony/standard/site/docs/documentation/dev_eclipse_movie.html incubator/harmony/standard/site/docs/images/dev_eclipse.html incubator/harmony/standard/site/docs/images/dev_eclipse_runconf.jpg (with props) incubator/harmony/standard/site/docs/images/eclipse_movie.swf (with props) incubator/harmony/standard/site/docs/subcomponents/classlibrary/build_classlib.html incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse.html incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse_movie.html incubator/harmony/standard/site/xdocs/images/dev_eclipse_runconf.jpg (with props) incubator/harmony/standard/site/xdocs/images/eclipse_movie.swf (with props) incubator/harmony/standard/site/xdocs/subcomponents/classlibrary/build_classlib.xml - copied unchanged from r375285, incubator/harmony/standard/site/xdocs/documentation/build_classlib.xml incubator/harmony/standard/site/xdocs/subcomponents/classlibrary/dev_eclipse.xml incubator/harmony/standard/site/xdocs/subcomponents/classlibrary/dev_eclipse_movie.html Removed: incubator/harmony/standard/site/xdocs/documentation/build_classlib.xml Modified: incubator/harmony/standard/site/docs/documentation/documentation.html incubator/harmony/standard/site/docs/get-involved.html incubator/harmony/standard/site/docs/subcomponents/classlibrary/index.html incubator/harmony/standard/site/xdocs/documentation/documentation.xml incubator/harmony/standard/site/xdocs/get-involved.xml incubator/harmony/standard/site/xdocs/subcomponents/classlibrary/index.xml Added: incubator/harmony/standard/site/docs/documentation/dev_eclipse.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/documentation/dev_eclipse.html?rev=375302&view=auto ============================================================================== --- incubator/harmony/standard/site/docs/documentation/dev_eclipse.html (added) +++ incubator/harmony/standard/site/docs/documentation/dev_eclipse.html Mon Feb 6 07:51:07 2006 @@ -0,0 +1,447 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Apache Harmony - Apache Harmony development using Eclipse + + + + + + + + + +
+ + +
+ +Apache Harmony +
+
+ + Apache Harmony +
+ + + + + + + + + + + + +
+
+
+ + + + + + + + +

General

+ +

Community

+ +

Development

+ +

Subcomponents

+ +
+ + + + +
+ + Introduction + +
+
+

+ These instructions will help you set up Eclipse to develop Java code + in Apache Harmony. +

+

+ There are two sets of instructions -- the fast path + for people who are + already familiar with Eclipse and the source code layout in Harmony's + Subversion repository; and the + step-by-step guide + for people who want to follow the details of a set-up, and see a brief + development example. +

+

+ Both sets of instructions assume you satisfy the same Eclipse-based + development prerequsities. +

+ + + + +
+ + Am I eligible? + +
+
+

+ You may have heard or read about Harmony's strict rules for contributor's + eligibility. We take this seriously because a number of parties implement + Java, and we respect their rights to their property. If you have detailed + knowledge of another implementation of Java, and they have not explicitly + approved your participation in Harmony, please check whether we will be able + to accept your contribution by reading the + Apache Harmony contribution policy. +

+
+

+
+

+

+ + + + +
+ + Prerequisites for developing Apache Harmony class library code with Eclipse + +
+
+ +

+ To develop the class library Java code with Eclipse JDT you will need: +

    +
  1. Eclipse : version 3.2 integration build I20060119 or later, from + eclipse.org
  2. +
  3. Subclipse : Subversion plug-in from + tigris.org
  4. +
  5. a snapshot classlib build : from the + + download page. If you prefer to build a snapshot yourself the + instructions are here.
  6. +
  7. a compatible VM : obtain a VM as + described here capable + of running the class libary code, and install it in the same location as + the snapshot.
  8. +
+

+
+

+

+ + + + +
+ + Fast path - for experienced Eclipse developers + +
+
+ +

+ If you know your way around Eclipse JDT, then following these steps will + have you hacking Harmony Java code in no time at all! +

+ + + + +
+ + Configuring Eclipse + +
+
+

+ Ensure that you have the development pre-requisites + in place, then: +

    +
  1. Launch Eclipse with the VM argument "-Dpde.jreProfile=none" + (i.e. eclipse -vmargs -Dpde.jreProfile=none).
  2. +
  3. Configure the following settings in Window > Preferences... +
      +
    • Change the Java compiler settings +
        +
      1. In the Java > Compiler preferences ensure the + "Compiler compliance level" is set to + 1.4.
      2. +
      3. In the Java > Compiler > Building preferences, + open the "Build Path Problems" section + and change "Circular Dependencies" from + Error to Warning.
      4. +
    • +
    • Change the PDE settings +
        +
      1. In the Plug-in Development > Compilers preferences + change "Unresolved Dependencies" from + Error to Warning.
      2. +
      3. In the Plug-in Development > Target Platform + preferences, change the "Location:" box to be the + jre/lib/boot directory of the classlib snapshot.
      4. +
    • +
  4. +
  5. Create a SVN repository location to the Harmony classlib, using URL + https://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib
  6. +
+

+
+

+ + + + +
+ + Develop and test code + +
+
+

+ The Apache Harmony class library is structured to allow developers to work on individual + modules in the class library without having to load and compile the entire + project source tree. +

+

+ This is best illustrated by a worked example. In this example, assume you want to make + a change to the NIO module. This is how you would proceed: +

    +
  1. Go to the SVN repository view, open the Harmony URL and browse to + "trunk > modules". Select + "nio" and from the context menu select + Checkout..., and on the checkout dialog just + click "Finish"
  2. +
  3. In the resulting project in your workspace the implementation code + is in the source folder src/main/java and the unit tests + are in the source folder src/test/java.
  4. +
  5. Hack away! Developers are encouraged to produce JUnit tests for new + implementation code.
  6. +
  7. To test the code you need to set-up a JUnit Run Configuration for the + unit test. You can either run a single test case, or run the + AllTests suite for all tests in a package or module. + For example, to run the test suite + org.apache.harmony.tests.nio.AllTests set up a + run configuration with the following characteristics: +
      +
    • bootclasspath : the folder nio/bin/main, followed by + the Harmony JRE library.
    • +
    • classpath : the folder nio/bin/test, followed by the + JUNIT JAR file.
    • +
      + Java run configuration +
    • VM : the Harmony JRE as the launching VM.
    • +
    +
  8. +
  9. If everything looks good, go ahead and + contribute a patch.
  10. +
+

+
+

+
+

+

+ + + + +
+ + Step-by-step guide to Eclipse-based development + +
+
+ +

+ We have produced a brief webcast for those who want to see a step-by-step guide + to configuring Eclipse, and developing a patch to the classlibrary code. The webcast + starts assuming you have already installed the pre-requisities for Eclipse-based + development, and launched Eclipse with the following commandline: +

eclipse -vmargs -Dpde.jreProfile=none
+ We
pick up the story here... +

+
+

+

+
+
+
+
+ Copyright © 2003-2006, The Apache Software Foundation +
+
+ + + + + + + + + + + + + + + + + + + + + + + Added: incubator/harmony/standard/site/docs/documentation/dev_eclipse_movie.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/documentation/dev_eclipse_movie.html?rev=375302&view=auto ============================================================================== --- incubator/harmony/standard/site/docs/documentation/dev_eclipse_movie.html (added) +++ incubator/harmony/standard/site/docs/documentation/dev_eclipse_movie.html Mon Feb 6 07:51:07 2006 @@ -0,0 +1,71 @@ + + + + + + + + + + + +
+ + +
+ +Apache Harmony +
+
+ + Apache Harmony +
+ + +
+

+

+

Eclipse-based development : The Movie

+ + + + + + + + + + + +
+
+

+ After watching the movie return to the Eclipse-based development page. +

+ + Modified: incubator/harmony/standard/site/docs/documentation/documentation.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/documentation/documentation.html?rev=375302&r1=375301&r2=375302&view=diff ============================================================================== --- incubator/harmony/standard/site/docs/documentation/documentation.html (original) +++ incubator/harmony/standard/site/docs/documentation/documentation.html Mon Feb 6 07:51:07 2006 @@ -218,7 +218,7 @@ Building and Deploying the Apache Harmony Website
  • - Building the Classlibrary Code + Documentation for the Classlibrary Code
  • Modified: incubator/harmony/standard/site/docs/get-involved.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/get-involved.html?rev=375302&r1=375301&r2=375302&view=diff ============================================================================== --- incubator/harmony/standard/site/docs/get-involved.html (original) +++ incubator/harmony/standard/site/docs/get-involved.html Mon Feb 6 07:51:07 2006 @@ -243,7 +243,8 @@
    -

    + +

    One of the best ways to get involved in the Harmony project is to create patches or additions and contribute them. All contributions should be made via a new entry in our project Added: incubator/harmony/standard/site/docs/images/dev_eclipse.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/images/dev_eclipse.html?rev=375302&view=auto ============================================================================== --- incubator/harmony/standard/site/docs/images/dev_eclipse.html (added) +++ incubator/harmony/standard/site/docs/images/dev_eclipse.html Mon Feb 6 07:51:07 2006 @@ -0,0 +1,447 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Apache Harmony - Apache Harmony development using Eclipse + + + + + + + + + +
    + + +
    + +Apache Harmony +
    +
    + + Apache Harmony +
    + + + + + + + + + + + + +
    +
    +
    + + + + + + + + +

    General

    + +

    Community

    + +

    Development

    + +

    Subcomponents

    + +
    + + + + +
    + + Introduction + +
    +
    +

    + These instructions will help you set up Eclipse to develop Java code + in Apache Harmony. +

    +

    + There are two sets of instructions -- the fast path + for people who are + already familiar with Eclipse and the source code layout in Harmony's + Subversion repository; and the + step-by-step guide + for people who want to follow the details of a set-up, and see a brief + development example. +

    +

    + Both sets of instructions assume you satisfy the same Eclipse-based + development prerequsities. +

    + + + + +
    + + Am I eligible? + +
    +
    +

    + You may have heard or read about Harmony's strict rules for contributor's + eligibility. We take this seriously because a number of parties implement + Java, and we respect their rights to their property. If you have detailed + knowledge of another implementation of Java, and they have not explicitly + approved your participation in Harmony, please check whether we will be able + to accept your contribution by reading the + Apache Harmony contribution policy. +

    +
    +

    +
    +

    +

    + + + + +
    + + Prerequisites for developing Apache Harmony class library code with Eclipse + +
    +
    + +

    + To develop the class library Java code with Eclipse JDT you will need: +

      +
    1. Eclipse : version 3.2 integration build I20060119 or later, from + eclipse.org
    2. +
    3. Subclipse : Subversion plug-in from + tigris.org
    4. +
    5. a snapshot classlib build : from the + + download page. If you prefer to build a snapshot yourself the + instructions are here.
    6. +
    7. a compatible VM : obtain a VM as + described here capable + of running the class libary code, and install it in the same location as + the snapshot.
    8. +
    +

    +
    +

    +

    + + + + +
    + + Fast path - for experienced Eclipse developers + +
    +
    + +

    + If you know your way around Eclipse JDT, then following these steps will + have you hacking Harmony Java code in no time at all! +

    + + + + +
    + + Configuring Eclipse + +
    +
    +

    + Ensure that you have the development pre-requisites + in place, then: +

      +
    1. Launch Eclipse with the VM argument "-Dpde.jreProfile=none" + (i.e. eclipse -vmargs -Dpde.jreProfile=none).
    2. +
    3. Configure the following settings in Window > Preferences... +
        +
      • Change the Java compiler settings +
          +
        1. In the Java > Compiler preferences ensure the + "Compiler compliance level" is set to + 1.4.
        2. +
        3. In the Java > Compiler > Building preferences, + open the "Build Path Problems" section + and change "Circular Dependencies" from + Error to Warning.
        4. +
      • +
      • Change the PDE settings +
          +
        1. In the Plug-in Development > Compilers preferences + change "Unresolved Dependencies" from + Error to Warning.
        2. +
        3. In the Plug-in Development > Target Platform + preferences, change the "Location:" box to be the + jre/lib/boot directory of the classlib snapshot.
        4. +
      • +
    4. +
    5. Create a SVN repository location to the Harmony classlib, using URL + https://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib
    6. +
    +

    +
    +

    + + + + +
    + + Develop and test code + +
    +
    +

    + The Apache Harmony class library is structured to allow developers to work on individual + modules in the class library without having to load and compile the entire + project source tree. +

    +

    + This is best illustrated by a worked example. In this example, assume you want to make + a change to the NIO module. This is how you would proceed: +

      +
    1. Go to the SVN repository view, open the Harmony URL and browse to + "trunk > modules". Select + "nio" and from the context menu select + Checkout..., and on the checkout dialog just + click "Finish"
    2. +
    3. In the resulting project in your workspace the implementation code + is in the source folder src/main/java and the unit tests + are in the source folder src/test/java.
    4. +
    5. Hack away! Developers are encouraged to produce JUnit tests for new + implementation code.
    6. +
    7. To test the code you need to set-up a JUnit Run Configuration for the + unit test. You can either run a single test case, or run the + AllTests suite for all tests in a package or module. + For example, to run the test suite + org.apache.harmony.tests.nio.AllTests set up a + run configuration with the following characteristics: +
        +
      • bootclasspath : the folder nio/bin/main, followed by + the Harmony JRE library.
      • +
      • classpath : the folder nio/bin/test, followed by the + JUNIT JAR file.
      • +
        + Java run configuration +
      • VM : the Harmony JRE as the launching VM.
      • +
      +
    8. +
    9. If everything looks good, go ahead and + contribute a patch.
    10. +
    +

    +
    +

    +
    +

    +

    + + + + +
    + + Step-by-step guide to Eclipse-based development + +
    +
    + +

    + We have produced a brief webcast for those who want to see a step-by-step guide + to configuring Eclipse, and developing a patch to the classlibrary code. The webcast + starts assuming you have already installed the pre-requisities for Eclipse-based + development, and launched Eclipse with the following commandline: +

    eclipse -vmargs -Dpde.jreProfile=none
    + We
    pick up the story here... +

    +
    +

    +

    +
    +
    +
    +
    + Copyright © 2003-2006, The Apache Software Foundation +
    +
    + + + + + + + + + + + + + + + + + + + + + + + Added: incubator/harmony/standard/site/docs/images/dev_eclipse_runconf.jpg URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/images/dev_eclipse_runconf.jpg?rev=375302&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/standard/site/docs/images/dev_eclipse_runconf.jpg ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/standard/site/docs/images/eclipse_movie.swf URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/images/eclipse_movie.swf?rev=375302&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/standard/site/docs/images/eclipse_movie.swf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/standard/site/docs/subcomponents/classlibrary/build_classlib.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/subcomponents/classlibrary/build_classlib.html?rev=375302&view=auto ============================================================================== --- incubator/harmony/standard/site/docs/subcomponents/classlibrary/build_classlib.html (added) +++ incubator/harmony/standard/site/docs/subcomponents/classlibrary/build_classlib.html Mon Feb 6 07:51:07 2006 @@ -0,0 +1,410 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Apache Harmony - Building the Apache Harmony Classlib + + + + + + + + + +
    + + +
    + +Apache Harmony +
    +
    + + Apache Harmony +
    + + + + + + + + + + + + +
    +
    +
    + + + + + + + + +

    General

    + +

    Community

    + +

    Development

    + +

    Subcomponents

    + +
    + + + + +
    + + Building the Apache Harmony Class Library + +
    +
    +

    + The Harmony class library code is a subset of the Java(tm) SE 1.4.2 APIs currently + being developed in the + Apache Harmony project. This page describes how to build the class library code, + and includes links to pre-built versions of the code. +

    +

    + Standard Disclaimer: + Apache Harmony is an effort undergoing incubation at the Apache Software + Foundation (ASF). Incubation is required of all newly accepted projects until + a further review indicates that the infrastructure, communications, and + decision making process have stabilized in a manner consistent with other + successful ASF projects. While incubation status is not necessarily a + reflection of the completeness or stability of the code, it does indicate + that the project has yet to be fully endorsed by the ASF. +

    + + + + +
    + + Building from source + +
    +
    +

    + The Harmony class library code is available for Microsoft(tm) Windows(tm) and + Linux(tm) operating systems, on x86 processors only. +

    +

    + The following prerequisite tools must be available on the path in order to build + the Harmony classlib code from source. +

      +
    • All platforms require Subversion client, Apache Ant, Java 1.4.2 JDK + (i.e. including javac) in addition +
        +
      • Windows platforms : Microsoft Visual C++, and nmake.
      • +
      • Linux platforms : Gnu gcc.
      • +
      +
    • +
    +

    +

    + You can build the latest version of the class library code in three simple steps: +

      +
    1. Download classlib source from Harmony subversion repository +
      svn checkout -r HEAD https://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk Harmony
      +
    2. +
    3. Change to main make directory, and run the default ant script target +
      cd Harmony/make
      +ant
      +
    4. +
    5. Get a VM suitable for running the class library + code, and + expand it over the top of the Harmony directory (so that the 'jre' + directories line-up) +
      unzip <path_to_vm_zip> -d ../.. (on Windows)
      +
      tar xzf <path_to_vm_tarball> --directory ../.. (on Linux)
      +
    6. +
    +

    +

    + Now you are ready to run some Java applications! +

    +
    +

    + + + + +
    + + Using pre-built binaries + +
    +
    +

    + Pre-built binaries are available as a convenience for people who don't + have ready access to the prerequisite tools. +

    +

    + These are snapshot builds, not official releases of the project. + Snapshots are builds of the repository at a given revision. The file + name of each snapshot build indicates the revision of the code repository, + and the platform on which it was built. +

    +

    + You can use a pre-built binaries in three easy steps: +

      +
    1. Obtain a pre-built class library snapshot for your platform from the + + Harmony snapshot site.
    2. +
    3. Obtain a compatible virtual machine and + put it into the same directory as the class library code.
    4. +
    5. Simply expand the classlib archive and the VM archive from the + same directory. They should create a subdirectory called "Harmony" + with files from each archive overlaid (so that the + 'Harmony/deploy/jre'-s line-up).
    6. + On Windows: +
      unzip <path_to_classlib_zip> (on Windows)
      +unzip <path_to_vm_zip>
      + On Linux: +
      tar xzf <path_to_classlib_tarball> (on Linux)
      +tar xzf <path_to_vm_tarball>
      +
    +

    +

    + Now you are ready to run some Java applications! +

    +
    +

    + + + + +
    + + Obtaining a compatible VM + +
    +
    + +

    + The Harmony class library code interfaces to a VM through a virtual machine interface + defined in the Harmony project. +

    +

    + There is a VM that implements this interface available from the + + IBM DeveloperWorks site. + The IBM VM is not open source (although the VM interface itself is). +

    +

    + Once you have obtained the IBM VM you should have one of the following files: +

      +
    • on Windows "Harmony-vme-win.IA32-v1.zip"
    • +
    • on Linux "Harmony-vme-linux.IA32-v1.tar.gz"
    • +
    +

    +
    +

    + + + + +
    + + Running Java applications + +
    +
    + +

    + Ensure that the JAVA_HOME environment variable is unset, or pointing + to the Harmony/deploy/jre directory. +

    +

    + Run Java applications as usual, using the launcher in Harmony/deploy/jre/bin: +

    > jre\bin\java -showversion -jar helloworld.jar
    +java version 1.4.2 (subset)
    +(c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable.
    +Hello world!
    +
    +

    +
    +

    +
    +

    +

    +
    +
    +
    +
    + Copyright © 2003-2006, The Apache Software Foundation +
    +
    + + + + + + + + + + + + + + + + + + + + + + + Added: incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse.html?rev=375302&view=auto ============================================================================== --- incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse.html (added) +++ incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse.html Mon Feb 6 07:51:07 2006 @@ -0,0 +1,447 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Apache Harmony - Apache Harmony development using Eclipse + + + + + + + + + +
    + + +
    + +Apache Harmony +
    +
    + + Apache Harmony +
    + + + + + + + + + + + + +
    +
    +
    + + + + + + + + +

    General

    + +

    Community

    + +

    Development

    + +

    Subcomponents

    + +
    + + + + +
    + + Introduction + +
    +
    +

    + These instructions will help you set up Eclipse to develop Java code + in Apache Harmony. +

    +

    + There are two sets of instructions -- the fast path + for people who are + already familiar with Eclipse and the source code layout in Harmony's + Subversion repository; and the + step-by-step guide + for people who want to follow the details of a set-up, and see a brief + development example. +

    +

    + Both sets of instructions assume you satisfy the same Eclipse-based + development prerequsities. +

    + + + + +
    + + Am I eligible? + +
    +
    +

    + You may have heard or read about Harmony's strict rules for contributor's + eligibility. We take this seriously because a number of parties implement + Java, and we respect their rights to their property. If you have detailed + knowledge of another implementation of Java, and they have not explicitly + approved your participation in Harmony, please check whether we will be able + to accept your contribution by reading the + Apache Harmony contribution policy. +

    +
    +

    +
    +

    +

    + + + + +
    + + Prerequisites for developing Apache Harmony class library code with Eclipse + +
    +
    + +

    + To develop the class library Java code with Eclipse JDT you will need: +

      +
    1. Eclipse : version 3.2 integration build I20060119 or later, from + eclipse.org
    2. +
    3. Subclipse : Subversion plug-in from + tigris.org
    4. +
    5. a snapshot classlib build : from the + + download page. If you prefer to build a snapshot yourself the + instructions are here.
    6. +
    7. a compatible VM : obtain a VM as + described here capable + of running the class libary code, and install it in the same location as + the snapshot.
    8. +
    +

    +
    +

    +

    + + + + +
    + + Fast path - for experienced Eclipse developers + +
    +
    + +

    + If you know your way around Eclipse JDT, then following these steps will + have you hacking Harmony Java code in no time at all! +

    + + + + +
    + + Configuring Eclipse + +
    +
    +

    + Ensure that you have the development pre-requisites + in place, then: +

      +
    1. Launch Eclipse with the VM argument "-Dpde.jreProfile=none" + (i.e. eclipse -vmargs -Dpde.jreProfile=none).
    2. +
    3. Configure the following settings in Window > Preferences... +
        +
      • Change the Java compiler settings +
          +
        1. In the Java > Compiler preferences ensure the + "Compiler compliance level" is set to + 1.4.
        2. +
        3. In the Java > Compiler > Building preferences, + open the "Build Path Problems" section + and change "Circular Dependencies" from + Error to Warning.
        4. +
      • +
      • Change the PDE settings +
          +
        1. In the Plug-in Development > Compilers preferences + change "Unresolved Dependencies" from + Error to Warning.
        2. +
        3. In the Plug-in Development > Target Platform + preferences, change the "Location:" box to be the + jre/lib/boot directory of the classlib snapshot.
        4. +
      • +
    4. +
    5. Create a SVN repository location to the Harmony classlib, using URL + https://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib
    6. +
    +

    +
    +

    + + + + +
    + + Develop and test code + +
    +
    +

    + The Apache Harmony class library is structured to allow developers to work on individual + modules in the class library without having to load and compile the entire + project source tree. +

    +

    + This is best illustrated by a worked example. In this example, assume you want to make + a change to the NIO module. This is how you would proceed: +

      +
    1. Go to the SVN repository view, open the Harmony URL and browse to + "trunk > modules". Select + "nio" and from the context menu select + Checkout..., and on the checkout dialog just + click "Finish"
    2. +
    3. In the resulting project in your workspace the implementation code + is in the source folder src/main/java and the unit tests + are in the source folder src/test/java.
    4. +
    5. Hack away! Developers are encouraged to produce JUnit tests for new + implementation code.
    6. +
    7. To test the code you need to set-up a JUnit Run Configuration for the + unit test. You can either run a single test case, or run the + AllTests suite for all tests in a package or module. + For example, to run the test suite + org.apache.harmony.tests.nio.AllTests set up a + run configuration with the following characteristics: +
        +
      • bootclasspath : the folder nio/bin/main, followed by + the Harmony JRE library.
      • +
      • classpath : the folder nio/bin/test, followed by the + JUNIT JAR file.
      • +
        + Java run configuration +
      • VM : the Harmony JRE as the launching VM.
      • +
      +
    8. +
    9. If everything looks good, go ahead and + contribute a patch.
    10. +
    +

    +
    +

    +
    +

    +

    + + + + +
    + + Step-by-step guide to Eclipse-based development + +
    +
    + +

    + We have produced a brief webcast for those who want to see a step-by-step guide + to configuring Eclipse, and developing a patch to the classlibrary code. The webcast + starts assuming you have already installed the pre-requisities for Eclipse-based + development, and launched Eclipse with the following commandline: +

    eclipse -vmargs -Dpde.jreProfile=none
    + We
    pick up the story here... +

    +
    +

    +

    +
    +
    +
    +
    + Copyright © 2003-2006, The Apache Software Foundation +
    +
    + + + + + + + + + + + + + + + + + + + + + + + Added: incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse_movie.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse_movie.html?rev=375302&view=auto ============================================================================== --- incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse_movie.html (added) +++ incubator/harmony/standard/site/docs/subcomponents/classlibrary/dev_eclipse_movie.html Mon Feb 6 07:51:07 2006 @@ -0,0 +1,71 @@ + + + + + + + + + + + +
    + + +
    + +Apache Harmony +
    +
    + + Apache Harmony +
    + + +


    +

    +

    +

    Eclipse-based development : The Movie

    + + + + + + + + + + + +
    +
    +

    + After watching the movie return to the Eclipse-based development page. +

    + + Modified: incubator/harmony/standard/site/docs/subcomponents/classlibrary/index.html URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/docs/subcomponents/classlibrary/index.html?rev=375302&r1=375301&r2=375302&view=diff ============================================================================== --- incubator/harmony/standard/site/docs/subcomponents/classlibrary/index.html (original) +++ incubator/harmony/standard/site/docs/subcomponents/classlibrary/index.html Mon Feb 6 07:51:07 2006 @@ -201,8 +201,22 @@

    -Lets talk about the class library -

    + The following documentation links are specific to the class library effort underway at Apache Harmony. +

    +

    Modified: incubator/harmony/standard/site/xdocs/documentation/documentation.xml URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/xdocs/documentation/documentation.xml?rev=375302&r1=375301&r2=375302&view=diff ============================================================================== --- incubator/harmony/standard/site/xdocs/documentation/documentation.xml (original) +++ incubator/harmony/standard/site/xdocs/documentation/documentation.xml Mon Feb 6 07:51:07 2006 @@ -41,7 +41,7 @@ Building and Deploying the Apache Harmony Website
  • - Building the Classlibrary Code + Documentation for the Classlibrary Code
  • Modified: incubator/harmony/standard/site/xdocs/get-involved.xml URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/xdocs/get-involved.xml?rev=375302&r1=375301&r2=375302&view=diff ============================================================================== --- incubator/harmony/standard/site/xdocs/get-involved.xml (original) +++ incubator/harmony/standard/site/xdocs/get-involved.xml Mon Feb 6 07:51:07 2006 @@ -47,6 +47,7 @@
    +

    One of the best ways to get involved in the Harmony project is to Added: incubator/harmony/standard/site/xdocs/images/dev_eclipse_runconf.jpg URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/xdocs/images/dev_eclipse_runconf.jpg?rev=375302&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/standard/site/xdocs/images/dev_eclipse_runconf.jpg ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: incubator/harmony/standard/site/xdocs/images/eclipse_movie.swf URL: http://svn.apache.org/viewcvs/incubator/harmony/standard/site/xdocs/images/eclipse_movie.swf?rev=375302&view=auto ============================================================================== Binary file - no diff available. Propchange: incubator/harmony/standard/site/xdocs/images/eclipse_movie.swf ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream