How I install my development environment for iText (SVN)
Every time I upgrade my hardware (for instance when I buy a new portable),
I have to set up my development environment from scratch. Because I don't
buy a new computer every month, I often forget which steps are necessary.
That's why I wrote these pages: it's a checklist for myself, that can be useful
for others too. That is: if you want to download iText from SVN and build the
iText.jar yourself.
Requirements
First let's have a look at the tools or products that are on another (not iText-related) checklest.
It's the stuff I install without thinking; you may already have most of it on your computer:
- An operation system: iText is a Java library, so it doesn't
really matter which operating system you use. I use iText on Windows
and the GNU Operation System with a Linux kernel (wink at Richard S.)
depending on what I intend to do with the new computer (development and
demos: Windows; server and production: Linux).
Let me explain how I set up my environment on Windows, as people using Linux are supposed to know what they are doing. - Eclipse: Paulo uses NetBeans; I have used NetBeans in the past (when it was still called Forte4Java), I have used IntelliJ, I even started my carreer in Java using Visual J++ Studio (because it was shipped on a CD that accompanied my first book on Java). Tired of switching from one IDE to another, I decided to use Eclipse, and now I stick with it. My advise is: work on iText with the IDE you think is the most comfortable for you! For me, it's Eclipse; for you it might be NetBeans. It doesn't really matter.
- TortoiseSVN: the most recent iText code base is stored in a Subversion repository at SourceForge. I use Tortoise SVN to access this repository.
- Java version 1.4.2: for now, the official releases of iText use the JDK 1.4. We don't use newer JDKs, out of respect for the many users that aren't ready to make the change to Java 5 or Java 6 yet. People that are still using JDK 1.3: please create your own jar.
Getting iText from SVN
First I make a directory C:/itext-core
.
I also have directories C:/itext-toolbox
,
C:/itext-book
, C:/itext-articles
,
and so on, but that doesn't matter right now, we only
want to install the development environment for iText.In this itext-core directory, I usually create a subdirectory
C:/itext-core/main
:

This isn't really necessary, but I use this so that I can use the itext-core directory as an Eclipse Workspace, and main as one of the projects in this workspace. Another project I always create is test in directory c:/itext-core/test, but let's not get ahead of ourselves.
Next we rightclick and select
SVN Checkout...:

This opens the following dialogbox:

The string you need is:
https://itext.svn.sourceforge.net/svnroot/itext/trunk
This will download everything you need to download the current version
of iText. You can browse this version online at this address:
http://itext.svn.sourceforge.net/viewvc/itext/trunk/If you need a branch or an old version that was tagged, you'll have to adapt the URL of the SVN repository. Browse the following URL for inspiration: http://itext.svn.sourceforge.net/viewvc/itext/
While you browse these URLs, tortoiseSVN is downloading the trunk like this:

Once this process is finished, you end up with these subdirectories:

This is an overview of the directories that were created:
- .svn: Please ignore this directory, it contains information that is used by Subversion (for instance to check if the code was changed).
- lib: a typical lib directory containing some jars that are needed to compile iText (more specifically the bcmail and bcprov jars from BouncyCastle) and some jars that are needed to compile and run the iText examples.
- src: the source code and everything you need to create your own iText.jar.
- www: everything I need to create some of the iText sites; including the tutorial examples.