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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...