Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Java application and non-JNI standard binary file mutual calling method

A binary file and java application technology, applied in the direction of binary to binary, program control design, program control device, etc., can solve problems such as difficult implementation, complicated methods, inability to call non-JNI-standard files, etc., and achieve the goal of solving the problem of mutual calling Effect

Inactive Publication Date: 2017-12-01
SHANDONG CHAOYUE DATA CONTROL ELECTRONICS CO LTD
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In addition, the binary files can also be classified according to the following categories: that is, they contain class member functions and do not contain class member functions. For binary files containing class member functions, a combination of dlopen() and dlsym() is currently used to call , but this method is complicated and difficult to implement, therefore, it is particularly important to find a non-JNI-standard binary file for calling a class member function in the prior art
[0005] C++ functions can directly call non-JNI files containing class member functions, that is, the JNI standardization of CPP files called by C++ functions and non-JNI-standard binary files, but using C++ in the java environment cannot call non-JNI-standard files

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Java application and non-JNI standard binary file mutual calling method
  • Java application and non-JNI standard binary file mutual calling method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] A method for mutually invoking a Java application and a non-JNI specification binary file, comprising:

[0031] Determine whether the binary file is a JNI specification binary file: if it is a JNI specification binary file, write a JNI specification function call file; if it is a non-JNI specification binary file, perform JNI standardization on the binary file, and further write the JNI normalized function call file.

[0032] The steps of JNI normalization are as follows:

[0033] (1) Create a Java application project: declare the calling method to the binary file, and add the support of the local method to the Java application project, and the project generates a jni package;

[0034] (2) The .h header file is compiled under the terminal, and the JNI standardized CPP file is written according to the .h header file. The function naming in the CPP file conforms to the JNI specification, realizes the calling of the binary file, and interacts with the Java layer;

[0035...

Embodiment 2

[0043] A method for mutual calling of a Java application and a non-JNI standard binary file as described in Embodiment 1, the difference is that the method for mutual calling of a Java application and a non-JNI standard binary file includes, judging whether the non-JNI standard binary file It is a non-JNI standard binary file that contains class member functions: if it is a non-JNI standard binary file that contains class member functions, then JNI standardizes the binary file, and writes the non-JNI standard binary files that contain class member functions to call each other file; if it is a non-JNI standard binary file that does not contain class member functions, then the binary file JNI is standardized, and writes a file that does not contain the non-JNI standard binary files that class member functions call each other.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

A Java application and non-JNI standard binary file mutual calling method comprises the following steps: judging whether a binary file is a JNI standard binary file or not; if the binary file is the JNI standard binary file, writing a JNI standard function calling file; and if the binary file is a non-JIN standard binary file, carrying out JNI standardizing on the binary file, and further writing a JNI standardized function calling file. By the design, non-JNI standard binary file calling of a Java application to a function including class members is realized, mutual calling of functions under different platforms is implemented, and seamless engagement of direct calling of the functions is realized. The design is also suitable for a non-JNI standard binary file and a JNI standard binary file of functions which do not contain class members on a Java layer. In addition, the Java application and non-JNI standard binary file mutual calling method is also suitable for an Android Studio development platform, and is a universal scheme for various platforms.

Description

technical field [0001] The invention relates to a method for mutually invoking a Java application and a non-JNI standard binary file, and belongs to the technical field of computer technology applications. Background technique [0002] There are more and more cross-platform development technologies, and how to realize the mutual calling of files under different platforms needs to be solved urgently. Java application development is one of the three major development technologies at present. [0003] Binary files are a common handover method for cross-platform development, but binary files are divided into JNI specification binary files and non-JNI specification binary files. Among them, for JNI specification binary files, the Java layer can realize the call of the file through JNI layer conversion, while It cannot be called for non-JNI specification binaries. [0004] In addition, the binary files can also be classified according to the following categories: that is, they c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/44G06F9/45
CPCG06F8/52G06F8/10G06F8/311G06F8/44
Inventor 张芳庆马双涛陈亮甫孙超王朝晖
Owner SHANDONG CHAOYUE DATA CONTROL ELECTRONICS CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products