473,396 Members | 1,805 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,396 software developers and data experts.

how can I invoke a Java code?

A friend of my write a Java program, and I want use it in my python
program as a module. I searched the topic in Google and find maybe the
better way is use GCJ to compile it. Is there any other way for me?
the simple and speediness choice the better. thanks.

Mar 23 '07 #1
4 3340
On Thu, 22 Mar 2007 17:49:01 -0700, momobear wrote:
A friend of my write a Java program, and I want use it in my python
program as a module. I searched the topic in Google and find maybe the
better way is use GCJ to compile it. Is there any other way for me? the
simple and speediness choice the better. thanks.
If you want to run the Java program as a separate process, you can run
"java -jar TheProgram.jar".

If you're wanting to interact with the code, your best option may be
Jython, an implementation of Python in Java.

- Michael
Mar 23 '07 #2
If you're wanting to interact with the code, your best option may be
Jython, an implementation of Python in Java.
I do have to interact with Java module, and when talk about Jython,
since I use third parts of python modules I am puzzled about it.

Mar 23 '07 #3
momobear a écrit :
A friend of my write a Java program, and I want use it in my python
program as a module. I searched the topic in Google and find maybe the
better way is use GCJ to compile it. Is there any other way for me?
the simple and speediness choice the better. thanks.
See my links:
http://www.limsi.fr/Individu/pointal...ntautlang-java

You can look at
* Jython
* JPype
* JEP
* java2python

Mar 23 '07 #4
momobear napisa³(a):
A friend of my write a Java program, and I want use it in my python
program as a module. I searched the topic in Google and find maybe the
better way is use GCJ to compile it. Is there any other way for me?
the simple and speediness choice the better. thanks.
If the speed is crucial, I suggest compiling the Java code with GCJ,
then write Python extension module for the Java library. This is how the
Lucene indexing library is ported to Python, see
http://pylucene.osafoundation.org/.

--
Jarek Zgoda

"We read Knuth so you don't have to."
Mar 23 '07 #5

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

Similar topics

7
by: Carolyn Vo | last post by:
Hi, How can I call Java classes from C# code? I've seen the call in ASP ("NewJavaObject"), so I'm sure that I can do something similar in C# code. Please please please help, thanks!!!
0
by: Samuel | last post by:
Hi, I am trying to access a java webservice. I know the method's signature. I used 'SoapHttpClientProtocol.Invoke' method. This method is builds its own soap message and sends it to the web...
3
by: Aimee | last post by:
I have created an ASP.NET (VB) website and need to invoke a command line application (a Java app) when the user submits a form. What is the best method for approaching this? I've read about...
7
by: stephan querengaesser | last post by:
hi ng, i try to invoke a webservice-method with an filter-object, that contains value types. if i don´t want to filter the return value of the method, i have to pass a new instance of the...
1
by: arkaprabha | last post by:
Can you tell me how to invoke a c code or a c based exe in a java code?
5
by: Bilwin | last post by:
Hi , Is it possible to call a webservice method through AJAX.? If possible how can i do this? Thanks!
7
by: Jeroen | last post by:
Hi all, On more than one occasion I stumbled upon an explanation here that talks about the 'P/Invoke layer'. Although I've got a general idea what it's about, I'm having trouble grasping what it...
3
by: ajaymohank | last post by:
hello every one........... i have program written in java.now it is in a bat file format. i am writting a php pgm and from that pgm i am passing 5 values to this bat file and invoke a sketch based...
3
by: ajaymohank | last post by:
Hello friends......... i am new to php. In my project i have to download a java page from a bat file, to the client side by passing values from the program. the problem is that i am getting the java...
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: 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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.