Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

To call a native program  RSS feed

 
Sundar Subramanian
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is possible to call a native program(C program) from jsp. The native program is calling unix shell script.I have to pass parameters and file name to the native program and then the native program will pass this to shell script to execute a report.

Is there any alternative method is there?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do a Google search on "JNI" (The Java Native Interface).

<my 2 cents>
You really don't want to do this directly from a JSP.
If you aren't writing servlets, at least factor the C calling stuff into
a Javabean which can be invoked from your JSP.
</my 2 cents>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!