LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-15-2011, 10:54 PM   #1
cos.im.fiah
LQ Newbie
 
Registered: Feb 2011
Posts: 3

Rep: Reputation: 0
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!

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? And could you point me in the right direction?

Thanks!
 
Old 02-16-2011, 01:55 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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
 
Old 02-17-2011, 08:52 PM   #3
cos.im.fiah
LQ Newbie
 
Registered: Feb 2011
Posts: 3

Original Poster
Rep: Reputation: 0
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!

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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a shared memory and some shared objects in linux? jeremy28 Programming 6 06-11-2010 06:21 AM
LXer: Java Data Objects and Service Data Objects in SOA LXer Syndicated Linux News 0 01-17-2009 07:10 AM
Shared Objects in Embedded Linux Filesystem ashok449 Linux - Kernel 5 07-06-2008 06:55 AM
any links on linking, loading shared libraries, shared objects. etc? ananthbv Programming 0 02-03-2005 08:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration