首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
JNI技术在跨平台电力自动化系统中的应用   总被引:1,自引:0,他引:1  
赵楠  何光宇 《计算机工程与应用》2005,41(17):203-205,232
Java的平台无关等优点使它更适合电力系统的软件开发。但目前电力系统的大部分软件都是用C 语言中开发的,如何能将原有程序应用到Java中成为一个值得关注的问题。论文以配电分析软件为例,探讨使用Java本地接口(JNI)改造原有C 程序的可行性和优点,并对Java本地接口技术在电力系统自动化软件中的应用前景进行了展望。  相似文献   

2.
Dale Parson  Zhenyu Zhu 《Software》2000,30(15):1641-1660
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.
改进的Java类文件保护方法   总被引:1,自引:1,他引:0       下载免费PDF全文
编译后的Java类文件很容易被反编译,在Java应用上会产生源代码的安全问题。该文对传统的Java类文件保护方法进行分析,在类加载器(ClassLoader)加密技术的基础上,提出一种使用JNI技术调用本地解密接13的改进方法。解密接口在设计上保证了JNI技术调用本地解密接口时的通信安全,从而提升了Java类文件的安全性。实验结果表明,该方法是有效的。  相似文献   

4.
在Java中访问自动化COM组件   总被引:1,自引:0,他引:1  
与其他编程语言相比,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.
基于JNI的跨平台软件设计   总被引:12,自引:3,他引:9  
在研究了JN的机理和实现方法的基础上,提出了利用Java语言的体系结构元关性和JNI的一致兼容性的特点.实现跨平台软件设计的系统开发思想,并以Java调用的C7语言方法为例,着重讨论了Unix/Linux/Windows平台的实现方法。  相似文献   

7.
通过Java调用本地方法   总被引:1,自引:0,他引:1  
Java是纯面向对象的语言,是当前最流行的编程语言之一。在对程序执行效率要求更高,或需要调用已有的非Java库,或调用Java类库未提供但可用其他语言实现的接口时,需要用到本地方法。分析了从Java调用本地方法的意义;各种调用本地方法的方案及其适用环境;剖析了JNI的原理和结构,给出详细的实现步骤,并说明使用JNI带来的问题。  相似文献   

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.
与其他编程语言相比,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控制系统设计   总被引:1,自引:0,他引:1       下载免费PDF全文
针对移动机器人的任务和硬件组成,提出了基于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.
基于Java的企业应用集成技术   总被引:4,自引:0,他引:4  
探讨了基于Java技术的EAI解决方案,包括利用JNI实现EAI,利用分布式企业通信范型解决EAI问题,以及利用JMS,XML,J2EE连接程序实现EAI等。  相似文献   

15.
提出一种Java与OpenCV结合实现的目标检测模块,详细讲述了利用JNI技术调用OpenCV目标检测方法的具体步骤和关键过程。该模块可很容易地与科研、工业等领域的Java视频系统集成。实验结果表明,集成了该模块的Java视频系统获得了较高的检测率和处理速度。  相似文献   

16.
在介绍Proxy设计模式和JNI编程规范的基础上,着重探讨了在重用原有代码中将Pmxy模式结合到JNI中,从而解决了在Java代码中连接native数时由于函数型构不一致而引起的必须修改原有代码的问题,具有较普遍的意义。  相似文献   

17.
JNI是JDK提供的本地编程接口,它允许Java代码操作其他语言编写的应用程序和库,但调用本地方法的同时也带来了安全问题.CORBA是一个分布式的、面向对象的应用架构规范,它允许对象在异构的、分布式的环境中透明传输,从而也能实现Java与C/C+ +的互操作.本文比较了JNI和CORBA两种方法的优缺点,并将CORBA应用在一个J2EE架构下的项目中,解决了项目中Java与C/C+ +的交互问题.  相似文献   

18.
为克服阅读理解源代码的困难,根据现有的软件开发辅助工具的特点,对源代码导读和管理工具进行了深入的分析和研究.针对业界大量使用的Java语言,设计并实现了一个旨在以Java源代码导读为主、并具代码抽取等分析管理功能的交互式软件开发辅助工具Javigator.作为Eclipse的插件,能帮助开发人员快速地阅读理解Java源程序,并支撑对关注代码的快速测试及代码重用.Javigator使用灵活方便,可明显降低开发中理解及管理源代码的难度,提高开发的效率.  相似文献   

19.
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.  相似文献   

20.
黄佳  胡钢  张富  张宇翔 《微处理机》2013,34(2):65-67,72
为了满足移动用户对智能终端更高的需求,开发了基于Android平台的调频广播系统。在研究嵌入式调频广播系统硬件设计的基础上,重点介绍了Android系统内核层驱动程序、硬件抽象层(HAL)接口及Java本地调用(JNI)函数的设计和Eclipse环境中应用程序的开发,实现了调频广播系统搜台、播放和切换频道等功能。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号