I have been assigned a task to convert a java standalone application to python web application.Recoding the entire module in python language would take a lot of time and effort.Hence I was adviced do a quick wrap up of python and get the code working (jython.org) (Jython is Python wrap for JAVA )..Could any one guide me how to get started as I am new to Python as well as Jython?
1
There are 1 best solutions below
Related Questions in JYTHON
- Importing Jython into a JavaFX application
- How to access a var like WORKSPACE_LOC from jython scripting (pytemplate_xx.py)?
- How to validate/ignore optional value while validating it using 'Validate CSV' processor in Apache NiFi?
- Jython: syntax check available?
- Unable to execute -m ensurepip with Jython Jar
- How to automate Swing application using Swing library (or) Remote Swing Library
- How to Add Java Libraries to Jython Project in PyCharm Community Edition?
- Sikuli jython function with Region as argument is not working
- how to configure python in jmeter
- Include Python Classifier Model in Java
- executing wsadmin script from (inside) powershell script
- is it possible to add the vtk library to jython 2.7.3 ?(non-native python libraries)
- Python modules using Jython
- Proper usage of Jython's PythonInterpreter for multiple scripts
- Control Edit Properties of JTable in Jython
Related Questions in JYTHON-2.5
- Write a CSV based on another CSV file creating an additional empty row?
- Jython - Convert Java array with Java Strings to Python list with Python strings
- Changing a folder in a path for writing using re and glob libraries
- How can I get PythonInterpreter to recognize datetime and other modules such as psutils in python?
- Converting a MSSQL varbinary to a base64 string
- Executing subprocess cannot find specified file on Windows
- NullPointerException while using struct.unpack() in Jython
- how to bring the actor moving on the y-axis?
- Jython: where is itertools?
- Import globally installed module
- How to fix PyException error in Sikulix 1.1.1?
- Jython : Issues executing XSLT
- ImportError: No module named etree in Jython
- Python (Jython) - can I access variable names in property setter and getter functions?
- FDMEE. Exception when I try to load data by fdmAPI.executeQuery
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
To get you started:
If you're familiar with Java, then you should be able to get to the Jython prompt no problem. Just execute it like any other
.jar. If you didn't download the standalone jython.jar, be sure to include the Jython libraries in your classpath.Say your Java application's package is named
com.stackoverflow.q10715162, and is compiled as a.jarinC:\jars\your_app.jar.Then, you can get access to its classes in Jython. At the Jython prompt:
Here,
sys.pathis, among other things, a list of directories where your Jython distribution is looking for compiled modules. By adding your compiled Java application to the list, it will become accessible (more in-depth info is available for this at http://www.jython.org/jythonbook/en/1.0/ModulesPackages.html):By using
dir(yourapp)you can see the classes you defined in your Java application.dir(yourapp.Class1)will list all methods, functions, etc. that are within the class.You probably want to read through the first few pages at least of the Jython Book to familiarize yourself with the new syntax. I find it much simpler than Java's.
For making a Jython web app, I've heard
cgiis by far the fastet way to get started with the least overhead:This tutorial seems helpful: http://www.cs.virginia.edu/~lab2q/lesson_1/. Although it is for Python, almost all of it should be applicable to Jython.
And of course, there are many other Python/Jython web service options if
cgidoesn't suit you or your project. I've usedweb2pyand really liked it.