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
This document describes various useful information of interest to developers who would be interested in working on GanttProject source code.
Parts still missing from this document are:
How to build a GanttProject executable from source (planned)
How to commit code to SourceForge (planned)
Anything related to Macintosh (any takers ?)
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.
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)
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.
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.
You can download Eclipse at http://www.eclipse.org/downloads/index.php. Choose the latest stable version.
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
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 !
This section is for user which already have a working installation of eclipse.
All the snapshots are taken on Eclipse Version: 3.1.0.
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:
Use your SourceForge login and password instead of « anonymous »
Use connexion type « extssh » instead of « pserver »
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.
View it as a java project:
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.
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:
org.eclipse.core.runtime
org.eclipse.core.runtime.compatibility
org.eclipse.osgi
org.eclipse.update.configurator
Then you can « apply » and « run »!
- END of DOCUMENT -