第10章 Red Hat JBoss Data Grid のライブラリーモードでの実行 (単一ノードの設定)
10.1. クイックスタートクラスでの main メソッドの作成
これらのクイックスタートは https://github.com/infinispan/infinispan-quickstart にある Infinispan クイックスタートを使用します。以下の手順は infinispan-quickstart/embedded-cache クイックスタートを使用します。
手順10.1 クイックスタートクラスでの main メソッドの作成
Quickstart.java ファイルの作成
プロジェクトのある場所にQuickstart.javaという名前のファイルを作成します。クイックスタートクラスの追加
以下のクラスおよびメソッドをQuickstart.javaファイルに追加します。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(); } }依存関係のコピーおよび Java クラスのコンパイル
次のコマンドを使用して、すべてのプロジェクト依存関係をディレクトリーにコピーし、プロジェクトから Java クラスをコンパイルします。$ mvn clean compile dependency:copy-dependencies -DstripVersion
main メソッドの実行
次のコマンドを用いて main メソッドを実行します。$ 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.