Splunk Dev

is it possible to call java(JVM) in a batch script for alter action?

fredzhang
New Member

I want to build a batch script which can call java command to start a JVM process to process the search result. I have tried that in "echo.bat" but nothing happened after the batch invoked.

Anyone know how to do that?

Thanks

Tags (2)
0 Karma

gkanapathy
Splunk Employee
Splunk Employee

Yes you can, but you almost certainly will have to set the environment properly for any java command to run.

0 Karma

fredzhang
New Member

yes, The java is in the path so that I can run it any directory.

0 Karma

Damien_Dallimor
Ultra Champion

Is "java" in the environment PATH for the user that you are running Splunk as ?

0 Karma

fredzhang
New Member

yes, I have done all the settings and I can run the batch file manually in command line. But when I try to trigger the batch alert in a schedule search, only the "echo" command executed and "java" command did not.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...