Python tune Java (glue is glue)

Source: Internet
Author: User
Tags java se

Java layman uses Python to tune Java,

First, install the Java Environment (Linux)

1. The first thing to do is download the official website of Jdk,java SE 8 is http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

2 TAR-ZXVF jdk-8u102-linux-x64.tar.gz

3 then we'll create a new directory and move the extracted files to the past.

Mkdir/usr/java

mv./jdk1.8.0_102/usr/java

4 First use Vim to open the/etc/profile file

Vim/etc/profile

5 added at the end of the document

java_home=/usr/java/jdk1.8.0_102

Export JRE_HOME=/USR/JAVA/JDK1.8.0_102/JRE

Export classpath= $JAVA _home/lib: $JRE _home/lib: $CLASSPATH

Export path= $JAVA _home/bin: $JRE _home/bin: $PATH

6. Make the configuration effective: Source/etc/profile

7 Viewing the Java version

Java-version

Two installation Python-related installation packages

# pip Install JPype1

Depend on:

Yum install-y wget gcc gcc-c++ python-devel mysql-devel bzip2 Python-pip

Iii. generating A. class file

Javac-encoding Utf-8 Desedeservice.java

Iv. Call

# create a consistent directory structure based on the explicit directory structure in the. java file and put the. java file in the specified location # Execute javac-encoding utf-8 xxx.java build. class file in the same directory as the. java file " -ea " " -djava.class.path=/data/monitor/src "  = Jpype. Jclass ('com. Desedeservice'= desedeservice ()#  through Service_ Call the corresponding interface function in Java to

Python tune Java (glue is glue)

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.