473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Communication between JAVA and python

Hello
How can I transfert information between a JAVA application and a python
script application. I can't use jython because, I must use python
interpreter.I think to socket or semaphore, but can I use it on Windows
plateform ?

thanks a lot

jack
Jul 18 '05 #1
3 5042
Jacques Daussy wrote:
Hello
How can I transfert information between a JAVA application and a python
script application. I can't use jython because, I must use python
interpreter.I think to socket or semaphore, but can I use it on Windows
plateform ?


Jython has an interpreter and Windows has sockets.

Kent
Jul 18 '05 #2
Jacques Daussy wrote:
Hello
How can I transfert information between a JAVA application and a python
script application. I can't use jython because, I must use python
interpreter.I think to socket or semaphore, but can I use it on Windows
plateform ?

thanks a lot

jack


Well, it all depends on the exact deployment scenario you;re facing.

If you're java program can be embedded dinside hte python scripts, then
JPype (see my sig at the bottom of this post) can certainly help you.

Otherwise ... Is there a java way to "access" you java program from
outside it's process? I mean things like RMI servers, or EJBs. If so,
again JPype can take the place of a "java" client.

If not, there is no magic. You must first find a way to contact you Java
process. If that remote-call technology is "standard", i.e. Something
like SOAP or XML-RPC, then you can find a python technology to access
it. If its not standard, but tehre is a Java way to use it, Again jpype
can be your friend.

If you can tell us more about the nature of each program (Python and
Java) we may be better able to help you.

--
Steve Menard
--------------------
Maintainer of http://jpype.sourceforge.net
Jul 18 '05 #3
Jacques Daussy wrote:
Hello
How can I transfert information between a JAVA application and a
python script application. I can't use jython because, I must use
python interpreter.I think to socket or semaphore, but can I use it
on Windows plateform ?

Try XML-RPC (a simple implementation of remote procedure call via HTTP
sockets).
It's built-in in Python since 2.2
(http://www.python.org/doc/2.4/lib/mo...mlrpclib.html),
in Java use e.g. Apache XML-RPC (http://ws.apache.org/xmlrpc/).

Ulrich
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ^CeFoS^ | last post by:
Hi to everybody, due to I want to use the serial port of a server machine through an applet allocated in html document. > Then one application will run in the server machine and using > the serial...
1
by: greg.knaddison | last post by:
Hi, I'm trying to use the httpclient within Jython (see http://jakarta.apache.org/commons/httpclient/ for more information on the httpclient). My Jython version is: Jython 2.1 on...
9
by: Harald Massa | last post by:
Hello, I have a group of Python programms which I want to teach to "talk to each other". All run on Windows, on the same computer or in the same intranet. Security of communication is not an...
0
by: John Pedersen | last post by:
Hi, Since I have installed mysql 4.1 I am getting this error on trying to reach the db: java.sql.SQLException: Communication failure during handshake. Is there a server running on...
1
by: Praveen | last post by:
Hi, I have installed WebSphere Portal on AIX and connected to DB2 on a remote machine, Getting the followin errors when trying to get the values from database thru applications installed on...
0
by: news.onet.pl | last post by:
I hava a problem with communication between Java/Corba server based on JDK ORB with Java/Corba client (applet) based on the same ORB. I`m using IOR to localize server. client`s ORB i initialize...
7
by: bylum | last post by:
Servlet SQLException Communication link failure java howto i can't connect jsp and database(mysql). This is the exception: exception org.apache.jasper.JasperException:...
0
by: misama | last post by:
i need a API for sending some info from java to python.. can any one know about how to call python class from a java class... plz give me a small example if u can....thanks
5
by: AeonOfTime | last post by:
Let's assume a web application (in this case a browser-based game) with a custom HTTP server built on PHP, and a client also built on PHP. The client uses the server to access and change data. Even...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.