JPO Java Picture Organizer |
|
|---|---|
|
About JPO Launched: 14.1.2003 |
RequirementsJPO is a pure Java application so it runs on any computer with a display that runs Java. (Note: I'm not sure what happens on a cell phone or pda but it hardly makes sense in such an environment.) You need a recent Java runtime installation. You must have Java 1.4.0 or later because
Sun introduced cool fast graphics routines in this release which are being used.
Use the command You can download the Java Runtime Environment (JRE) or the Java Software Development Kit (SDK) here: http://java.sun.com/j2se/1.5.0/system-configurations.html In the past I've run JPO against the IBM Linux JVM and the Blackdown JVM. Dealing with bitmaps inside the JVM consumes huge amounts of memory. On low specified machines this can become frustrating when the operating system decides to spend minutes swapping memory around. You should be OK if you have more than 512MB and are dealing with 6 Megapixel images. You can tweak things by changing the amount of pictures JPO is allowed to cache in the settings. You can also tweak the amount of memory allocated to the JVM but you will need to make a local installation described below. Installation OptionsYou can run JPO with Java Web Start technology (which I recommend) or you can install the programs locally on your machine. If you want a local installation you can either use the packaged Microsoft Windows version (out of date at the time of writing) or download the jar files from this web site. You can also download the source code and compile your own version. The Java Web Start option is probably the simplest choice because you can run JPO directly from your web browser by clicking on the "Start now!" link at the top left of this page. Your browser then fire up the Java Web Start program which downloads all the pieces from the Web and launches JPO. Each time you launch the application Java Web Start checks if I have released a new version and keeps your installation up to date automatically. The Microsoft Windows package is a good choice for people who want to run JPO on this operating system. Anyone familiar with installing software on this OS will feel at home with the Installer interface. Unfortunately I have not released an updated package for quite a while. Due to the publicity which such a release attracts I feel a need to fix some more bugs and perform a very thorough test before the next release. Downloading the jars gives you full control about memory allocations and any tweaks you would like to make on your JVM. Downloading the source and compiling your own version gives you the ability to change the source code and do whatever you like (under the lenient restrictions of the GPL, of course). Using Java Web StartIf everything is configured correctly all you do is click this link and off you go. You can also start other versions of the program: Note: You will see the following warning screen:
You get this warning message because I haven't bought myself a certificate with which to sign the packaged programs. JPO does need access to your hard disk so you have to accept this "sandbox" warning or it will not run. Note: Please also note that on some XP machines and Mac OS machines The Java Web Start version is not working. A general exception is thrown with no helpful information. I am currently at a loss what is wrong as it used to work and I haven't changed this part of the code. It continues to work on all machines I have ready access to. If you have an idea what is wrong and how to fix it, please let me know. Potential problem: Your browser needs to know that it should
start Java Web Start when it downloads a You can run Java Webstart Programs from outside the browser by starting the program and
passing in the location of the jnlp file: To do this you do need to know where the javaws program was installed. On
Windows do a search for javaws.exe. On Linux you can do Windows InstallerFor Windows users there is an outdated packaged Windows version available. Download it from the regular SourceForge download area: Local InstallationFirst download the jar files and save them in your program directory: Note: Make sure they retain the Then you need to create a script or batch file to run everything. On Linux the script would look like this:
Note: Put everything on one long line. The space characters do matter; don't put spaces between the jars separated by colons(:) in the classpath! In the example this was done to make the web page work. Note: On Windows machines the classpath must be separated by semicolons (;) on Linux machines by colons (:) On a particular Windows XP machine I installed Jpo into c:\Program Files\Jpo. The resulting Batch file looks like this: (you can download it here: Jpo.bat
Actually I think I have managed to improve on this on 5.2.2007: I learned that I can set a classpath in the manifest of the main jar. If all the jars are in the same directory all that is needed to run the program is then a "simple" command like this:
Installing the source:Naturally there are some prerequisites: a Java Software Development Kit (SDK), Apache Ant, a CVS client and JUnit. Pitfalls to be aware of: Ant can be very fussy and annoying with cryptic, incomprehensible error messages. On my SuSE 10.1 machine things have gotten much better. SuSE have done all sorts of magic with the Java installation and the 1.5 release seems to be found by the command line without too much hassle. Ant also does some magic so that as long as the ant command itself is found ant is perfectly happy to build. But, to be honest, I have also spent many frustrating hours fiddling with things I didn't understand. I can say that there are two very important environment things: the location of the JVM and the location of ANT. The location of the JVM can be specified on a Linux (bash) system by: export JVM=/usr/java/jdk1.5.0_07
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(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Not sure, but JAVA_HOME can be used for the same thing and on my system is set to the same directory. I have both variables set to the same thing and it works. Good enough for me. Check you have a working java compiler with: javac -version
Now check that your ant works properly (and this is where the ANT_HOME environment variable can be important): ant -version
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
A lot of stuff will scroll over the screen but if the last lines say something like the following you are good: JUNIT:
If the above doesn't work fix it! The command 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 I have set up a shell script that sets my environment. I run it with the
#!/bin/sh JAVA_HOME=/opt/IBMJava2-14 JAVA_DEV_ROOT=/path_to_my_sources/Jpo 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
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/ Potential problems:Memory settings:If you get out of Memory errors then you are probably best off using the local jar way of starting this application as you can then set the initial memory heap with the -Xms and the maximum memory heap with the -Xmx parameters. Of course this can also be done on the web start version but you would have to set Jpo up on your own webserver so that you could specify the memory settings in the .jnlp configuration file. Chinese FontFranklin He has been kind enough to translate the User Interface to Traditional and Simplified Chinese. This looks really cool but poses some installation hassles if your Java system is not correctly configured. On my SuSE 10 system I had to create a /usr/java/jdk1.5.0_07/jre/lib/fontconfig.SuSE.properties file. Click here to download my version. Helpful LinksSun's Web start FAQ: http://java.sun.com/products/javawebstart/faq.html Please let me know of specific installation issues you have so that I may extend this section for the benefit of other users who might have the same issue. Last update to this page: 7.2.2007 |