Home > Apache Pivot > Setup Apache Pivot in Eclipse IDE

Setup Apache Pivot in Eclipse IDE

Sometimes it can be daunting to get your Hello World application up and running. If you are like myself, you have absolutely no experience in Apache Pivot and you are having trouble getting your first program to run on the desktop. To get your first application working requires a few small steps.

Download and install the Apache Pivot jar files.
To be able to create a program using the Apache Pivot framework, you need to download the files. These files that allow you to run your program are stored in several jar files.

A jar file is similar to a zip file for windows. It simply is a directory of files that have been compressed to save on space. You do not need to extract the files from the jar file.

Lets get started…
Point your browser to the Apache Pivot website. Click on the downloads link. First you may notice the downloads web page mentions a few topics: Release Integrity, Mirrors, Binary Distributions and Source Code Distributions.

For now you can ignore the release integrity, mirrors and Source Code Distributions. Release integrity verifies your download has not changed during the transfer. This is a security feature. The default mirror location should be sufficient. You may choose another source to download from. Source code distributions require you to compile the source code before using the files.

Under the heading Binary Distributions, you are able to choose the type of file format for downloading the Apache Pivot jar files. For windows, select zip. The options for pgp, md5 and sha are all types of encryption. You can validate your installation hasn’t been altered.

Click the link “zip” to begin downloading.

Save File Prompt in Firefox

Open Eclipse and create a new folder (where to save jar files).
Open your Eclipse IDE. Create a new project called PivotProject.

File > New Java Project

New Java Project Window

Create a new Java Project in Eclipse IDE

In the project Explorer, Right Click “PivotProject”, the project name and create a new folder. Name this folder lib. It should be located under the root of the project (not any sub folders).

Create a folder named lib in Project Explorer

Create a folder named lib in Project Explorer

Copy / paste the jar files into your project.
To keep things simple we will copy the Apache Pivot jar files you just downloaded into the lib folder of your project. Go ahead and open the downloaded zip folder.

As of version 2.0, the jar files are saved in the apache-pivot-2.0/lib/ folder. Open the lib folder in the download and copy all jar files into your project lib folder. This is located at PivotProject/lib/ if you used the same naming convention.

Add the jar files to your project
You’re almost done! In this final step you tell the Eclipse IDE where to find your Apache Pivot Jar files. Lets finish up…

In the Eclipse IDE, under the main menus; open the “Properties for PivotProject” dialog window. After the Properties dialog window opens, notice the TreeList on the left and the content area on the right.

In the TreeList view, select Java Build Path (third option as shown below). This loads the Java Build Path options with tabbed options as shown below. Choose the Libraries tab. Click the button to “Add External JARs…” to add external jars.

Project > Properties > Java Build Path > Libraries > Add External JARs…

Project Properties Window

Open the Project Properties Window located in Main Menu Project > Properties

Select to add all the jar files. This makes it easier on yourself so you do not have to add the others at a later time. Look for these jar files in the lib folder you created within your project as explained above. This helps keep your project tidy. Once all are selected, click open in the JAR Selection dialog box to load these jar files.

Add Jar Files

Select all Jar Files in your lib folder.

Now that you have the Apache Pivot jar files selected, you are ready to begin your first Apache Pivot desktop application.  Choose OK in the Properties Window to close.

The Apache Pivot Jar files have been added.

The Apache Pivot Jar files have been added. Click OK to close.

Success!
Congratulations, you have added the Apache Pivot jar files to your project. You are ready to begin your first program.

Advertisements
Categories: Apache Pivot
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: