472,952 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,952 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 5019
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.