Jython Installation Instructions (note: You need to configure the core Classpath classpath path after successful installation)

Source: Internet
Author: User

Reference site: http://blog.sina.com.cn/s/blog_537cc9ae0100dfjl.html

Configuration required after installation: MySQL classpath path

Linux files are configured in the way above

Windows file added in Jython.bat

set CLASSPATH=%_CP: "=%; C:\\jython2.5.2\\extlibs\\mysql-connector-java-5.1.6.jar;%classpath: "=%

Default configuration Method Reference:

Http://www.wangchao.net.cn/bbsdetail_1785738.html (Jython access to the MySQL database for specific steps)

Note that the MM Access class library is too old, download the latest Mysql-connector-java-5.1.6.jar instead, and JDBC default has been integrated does not need to be followed

Additional reference files during installation:

http://developer.51cto.com/art/200907/135818.htm (Jython access MySQL detailed steps)

Http://gang.blogbus.com/logs/36340217.html (Jython uses JDBC to connect to the database)

Http://www.cnblogs.com/harrychinese/archive/2012/08/17/Let_Jython_auto_load_some_jar.html (How to get Jython to load a jar package automatically)

Jython Connection Database code:

From Com.ziclix.python.sql import Zxjdbc

Mysqlconn = Zxjdbc.connect ("Jdbc:mysql://localhost/sign_cms", "Root", "" "," Com.mysql.jdbc.Driver ")

cursor = Mysqlconn.cursor ()

Cursor.execute ("SELECT * from about")

Cursor.fetchone () | Cursor.fetchall ()

Cursor.close ()

Mysqlconn.close ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.