首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 125 毫秒
1.
Java是非常重要的编程语言之一,其发展了C++语言的优点,并将很多编程语言中的缺点予以剔除,达到了很好地编程效果.在Java程序开发过程中,依然需要对数据库和框架予以高效应用.基于此,本文就Java程序开发数据库与框架应用进行分析,以供参考.  相似文献   

2.
杨小华 《程序员》2004,(12):114-121
本文为在32位Windows平台上实现Java本地方法提供了实用的示例、步骤和准则。本文中的示侧使用Sun公司的Java Development Kit(JDK)版本1.42。甩C++语言编写的本地代码是用Microsoft Visual C十+6.0编译器编译生成。规定在Java程序中funcdon/method称为方法,在C++程序中称为函数。  相似文献   

3.
周强  乐小虬  李曦 《微机发展》2013,(2):170-172,176
DocFetcher是一个用Java语言编写的优秀开源桌面搜索工具,该工具支持的文档格式有PDF、Word、PowerPoint等。作者对DocFetcher进行了剪裁,编写了创建索引和检索索引程序。e划通是用Visual C++开发的,为了在e划通中集成DocFetcher,就需要采用C语言调用Java的技术(Java Native Interface,简称JNI)来实现。文中首先介绍了JNI,接着对该桌面搜索工具JNI中C部分的程序进行了说明,分为三部分,即创建Java虚拟机、创建索引、检索索引,文中列出了主要的程序代码,并且进行了详细说明。现在,该桌面搜索工具应用在e划通2.5完全版中,功能使用正确,运行稳定。采用JNI作为数据交换的桥梁,会给软件的实现带来极大的灵活性。C语言可以在完全体现自身优势的情况下,整合Java语言开发的软件,更大范围地实现了软件重用。  相似文献   

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

5.
Java编程语言是一种吸收C++语言精华后的产物,具有平台独立性、可移植性、面向对象和多线程等基本特征,是目前计算机软件开发的首选编程工具。应用Java编程语言开发计算机软件时,会应用Java Database Connectivity技术、Java Annotation技术、Java Remote Method Invocation技术等。在这些技术的支持下,Java编程语言可实现Android(安卓)程序开发、多平台软件编写和各类图形、图像的调用。  相似文献   

6.
Java属于一门面向对象的编程语言,具有面向对象、健壮以及跨平台等功能特征。Java语言的编程思想模拟了人们的思维方式,吸收了C++语言的优点。近几年,Java广泛应用于移动开发领域。基于此,详细探究Java语言在手机中的结合运用,分别从三个方面阐述,即Java语言在手机程序中的运用、浏览器游戏开发及应用、Java语言的手机加解密软件开发。  相似文献   

7.
选择Java和C两种语言分别实现上层软件和底层软件的编程,通过JNI技术在Java中调用C实现Java和C通信,并采用对象封装的方法解决复杂输入参数传递的问题.在一项目中进行了成功的应用,并详细描述了实现过程.  相似文献   

8.
本文通过具体实例,详细说明了如何利用JNI在Java中实现C语言编写的本地方法,以及本地方法中如何处理Java的变量等主要内容,具有一定的实用价值。  相似文献   

9.
通过JNI(Java Native Interface,Java本地程序接口)技术架构开发应用程序,可以帮助开发人员实现利用Java语言难以实现的操作,也可以提高程序运行的效率。本文介绍了JNI技术的基础知识,通过一个示例程序介绍在JBuilder中通过JNI技术实现Java程序调用VC编写的动态链接库。  相似文献   

10.
Java本地调用接口(Java native interface,JNI)机制被广泛应用在移动应用开发领域.JNI机制中JNI接口函数被用于在本地代码中解析和转换Java端的数据类型和Java对象.然而,JNI接口函数的调用开销影响了程序运行的效率,其复杂的使用规范也是集成与复用第三方本地组件时的主要障碍.提出一种基于跨语言对象迁移策略的复合本地对象模型,能够实现有效减少本地调用程序中的JNI接口函数调用开销和有效利用已有本地组件的目的.详细讨论了复合本地对象的语言特性及其具体实现,并给出跨语言对象迁移规范以及开发实例.在Dalvik虚拟机中实现了该模型,通过实验证明该策略和模型能够有效改善JNI机制的不足.  相似文献   

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

12.
基于JNI的跨平台软件设计   总被引:12,自引:3,他引:9  
在研究了JN的机理和实现方法的基础上,提出了利用Java语言的体系结构元关性和JNI的一致兼容性的特点.实现跨平台软件设计的系统开发思想,并以Java调用的C7语言方法为例,着重讨论了Unix/Linux/Windows平台的实现方法。  相似文献   

13.
A Foreign Function Interface (FFI) allows one host programming language to interoperate with another foreign language. It enables efficient software development by permitting developers to assemble components in different languages. One typical FFI is the Java Native Interface (JNI), through which Java programs can invoke native-code components developed in C, C++, or assembly code. Although FFIs bring convenience to software development, interface code developed in FFIs is often error prone because of the lack of safety and security enforcement. This paper introduces a static-analysis framework, TurboJet, which finds exception-related bugs in JNI applications. It finds bugs of inconsistent exception declarations and bugs of mishandling JNI exceptions. TurboJet is carefully engineered to achieve both high efficiency and accuracy. We have applied TurboJet on a set of benchmark programs and identified many errors. We have also implemented a practical Eclipse plug-in based on TurboJet that can be used by JNI programmers to find errors in their code.  相似文献   

14.
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提供了一种新途径.  相似文献   

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

16.
移动机器人Java Agent控制系统设计   总被引:1,自引:0,他引:1       下载免费PDF全文
针对移动机器人的任务和硬件组成,提出了基于Java 开发平台的Agent控制系统设计方法。以目前应用较广泛的JADE作为Agent开发平台,采用JNI方法实现了Agent与硬件系统的交互。在运动控制卡上设计了有实时性要求的轨迹生成、运动控制、位姿估计和安全控制等4个行为任务,将数据库和路径规划等管理性行为设计在车载PC104工业控制计算机上。人机交互界面可作为独立的Agent驻留在上位监控计算机上。这种方法结合了Java Agent开发平台的普遍性和工业控制的实时性,实验证明了该方法的可行性。  相似文献   

17.
基于Socket的异构形平台的网络通信研究   总被引:2,自引:0,他引:2  
介绍了如何在C/C++和Java两种不同平台上进行网络套接字通信,并结合移动行业自助服务通信系统工程实例研究了两种平台Socket通信的不同以及通信中的一些关键注意问题。  相似文献   

18.
在分析JNI技术框架的基础上,通过实例展示了一种如何实现Java与C++之间通信的方法。实践证明,该方法具有较高的实用价值。  相似文献   

19.
本文介绍了如何用Java实现粒子模拟的面向对象的并行程序设计方法,并在由16个Pentium Ⅲ 1.6G CPU组成的微机机群上测试了其性能。同时,为了提高它的计算性能,我们还介绍了利用JNI实现Java和Fortran混合编程的方法,即把程序中计算量较大的部分用Fortran语言代替,以提高其计算性能。结果表明,Java/Fortran混合编程是进行科科学计算的一种有效途径。  相似文献   

20.
本文介绍了Java和OPC相结合的技术,并以连接到OPC报警与事件服务器为例,介绍了用Java/JNI技术编写OPC客户端应用程序的详细过程。  相似文献   

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

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