JPO Java Picture Organizer

Run
Java Webstart
Download for Windows

About
Introduction
Features
Scary Java Error
Screenshot
Reviews
Technical description

User Guide

Installing
Windows
Java Web Start
Requirements
Options
Local Installation
Potential Problems

Project
Thanks
Links
Author
License

Develop
Changelog
Build on Windows
Source Installation
Using Eclipse
Javadoc

SourceForge.net Logo

Launched: 14.1.2003

Build your own with Netbeans

Have you installed the Java Software Developer Kit (SDK)? Link
Have you installed Netbeans? Link
And does your Netbeans have the CVS plugin?

Start Netbeans and click the menu item

Team > Other CVS > Checkout
. Into the CVS Root field paste the following:
:pserver:anonymous@j-po.cvs.sourceforge.net:/cvsroot/j-po
Click Next Click Finish. On the dialog that appears click Open Project. To compile and run the application press the F6 key.

Installing the source:

Do you have the prerequisites?

  • Java Software Development Kit (SDK) 1.8 or later
  • Apache Ant
  • CVS
  • Junit

I've had my fair share of issues with the prerequisites. Here is how to test your set-up:

# Depending on your environment you might need to
export JVM=/usr/java/jdk1.8.0_65
# or
export JAVA_HOME=/usr/java/jdk1.8.0_65

Test it with this command:

$JVM/bin/java -version

If you get something like the following it's ok, otherwise sort out your Java SDK installation first!

java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

Check you have a working Java compiler with:

javac -version

javac 1.8.0_65

Now check that your ant works properly (and you might have to set the ANT_HOME environment variable):

ant -version

Apache Ant(TM) version 1.9.2 compiled on October 2 2013

Use the following command to checkout the latest cvs source from sourceforge:

cvs -z3 -d:pserver:anonymous@j-po.cvs.sourceforge.net:/cvsroot/j-po checkout -P Jpo

You would then cd to the Jpo directory:

cd /wherever/you/put/the/code/.../Jpo

In order to run the unit tests (without which you can't build) you need a working JUnit installation. Check this out with the following command:

ant JUNIT Buildfile: /home/richi/Downloads/Jpo/build.xml
[echo] Apache Ant(TM) version 1.9.2 compiled on October 2 2013 is using the
[echo] build file /wherever/you/put/the/code/Jpo/build.xml to build the project
[echo] "Java Picture Organizer" Use the "-debug" switch to see loads of
[echo] debug information, "ant --help" reminds you of what other options
[echo] there are and "ant -p" tells you what targets this build file supports.

JUNIT:
[echo] Testing if JUnit is present: true

BUILD SUCCESSFUL
Total time: 0 seconds

The line with "Testing if JUnit is present: true" is the key here.

JUNIT:

BUILD SUCCESSFUL
Total time: 0 seconds

The command ant -diagnostics might be helpful. I wish someone had told be about this years ago. Also ant -debug target. Well actually, read the O'Reilly Ant book.

Now compile the code:

ant compile

And then run it with

ant go

In order to build and deply the jar files you need to generate a key with which you can sign the jar files

keytool -genkey -keystore myKeystore -alias myself

See the Java Web Start developers guide for details: http://java.sun.com/products/javawebstart/docs/developersguide.html

For convenience used to use a shell script that sets up my environment. I used to run it with the source jpoenv.sh command. It did the following:

#!/bin/sh  
JAVA_HOME=JAVA_HOME=/usr/lib64/jvm/java-1.7.0
IS_UNIX=true 
JAVA_KEY_STORE=/path_to_my_keystore/javaKeyStore
JAVA_KEY_STORE_KEY=my_secret_key

export JAVA_HOME 
export JAVA_DEV_ROOT 
export IS_UNIX
export JAVA_KEY_STORE
export JAVA_KEY_STORE_KEY

cd /path_to_my_sources/Jpo
            

The following targets are supported by the ant buildfile:

ant compile - compiles everything requiring a compilation. The classes are put in
build/classes by their package (which is jpo)
ant run - runs the application from build/classes
ant clean - deletes the compiled classes
ant rebuild - run clean and compile
ant javadoc - creates the javadoc in the directory
build/docs/index.html
ant go - compiles and runs the application
ant buildjar - builds the jar files
ant signjar - signs the jar files (if yout have the keys...)

Sourcefore also have some notes about downloading with cvs: http://sourceforge.net/cvs/?group_id=71359

Sourceforge has a neat tool to browse the source code which also highlights differences between version very nicely: http://j-po.cvs.sourceforge.net/j-po/

Using Eclipse

Set up Eclipse and install the CVS plug-in

File > New > Other... > expand CVS > Projects from CVS

Host: j-po.cvs.sourceforge.net

Repository path: /cvsroot/j-po

User: anyonymous

Password: leave empty

Connection type: leave on pserver

leave radio button on "Use default port"

Next Panel

Use specified module name: Jpo

Next Panel

Put radiobutton into "Check out as a project in the workspace"

Project Name: Jpo

Next right-click on the build.xml file > Run/Debug Settings > Make sure you have a JRE selected.

To run right-click on the build.xml file and click run-as Ant Build file.


Last update to this page: 4 July 2014
Copyright 2003-2014 by Richard Eigenmann, Zürich, Switzerland