DelphiXE7 How to call Java Class,jar and other files?

Source: Internet
Author: User

Source Text Address: http://jingyan.baidu.com/article/e4d08ffdb61b040fd3f60d44.html

First, we first download the Java2pas tool on the Internet.

: http://download.csdn.net/detail/zqycn/7791619

: http://download.csdn.net/detail/zhujianqiangqq/8985597

In the second step, open the [Windows menu]--> in the Run box and enter [cmd] to hit enter.

such as:win+r--> input "CMD" and enter.

The third step is to go to the folder where the Java2pas command is located.

such as: My Java2pas placed in the "D:\Documents\ Baidu Cloud synchronization disk \java2pas"

1. In cmd--enter "cd\"--return (this is back to the root directory).

2. Type "D:"-enter (then jump to the D drive).

3. Enter the "CD D:\Documents\ Baidu Cloud Sync Disk \java2pas"-and enter (this is the Java2pas directory).

The fourth step, first we look at Java2pas this command line syntax is what, the simplest form is the following

Java2pas <.class|. jar> [OutputPath]

can be interpreted as

Java2pas (Input) Java file (output) Pas file

For example, my JAVA file is "D:\JAVA\SDK.jar".

1. Skip to "D:\Documents\ Baidu Cloud Sync disk \java2pas".

2. Enter "Java2pas D:\JAVA\SDK.jar D:\JAVA\DelphiPas"

It's very simple, so we can get the pass interface file we want.

The fifth step is to include the generated PAS file in the Delphi use File unit, when Delphi uses the file unit to invoke the Java interface file.

PS: Note that the generated PAS is placed in the current project directory to ensure that the project will be able to find this file at compile time.

Http://www.cnblogs.com/FKdelphi/p/4718305.html

DelphiXE7 How to call Java Class,jar and other files?

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.