Java Image Browser Sorter

Java Image Browser Sorter

An Image Viewer and Utilities

Home
Tutorial
 

Development

Source Code

JIBS source code is available under a GPL license.

The code is available using Git from SourceForge
and is compiled using Gradle.

Note that on February 1, 2015 the active code base was moved to the Git repository. The SVN repository provides prior history.

Development Environment

Here are how I set up my development environment:
  1. Install: Java 9 JDK
    I installed at c:\dev\Java\jdk9

    • Optional: Install Cygwin
      I installed at C:\cygwin64 and then put C:\cygwin64\bin on my path (found under Windows Environment Variables).
      That way I can use my favorite Linux commands from the Windows DOS window/Command Prompt.

    • Install: Gradle
      I unzipped to: C:\dev\gradle-4.4.1
      I used the "all" bundle to get the documentation, but then just Googled everything so it didn't really matter.

    • Install: Eclipse Oxygen
      I unzipped to: C:\dev\eclipse
      You can use the Enterprise Edition to get the HTML editors, but it is currently not set up for Java 9. JIBS is a local desktop application, not an enterprise application.

    • Create Git repository.
      From Eclipse, File -> New -> Other -> Git -> Git Repository
      I put the repository at: C:\Users\Gerhard\Git

    • Clone the jibs-jrat repository.
      From Eclipse change to the Git perspective and select "clone". (Actual steps may vary.)
      Clone URL: ssh://gerhardb@git.code.sf.net/p/img-browse-sort/jibs-jrat
      I cloned to: C:\Users\Gerhard\Git\jibs-jrat
      Note that SourceForge instructions actually gave me a URL that did not work. At least not in Eclipse. I had to remove img-browse-sort-jibs-jrat after the space at the end to get the supplied URL to work.

    • Create a new project "jibs" pointing to the downloaded repository.
      Adjust class paths to:
      jibs/src/main/java jibs/src/main/resources jibs/src/test/java jibs/src/test/resources

    • Turn off validation warnings for HTML.

    • From the C:\Users\Gerhard\Git\jibs-jrat\jibs directory run: gradle eclipseClasspath
      This will cause all the needed dependencies to be downloaded into the Gradle repository. It will also create the .classpath Eclipse needs to finish understanding the project. After this is done, use F5 to refresh Eclipse files and Eclipse should compile itself and show no issues.
      Note that I don't have Gradle on my path. I run this script to set up my Gradle environment: build.bat

    • Import the project into Exclipse.
      Should be able to just select project file: C:\Users\Gerhard\Git\jibs-jrat\jibs

    • Apply the formatter
      Here is the location of the format file: C:\Users\Gerhard\Git\jibs-jrat\jibs\eclipseFormatting.xml

    • Adjust the warnings
      I turn on all warnings except for:
      a) Code Style: Non-externalized Strings
      b) Unnecessary Code: Value of exception parameter not used

    • You should now be able to get a clean compile

    • Do a full build to create an "uberJar" which can be run on any machine just by double-clicking on it.
      (Assuming you have Java correctly installed on the machine.)
      From the C:\Users\Gerhard\Git\jibs-jrat\jibs directory run:
      gradle createImage
      then run:
      gradle uberJar
      That will put JIBS.jar at: C:\Users\Gerhard\Git\jibs-jrat\jibs\build\deliver

    • Here is what you do to create a JIBS.exe for Windows:
      1. Install: launch4j
      2. From the C:\Users\Gerhard\Git\jibs-jrat\jibs directory run: launch4j launch4j.xml
      3. That will put JIBS.exe at: C:\Users\Gerhard\Git\jibs-jrat\jibs\build\deliver

Other Useful Information

SQL Schema

Look up packages to include for Gradle build script

Other Useful Programs