Este contenido no está disponible en el idioma seleccionado.
Chapter 10. Run Red Hat JBoss Data Grid in Library Mode (Single-Node Setup)
10.1. Create a Main Method in the Quickstart Class Copiar enlaceEnlace copiado en el portapapeles!
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.java
at your project's location.Add the Quickstart Class
Add the following class and method to theQuickstart.java
file:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
$ mvn clean compile dependency:copy-dependencies -DstripVersion
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the Main Method
Use the following command to run the main method:java -cp target/classes/:target/dependency/* com.mycompany.app.Quickstart
$ java -cp target/classes/:target/dependency/* com.mycompany.app.Quickstart
Copy to Clipboard Copied! Toggle word wrap Toggle overflow