This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How can I convert OO Perl to Java?
Hello.
I have a perl script and I want to translate it to Java.
Is there any translator/conversor from perl script to Java?
By the way, I'm developing an Android 2.2 application.
EDIT
I have closed the question. Stop downvoting me!!!!!! And if you downvote tell us why!!
Thanks.
You should consider using the Android Scripting Environment so that you can just use your Perl script rather than having to "translate" it to Java (especially if you plan on relying on some translation tool to do it).
It supports Perl, along with Python, Ruby, and some others.
Just my two cents...
I would convert the Perl to Java by hand that way you are 100% in control of the Java code running in your Android application and that way you will understand what the Perl code is actually doing rather than relying on it to work when there is a bug in your Android app.
No. There's the JPL project from the 90's that might've been a workaround, but I'm pretty sure it fell apart along the road.
Related
This question already has answers here:
Calling Python in Java?
(12 answers)
Closed 3 years ago.
I'm trying to build an OCR desktop application using Java and, to do this, I have to use libraries and functions that were created using the Python programming language, so I want to figure out: how can I use those libraries inside my Java application?
I have already seen Jython, but it is only useful for cases when you want to run Java code in Python; what I want is the other way around (using Python code in Java applications).
I have worked in projects where Python was used for ML (machine learning) tasks and everything else was written in Java.
We separated the execution environments entirely. Instead of mixing Python and Java in some esoteric way, you create independent services (one for Python, one for Java), and then handle inter-process communication via HTTP or messaging or some other mechanism. "Mircoservices" if you will.
This question already has answers here:
How can a program control another program?
(11 answers)
Closed 8 years ago.
I wonder is possible to make a bot writen in JAVA, which will open some program(program is under windows), click on the button in this program and type some data, check status of this program(login or logout, this is client for online game).
Which JAVA tools I need ? I think that java robot lib is not enough for this.
Thanks in advance.
You cannot do this using JAVA.
JAVA is a language which is loosely coupled with operating systems, so it can only receive mouse/key messages from underlying OS. Among all the tasks you mentioned , it can only start the program by using Runtime.execute.
If you want to implement a software like this ,you should use Visual Studio and use Microsoft technologies.
This question already has answers here:
Embedded Prolog Interpreter/Compiler for Java
(13 answers)
Closed 8 years ago.
I hope my question is not a duplicate... I have implemented some rules using Prolog. I would like to ask if there is any way to use these rules in a java application. I do not want to implement everything in java from scratch. I would like to embed the code written in Prolog in a java application. Thanks in advance.
There are various ways. But judging from your question you're looking for a quick solution.
JPL (since i notice a lot of people are using SWI nowadays):
http://www.swi-prolog.org/FAQ/Java.html
The GNU Prolog library for Java:
http://www.gnu.org/software/gnuprologjava/
SICtus (It comes with syntax examples, etc so it shouldn't be hard for you to use it quickly)
http://sicstus.sics.se/sicstus/docs/3.7.1/html/sicstus_12.html
tuProlog (Said to be the easiest to use, beginner friendly)
http://www.alice.unibo.it/xwiki/bin/view/Tuprolog/
This question already has answers here:
Calling C/C++ from Python? [closed]
(12 answers)
Closed 11 months ago.
I am mainly using python for extensive algorithms operations. Now i have my webiste in Django.
I few libraries in c++ and few in Java which i don't have in python. Or you can say that i already have some c++ , Java files in which some algorithm is coded.
can i call those function or do some calculation in my djnago sites using those c++ or java files
For C++, certainly. Either write a module that wraps the library, or use something like ctypes or SWIG.
For Java, you'd be best to move to Jython (and correspondingly use django-jython).
Note that using both C++ and Java from Python is not trivial.
I've used Boost.Python to some degree of success for accessing C++ libraries within Python/Django.
You could check the http://www.scipy.org/Weave weave package for C/C++. I didn't use it myself, but I know it exists
This question already has answers here:
What is Java's answer to WPF? [closed]
(3 answers)
Closed 9 years ago.
We are doing an evaluation of what to use for client technology, I was wondering what Java has to offer.
I know that this is a close duplicate to this question:
What is Java's answer to WPF?
But the answer in the above question is over 2 years old, so the answer today could be different.
This 2011 Java wil lunch JavaFX 2.0, you will use the JavaFX API's with core Java language instead of the JavaFX Script in 1.x versions.
I concur with the others here that JavaFX was probably intended to be Sun's answer to WPF and Silverlight, but it's never quite reached the standard that Microsoft's technologies have.
Another Java alternative to Silverlight is BlazeDS and Spring BlazeDS which use a Java application server as the backend, and Adobe Flash as the client (using Flex). I've never used it, but the combination looks pretty similar to using Silverlight.
JavaFX is in full swing and Oracle has already made early access release available. More answers can be found here, but surely a competitor is in the making that will give its counterpart a tough time soon
I think that JavaFX still lives. You can check Eclipse Rich Ajax Platform too. I think this is suitaible answer to Silverlight.