GanttProject Developer Guide



Version 0.4





Contents

Section 1 - Introduction 3

1.1 - Purpose of this document 3

1.2 - TODO 3

Section 2 - Java installation 4

2.1 - Java Software Development Kit download 4

2.2 - SDK installation on Linux 4

2.3 - SDK installation on Windows 5

Section 3 - Eclipse installation 6

3.1 - Eclipse download 6

3.2 - Eclipse installation on Linux 6

3.3 - Eclipse installation on Windows 7

Section 4 - Create a GanttProject project with eclipse 8

4.1 - Create a new project based on sourceforge CVS 8

4.2 - View your new eclipse project 12

4.3 - How to run the software from the project source 15


Section 1 - Introduction

1.1 - Purpose of this document

This document describes various useful information of interest to developers who would be interested in working on GanttProject source code.

1.2 - TODO

Parts still missing from this document are:

Section 2 - Java installation

2.1 - Java Software Development Kit download

Since GanttProject has been developed in Java, the first thing you have to get is a Java Software Development Kit. There are several Development Kit that Sun provide. The one we advise you to use is the Java 2 Platform Standard Edition version 1.4.2 (J2SE 1.4.2). There are two things you can get about J2SE 1.4.2 : the Java Runtime Environment (JRE) and the Sofware Development Kit (SDK) which includes JRE.

To develop you need the SDK. It is available for free at : http://java.sun.com/j2se/1.4.2/download.html.

2.2 - SDK installation on Linux

The following describes how to install the SDK on Linux. If you have downloaded the linux self-extracting file change to the directory where the file j2sdk-1_4_2_07-linux-i586.bin is.

> sh j2sdk-1_4_2_07-linux-i586.bin

Accept the licence by typing yes when asked.

The SDJ will be extracted into the same directory.

> ls
j2sdk1.4.2_07/
j2sdk-1_4_2_07-linux-i586.bin

Before starting GanttProject, you have to update your PATH. This can be done by typing the following lines in your shell:

For Korn-shells (ksh, bash):

> export JAVA_HOME=<path_to_sdk>/j2sdk1.4.2_07/
> export PATH=$PATH:$JAVA_HOME/bin/

For C-shells (csh, tcsh):

> setenv JAVA_HOME <path_to_sdk>/j2sdk1.4.2_07/
> setenv PATH $PATH:$JAVA_HOME/bin/


Alternately, you can add these lines in your .bashrc file (or equivalent for other shells), so they are executed automatically.

Now Java SDK is correctly installed. To check the java type the following :

>java -version
java version "1.4.2_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)

2.3 - SDK installation on Windows

You have downloaded a file named j2sdk-1_4_2_XX-windows-i586-p.exe (where XX is the update version). Run this file. Follow the installer to install SDK.

The installation is complete, SDK is correctly installed.



Section 3 - Eclipse installation

You don't NEED to use eclipse in order to work on the GanttProject code. But if you don't know eclipse, you should give it a try, as it's what the GanttProject developers are using, and it's powerful and open source software.

Prior to installing Eclipse, be sure you have a Java SDK installed.

3.1 - Eclipse download

You can download Eclipse at http://www.eclipse.org/downloads/index.php. Choose the latest stable version.

3.2 - Eclipse installation on Linux

Installating Eclipse is quite simple : you only have to extract the downloaded archive. For instance, if the archive is a TAR-GZ archive, type the following :

> tar -xvzf eclipse-SDK-3.1M5a-linux-gtk.tar.gz

It creates a directory in which the Eclipse binary is. To run Eclipse change to eclipse directory and type :

> ./eclipse








3.3 - Eclipse installation on Windows

Normally you have downloaded a ZIP archive. Installing Eclipse only consist in decompress this archive. It creates a eclipse folder. Change to this folder and run the eclipse.exe file.

That's all !

Section 4 - Create a GanttProject project with eclipse

This section is for user which already have a working installation of eclipse.

All the snapshots are taken on Eclipse Version: 3.1.0.



4.1 - Create a new project based on sourceforge CVS

4.1.1 - Create an eclipse CVS repository view











4.1.2 - Configure CVS repository view




Add new CVS Repository




Add your own user data










It is now possible to browse the CVS repository. The source is in the HEAD -> ganttproject. The repository, in this case, is the distant repository on SourceForge, so it is not surprising that the browsing is slow.





Of course, as you have used the « anonymous » user name, you may not commit your code to the CVS.

If you wish to be able to commit code, you have to contact the project leader and ask for inclusion of your sourceforge login in the project developer's list. When the GanttProject admins have registered your SourceForge login as a GanttProject developper, you may configure the above differently in order to have write (« commit ») permissions:





4.1.3 - Checkout a local copy of the code

This is done twice, as you want to get both the « ganttproject » and the « org.ganttproject.impex.msproject ». Otherwise, you would lack the MS-Project import/export feature.

This is done by right-clicking on the « ganttproject » branch and selecting « Check Out As... »:





This takes some time, depending on you internet access bandwidth.

This is done in the same way.

4.2 - View your new eclipse project

View it as a java project:











4.2.1 - Add complementary library (if needed)

As you may notice in the previous view, some source files appear with a red warning icon. This is due to the unavailability of the xxxx library (here, mpxj) in the current classpath. This library is called by the files which display the red warning.

Get in « Project » -> « Properties »




In « Libraries » tab, select « Add Jars »




And select the mpxj jar file:


Normally, at this stage, you should not have any errors, only warnings.









4.3 - How to run the software from the project source

Get back to the « java » view (you have two projects visible now):




Then « Run »:








Create new eclipse application:









Select « Program to Run »:




In « plug-in » tab, select « choose plug-ins and fragments to launch from list »:

Select both Workspace Plug-Ins and the appropriate External plug-ins:



Then you can « apply » and « run »!





- END of DOCUMENT -