cancel
Showing results for 
Search instead for 
Did you mean: 

Call a Java API via Unix Script

Former Member
0 Kudos

Hi SDNers,

I have a Java API for syndication process.

The requirement is to call the Java API from a Unix script.

If anyone has worked in this, please suggest... in details.

Thanks,

Priti

Accepted Solutions (1)

Accepted Solutions (1)

benjamin_houttuin
Active Contributor
0 Kudos

Hi,

An API stands for Application Programming Interface... and Unix Script is a Scripting language.

Only way to call an action that is supported by an API is first to create a small executable an Java Program that uses this API.

Compile it (with javac) and then you can call this java program in a script using the command "java MyProgram <optional parameters>".

Good luck,

Benjamin

former_member208981
Contributor
0 Kudos

Hi Benjamin,

Thanks for the reply.

To be more clear of the requirement:

I have to run this Java API for syndication, once in a month. Therefore write a Unix script to call the Java API. And the Unix script will be triggered by a external scheduler tool.

Any suggestions for this or any other workaround for it.

Thanks,

Priti

benjamin_houttuin
Active Contributor
0 Kudos

Hi,

I understood, what you want is:

1. Scheduler --> 2. Script --> 3. API --> 4. run Syndication

But as I try to explain this is not possible, you cannot call an API from a Script directly, therefore your flow need to be:

1. Scheduler --> 2. Script --> 3a. Java application/program --> 3b. API --> 4. run Syndication

So in other words the API on itself cannot do anything unless you call it by programming/code created in Java.

Hope this more clear now.

B

Answers (1)

Answers (1)

former_member208981
Contributor
0 Kudos

Thanks Benjamin!!