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
- How to Edit files using web application
- Use string formatting in Jython
- Can I create a JSVGCanvas without an svg file?
- Wrapping a string in a File object in Jython
- find win32api.py for jython application
- Eclipse RCP Jython - NoClassDefFoundError
- Spring-integration scripting with Python
- Passing OSGi bundles for Jython Interpreter on-the-fly
- Calling python from java using jython and passing parameters
- Load Python class through Jython
- PythonInterpreter in Jython - storing result
- Jython decimal places for floats only when needed
- How to deal with strings where encoding is unclear
- Running Python modules in Python, from Jython
- Jython LDAP script to retrieve sAMAccountName attribute value
Related Questions in JYTHON-2.5
- No Visible constructors for class when creating Java object in Jython
- Jython Installation and Running (Beginner Issues)
- jython 2.5.3 on unix : interactive shell with command completion
- Communication between Java and Python using Jython
- Python (Jython) - can I access variable names in property setter and getter functions?
- ImportError: No module named etree in Jython
- Jython ImportError when embedding into Java on 'xml.dom.minidom'
- Does jython have pep8 rules like python?
- Is there a way to instantiate a Python class from Java using Jython *without* making that Python class extend a Java interface?
- Reg Jython Python wrap for Java
- JDBC in Jython, prepared statements
- Jython Cannot Load org.sqlite.JDBC / Classpath Issue?
- Write a CSV based on another CSV file creating an additional empty row?
- Python error in Eclipse: SyntaxError: future feature print_function is not defined
- Jython in Java error: ImportError: No module named
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 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.