Development Environment Setup
This guide aims to help you set up Collate, edit its source code and export it as .jar
files.
If you want to run the GUI version of Collate, follow the guide to set up the Text UI version before moving on to the setup of the GUI version.
Setup Text UI version of Collate
Setup development environment
JDK 8u40 or later
http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Click JDK download
- Accept the license agreement and download the appropriate installation file
Eclipse Luna or later
Eclipse is the IDE that was used to develop Collate.
https://www.eclipse.org/downloads/
- Download “Eclipse IDE for Java Developers”
- Extract the contents to whichever folder you want. E.g. C:/eclipse
e(fx)clipse 1.2.0 or later
e(fx)clipse enables you to create new JavaFX FXML projects using Eclipse and start Scene Builder from within the IDE.
http://www.eclipse.org/efxclipse/install.html
Follow the installation instructions in the link above.
Configure development environment
Set Java JDK
- In Preferences window, go to Java > Installed JREs
- Remove the existing entries
- Click Add…
- Select Standard VM and click Next
- Navigate to the folder of your installed JDK
- Click Finish
- Tick the checkbox beside this entry and click Apply
- Go to Java > Compiler and ensure the Compiler compliance level is at least 1.8
Import and run Collate
Download the latest release
- Navigate to https://github.com/collate/collate/releases
- Download and extract the source code of the latest release
Import project into Eclipse
- In Eclipse, go to File > Import…
- Select General > Existing Projects into Workspace and click Next
- Select root folder of the extracted source code and click Finish.
The default view of the Package Explorer shows the packages in a flat manner. If you want to see packages in a hierarchical manner, click on the downward pointing triangle and change the Package Presentation.
Run Collate
- Open
Collate.java
from thetui
package - Click Run
Collate.java
Export Collate
- File > Export…
- Select Java > JAR file
- Select the src file to be exported and set the export destination
- Click Next 2 times
- Set the Main class
- Click Finish
Run exported jar
- Open a command window/terminal in the folder of the jar file
For Windows, Shift+Right click in the folder of the jar file and click open command window here.
- Enter
java -jar collate-tui.jar
(replace the filename accordingly)
Setup GUI version of Collate
Setup development environment
Follow the setup instructions for the TUI version before moving on.
Scene Builder 8.0.0 or later
Scene Builder enables you to arrange components in JavaFX layouts through a GUI.
http://gluonhq.com/open-source/scene-builder/
Download and install Scene Builder using the link above. Do not download the executable jar as it will not work when attempting to open Scene Builder from Eclipse.
Configure development environment
Follow the configuration instructions for the TUI version before moving on.
Set SceneBuilder executable
- Go to Window > Preferences
- Click on JavaFX tab
- Find the SceneBuilder executable. For Windows, it can be
found here:
C:\Users\<USER>\AppData\Local\SceneBuilder\SceneBuilder.exe
- Click Apply
Edit and run Collate
If you’re unsure how to import Collate, .
Edit .fxml
files
e(fx)clipse enables you to edit
.fxml
files using Scene Builder through Eclipse.
- Right click on the
.fxml
file and click Open with SceneBuilder.
- After you have saved your edits, refresh the project to ensure the latest
.fxml
files are used.
Run Collate
- Open
MainApp.java
from thegui
package - Click Run
MainApp.java
Export Collate
- File > Export…
- Select Java > Runnable JAR file
- Select MainApp as the Launch configuration
- Set Export destination
- Ensure “Package required libraries into generated JAR” is selected
- Click Finish
Run exported jar
For the GUI version, simply double click on the jar file.