I am stuck in importing JAVA libraries to Python.
1. How do I import JSON?
I tried using simplejson with SFS Python, but its throwing some errors. So I didnt want to use external libs and wanted to use core JAVA libs. Is there a way I can directly import Java's JSON Classes? I have copied json-lib into the lib directory and when I am trying to import the classes using
Code: Select all
import org.json
or
import java.net.json
or
something else
I am using eclipse to test and tried putting all the jars in the library path and class path too but to no avail.
2. For connecting to my Mysql DB. Do I have to use hibernate or can I use normal jdbc dirver to connect to my DB server. If so, if someone can give me a code snippet of how to import it, it would be great.
Thirdly, if I create a singleton class to run in an extension, will the same object be used if I use the class in another extension? Or since its a threaded execution will there be any difference?
Thank You.