共查询到20条相似文献,搜索用时 15 毫秒
1.
JNI技术在跨平台电力自动化系统中的应用 总被引:1,自引:0,他引:1
Java的平台无关等优点使它更适合电力系统的软件开发。但目前电力系统的大部分软件都是用C 语言中开发的,如何能将原有程序应用到Java中成为一个值得关注的问题。论文以配电分析软件为例,探讨使用Java本地接口(JNI)改造原有C 程序的可行性和优点,并对Java本地接口技术在电力系统自动化软件中的应用前景进行了展望。 相似文献
2.
The JavaTM Native Interface (JNI) provides a set of mechanisms for implementing Java methods in C or C++. JNI is useful for reusing C and C++ code repositories within Java frameworks. JNI is also useful for real‐time systems, where compiled C/C++ code executes performance‐critical tasks, while Java code executes system control and feature tasks. Available JNI literature concentrates on creating Java proxy classes that allow Java clients to interact with C++ classes. Current JNI literature does not discuss Java proxies for entire C++ inheritance hierarchies; that is the topic of this paper. Our experience in reusing C++ class hierarchies within a Java framework has uncovered a set of useful techniques for constructing Java proxy class hierarchies that mirror their C++ counterparts. This report gives both high level design guidelines and specific programming idioms for constructing Java class hierarchies that serve as proxies for C++ counterparts. We begin by discussing opportunities for reuse within a proxy class hierarchy, as well as problems caused by differences between the Java and C++ approaches to inheritance. The two most significant differences are due to C++ support for invocation of a member function based on the static type of its class, and C++ support for multiple implementation inheritance. Two example C++ class hierarchies provide the basis for a set of sections that present the design guidelines and that codify the programming idioms. This work could serve as the basis for an automatic generator of Java proxy class hierarchies. Copyright © 2000 John Wiley & Sons, Ltd. 相似文献
3.
4.
在Java中访问自动化COM组件 总被引:1,自引:0,他引:1
来社安 《数字社区&智能家居》2006,(11)
与其他编程语言相比,Java有很多优点,尽管如此,你常常希望在你的代码中访问其他语言写的应用或者程序库,尤其是COM组件。标准Java没有对COM提供支持,但是,你可以对自动化COM组件主要是COM组件的Idispatch接口进行封装,然后通过使用Java本地接口(JNI)来访问COM组件。 相似文献
5.
Directives based incremental parallelism is an uncomplicated and expressive parallelisation practice and has led to wide adoption of OpenMP. However, the OpenMP specification does not present a binding for the Java language and the OpenMP threading model finds limited use for GUI (Graphical User Interface) application development. This paper focuses on the study of a semantic interpretation of OpenMP in the context of an object orientated environment. It proposes novel concepts to extend OpenMP for applications with a Graphical User Interface (GUI), based on the distinction between parallelism and concurrency. We present a compiler-runtime system for OpenMP-like directives in Java, enhanced with GUI related constructs. Acknowledging the productivity gains of the incremental parallelism approach of OpenMP, the GUI related constructs enable the developer to incrementally introduce concurrency. We present and discuss the performance of programs written using our system by comparing them with previous attempts and traditional ways of parallelisation-concurrency, using the parallel Java Grande Forum (JGF) benchmarks and a set of GUI applications. 相似文献
6.
7.
8.
Android Java应用程序(APP)运行时需依赖Dalvik虚拟机环境,从而影响APP的性能表现.C/C++程序具有极好的硬件适应能力,但不能直接开发Android APP.针对该问题,利用Dalvik虚拟机支持JNI (Java Native Inter-face)调用的特点,设计了基于Qt的Android APP C/C++开发方法框架体系,给出了框架的详细工作机制和解决方案,系统总结了利用C/C++开发Android APP的主要过程和步骤.最后,以Android版机械CAD导教APP的开发工作为例,验证了方法的有效性和可行性,为直接利用C/C++开发Android APP提供了一种新途径. 相似文献
9.
Convenient use of legacy software in Java with Janet package 总被引:2,自引:0,他引:2
This paper describes Janet package — highly expressive Java language extension that enables convenient creation of powerful native methods and efficient Java-to-native code interfaces. Java native interface (JNI) is a low-level API that is rather inconvenient if used directly. Therefore Janet, as the higher-level tool, combines flexibility of JNI with Java’s ease-of-use. Performance results of Janet-generated interface to the lip library are shown. Java code, which uses lip, is compared with native C implementation. 相似文献
10.
来社安 《数字社区&智能家居》2006,(4):111-112,144
与其他编程语言相比,Java有很多优点,尽管如此。你常常希望在你的代码中访问其他语言写的应用或者程序库.尤其是COM组件。标准Java没有对COM提供支持,但是。你可以对自动化COM组件主要是COM组件的ldispatch接口进行封装,然后通过使用Java本地接口(JNI)采访问COM组件。 相似文献
11.
JPI:基于纯Java语言的异构并行处理支持平台 总被引:4,自引:0,他引:4
针对使用Parallel Virual Machinel(PVM)和MessagePassing Interface(MPI)软件包的解决方案,该软件包用纯Java语言实现了类似于PVM和MPI所提供的任务调度、通信和全局归约操作等方面的功能,基于JPI的并行程序的运行和性能测试表明,JPI不仅解决了并行程序在异构环境中的无缝移植问题,并且能够为包括网络密集型在内的并行程度提供有效的开发、运行支持。 相似文献
12.
针对移动机器人的任务和硬件组成,提出了基于Java 开发平台的Agent控制系统设计方法。以目前应用较广泛的JADE作为Agent开发平台,采用JNI方法实现了Agent与硬件系统的交互。在运动控制卡上设计了有实时性要求的轨迹生成、运动控制、位姿估计和安全控制等4个行为任务,将数据库和路径规划等管理性行为设计在车载PC104工业控制计算机上。人机交互界面可作为独立的Agent驻留在上位监控计算机上。这种方法结合了Java Agent开发平台的普遍性和工业控制的实时性,实验证明了该方法的可行性。 相似文献
13.
本文介绍了如何用Java实现粒子模拟的面向对象的并行程序设计方法,并在由16个Pentium Ⅲ 1.6G CPU组成的微机机群上测试了其性能。同时,为了提高它的计算性能,我们还介绍了利用JNI实现Java和Fortran混合编程的方法,即把程序中计算量较大的部分用Fortran语言代替,以提高其计算性能。结果表明,Java/Fortran混合编程是进行科科学计算的一种有效途径。 相似文献
14.
15.
16.
17.
JNI是JDK提供的本地编程接口,它允许Java代码操作其他语言编写的应用程序和库,但调用本地方法的同时也带来了安全问题.CORBA是一个分布式的、面向对象的应用架构规范,它允许对象在异构的、分布式的环境中透明传输,从而也能实现Java与C/C+ +的互操作.本文比较了JNI和CORBA两种方法的优缺点,并将CORBA应用在一个J2EE架构下的项目中,解决了项目中Java与C/C+ +的交互问题. 相似文献
18.
为克服阅读理解源代码的困难,根据现有的软件开发辅助工具的特点,对源代码导读和管理工具进行了深入的分析和研究.针对业界大量使用的Java语言,设计并实现了一个旨在以Java源代码导读为主、并具代码抽取等分析管理功能的交互式软件开发辅助工具Javigator.作为Eclipse的插件,能帮助开发人员快速地阅读理解Java源程序,并支撑对关注代码的快速测试及代码重用.Javigator使用灵活方便,可明显降低开发中理解及管理源代码的难度,提高开发的效率. 相似文献
19.
Benny Pasternak Shmuel Tyszberowicz Amiram Yehudai 《International Journal on Software Tools for Technology Transfer (STTT)》2009,11(4):273-290
Unit testing plays a major role in the software development process. What started as an ad hoc approach is becoming a common
practice among developers. It enables the immediate detection of bugs introduced into a unit whenever code changes occur.
Hence, unit tests provide a safety net of regression tests and validation tests which encourage developers to refactor existing
code with greater confidence. One of the major corner stones of the agile development approach is unit testing. Agile methods
require all software classes to have unit tests that can be executed by an automated unit-testing framework. However, not
all software systems have unit tests. When changes to such software are needed, writing unit tests from scratch, which is
hard and tedious, might not be cost effective. In this paper we propose a technique which automatically generates unit tests
for software that does not have such tests. We have implemented GenUTest, a prototype tool which captures and logs interobject
interactions occurring during the execution of Java programs, using the aspect-oriented language AspectJ. These interactions
are used to generate JUnit tests. They also serve in generating mock aspects—mock object-like entities, which enable testing
units in isolation. The generated JUnit tests and mock aspects are independent of the tool, and can be used by developers
to perform unit tests on the software. Comprehensiveness of the unit tests depends on the software execution. We applied GenUTest
to several open source projects such as NanoXML and JODE. We present the results, explain the limitations of the tool, and
point out direction to future work to improve the code coverage provided by GenUTest and its scalability. 相似文献