Chapter 10. Run Red Hat JBoss Data Grid in Library Mode (Single-Node Setup)
10.1. Create a Main Method in the Quickstart Class
These quickstarts use the Infinispan quickstarts located at https://github.com/infinispan/infinispan-quickstart. The following procedure uses the infinispan-quickstart/embedded-cache quickstart.
Procedure 10.1. Create a Main Method in the Quickstart Class
Create the Quickstart.java File
Create a file calledQuickstart.javaat your project's location.Add the Quickstart Class
Add the following class and method to theQuickstart.javafile:package com.mycompany.app; import org.infinispan.manager.DefaultCacheManager import org.infinispan.Cache public class Quickstart { public static void main(String args[]) throws Exception { Cache<Object, Object> cache = new DefaultCacheManager().getCache(); } }Copy Dependencies and Compile Java Classes
Use the following command to copy all project dependencies to a directory and compile the Java classes from your project:$ mvn clean compile dependency:copy-dependencies -DstripVersion
Run the Main Method
Use the following command to run the main method:$ java -cp target/classes/:target/dependency/* com.mycompany.app.Quickstart

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.