This repository contains some simple scenarios to verify that the Eclipse Collections artifacts can be consumed in various deployment scenarios.
The first step is to run the build to ensure that the dependency resolution works as intended.
mvn clean verify
Switch to the created result folder in the project root. Now you can execute the different build variants from command line:
First of all it is possible to execute a plain Java application from classpath and from modulepath.
java -cp ./jars/* org.fipro.ec_consumer_test.ec_consumer_main.SortInput Mohammad Donald Hiroshi Craig Sirisha Nikhil
java --module-path ./jars --module ec.consumer.main/org.fipro.ec_consumer_test.ec_consumer_main.SortInput Mohammad Donald Hiroshi Craig Sirisha Nikhil
It is also possible to create a custom JRE using jlink
.
To build a custom JRE from the modulepath, execute the following command:
jlink --add-modules=ALL-MODULE-PATH --module-path jars --no-header-files --no-man-pages --output custom_jre
Run the example by using the created custom JRE
custom_jre/bin/java --module ec.consumer.main Mohammad Donald Hiroshi Craig Sirisha Nikhil
The Eclipse Collections API and Impl artifacts can be consumed as bundles in an OSGi application.
Run the OSGi application example
java -Djava.util.logging.config.file=osgi/logging.properties -jar osgi/app.jar Mohammad Donald Hiroshi Craig Sirisha Nikhil
In the result folder you will also find the eclipse subfolder, that contains subfolders for the main operating systems. To test that Eclipse Collections also work in an Eclipse applications, move to the folder for your operating system and start the application via the eclipse executable. A simple user interface starts up that lets you enter space separated values in the text field.