Using shared objects (.so) with Java on Linux based Cloud
Hi all,
I am new to Linux and need help on the following matter, hopefully Linux experts out there can help me!:hattip: I want to create a Java Servlet that will interface with a shared object (.so) library. The library is a component provided by a SDK manufacturer. This Java Servlet will be hosted on Apache Tomcat running in the Amazon Web Service (AWS) Cloud. Is all these possible? :scratch: And could you point me in the right direction? Thanks! |
Yes, it's possible.
No, it probably won't be easy. If you MUST interface 'C' code (i.e. code in a 3rd party .so) with Java, then your first stop should be to familiarize yourself with JNI. I would create some standalone Java/JNI test programs that invoke the .so first, before I try to integrate them into the servlet. 'Hope that helps .. PSM |
Hi paulsm4,
Thanks for your suggestions! I was thinking the same approach on writing a JNI wrapper for my library and yes it won't be easy.. But I would give that a try, at least now i know it is possible! :D Another way i was thinking was to create a Linux command-line executable in C++ to my library and run this executable from Java itself. The executable would take several parameters and perform its processes and return the results. Do you think this is a good idea? :scratch: |
All times are GMT -5. The time now is 03:52 PM. |