summaryrefslogtreecommitdiffstats
path: root/extras/japi
diff options
context:
space:
mode:
Diffstat (limited to 'extras/japi')
-rw-r--r--extras/japi/java/Makefile.am20
-rw-r--r--extras/japi/java/jvpp-nsh/jvpp_nsh.c2
2 files changed, 21 insertions, 1 deletions
diff --git a/extras/japi/java/Makefile.am b/extras/japi/java/Makefile.am
index 7ef42ba740c..d33ae82ff0d 100644
--- a/extras/japi/java/Makefile.am
+++ b/extras/japi/java/Makefile.am
@@ -185,6 +185,26 @@ jvpp-nat/io_fd_vpp_jvpp_nat_JVppNatImpl.h: $(jvpp_registry_ok) $(jvpp_nat_json_f
endif
#
+# NSH Plugin
+#
+if ENABLE_NSH_PLUGIN
+noinst_LTLIBRARIES += libjvpp_nsh.la
+libjvpp_nsh_la_SOURCES = jvpp-nsh/jvpp_nsh.c
+libjvpp_nsh_la_CPPFLAGS = -Ijvpp-nsh
+libjvpp_nsh_la_LIBADD = $(JVPP_LIBS)
+libjvpp_nsh_la_DEPENDENCIES = libjvpp_common.la
+
+BUILT_SOURCES += jvpp-nsh/io_fd_vpp_jvpp_nsh_JVppNshImpl.h
+JAR_FILES += jvpp-nsh-$(PACKAGE_VERSION).jar
+CLEANDIRS += jvpp-nsh/target
+
+jvpp_nsh_json_files = @top_builddir@/../vpp/plugins/nsh/nsh.api.json
+
+jvpp-nsh/io_fd_vpp_jvpp_nsh_JVppNshImpl.h: $(jvpp_registry_ok) $(jvpp_nsh_json_files)
+ $(call japigen,nsh,JVppNshImpl)
+endif
+
+#
# iOAM Trace Plugin
#
if ENABLE_IOAM_PLUGIN
diff --git a/extras/japi/java/jvpp-nsh/jvpp_nsh.c b/extras/japi/java/jvpp-nsh/jvpp_nsh.c
index b0577cf83ce..1736ce79910 100644
--- a/extras/japi/java/jvpp-nsh/jvpp_nsh.c
+++ b/extras/japi/java/jvpp-nsh/jvpp_nsh.c
@@ -78,7 +78,7 @@ JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_nsh_JVppNshImpl_close0
plugin_main->callbackClass = NULL;
plugin_main->callbackObject = NULL;
-
+}
/* Attach thread to JVM and cache class references when initiating JVPP ACL */
jint JNI_OnLoad(JavaVM *vm, void *reserved) {