首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 109 毫秒
1.
本文利用JNI技术使Java与C/C++的DLL进行信息通信和调用,实现了在JAVA中对系统进程的访问。  相似文献   

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

3.
为了解决客户端朋艮务器方式下的基于Oracle数据库的信息系统中客户端体积过大的问题,文中总结了3种不用在客户端安装Oracle客户端的数据库访问方法:基于JNI的数据库调用、基于Web Service的数据库调用和基于OCI的数据库调用。并对这几种方法进行了一些比较,得出了这几种方法的一些优点和缺点。  相似文献   

4.
介绍了Java本地接口方法JNI,重点讨论了利用JNI调用C/C++动态联接库,实时监控系统中硬盘、内存、CPU等资源的运行状态的方法,实现了Java与C/C++的互操作.同时,通过在WebService服务中调用JNI方法,提取Web Service的远程调用功能.在网格环境中,构建了基于GMA的监控系统模式,并给出了该系统的具体实现方法.通过理论分析和具体应用证实了该系统的有效性.  相似文献   

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

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

7.
JNI技术支持Java与本地C/C++的相互调用,在Android等混合语言实现的系统中有着广泛应用,但语言之间的安全特性差异使其成为安全薄弱环节,现有的分析方法难以处理多语言相互调用产生的安全缺陷.以JNI调用中易产生的内存泄漏为例,开展Java/C++JNI跨语言分析的研究.采用扩展的Java Bytecode(Bytecode*)指令作为C++语义的解释来消除跨语言分析的障碍.围绕JNI调用中内存泄漏的问题,做了以下3方面工作:1)定义兼容Java/C++语言的分块内存模型;2)基于LLVM/LLJVM,设计实现了C++到Bytecode*的翻译策略;3)建立方法调用图,提取方法摘要,利用过程间分析方法检测JNI调用中的内存泄漏.针对具有典型内存泄漏特征的JNI实例翻译检测表明,该工作能够准确检测出Java/C++混合语言中的内存泄漏,对于JNI混合语言编程的理解和漏洞分析具有重要价值.  相似文献   

8.
CORBA技术在测控数据管理系统的应用   总被引:1,自引:0,他引:1  
对在测控数据管理系统中需要大量用到电子信息领域专业知识的问题,提出利用CORBA技术调用MATLAB已有的电子信息工程函数模块来简化系统开发工作.系统使用JAVA语言进行开发以实现B/S架构,利用CORBA跨语言跨平台的特性实现了在JAVA语言中对MATLAB运算引擎的调用,并与传统调用方法JNI进行了时比分析,最后利用CORBA分布式特性构造了一个服务器集群以提高系统处理速度.实践证明CORBA提高了系统开发效率,优化了系统设计.  相似文献   

9.
瘦客户端的Oracle数据库连接技术研究   总被引:1,自引:0,他引:1  
为了解决客户端/服务器方式下的基于Oracle数据库的信息系统中客户端体积过大的问题,文中总结了3种不用在客户端安装Oracle客户端的数据库访问方法:基于JNI的数据库调用、基于Web Service的数据库调用和基于OCI的数据库调用。并对这几种方法进行了一些比较,得出了这几种方法的一些优点和缺点。  相似文献   

10.
ActiveX控件为Windows平台下的一种构件模型,具有良好的封装性和复用性。探讨了ActiveX控件在Java程序中的应用,通过JNI技术作为桥梁,以同位体的方法实现了GUI界面管理,通过JNI本地化方法实现了ActiveX控件方法调用与属性设置,以及使用代理模式实现应用Java代码来处理ActiveX控件的事件。经实际项目验证,所提出的方法可行且具有借鉴意义。  相似文献   

11.
A message-passing class library C++ for portable parallel programming   总被引:1,自引:1,他引:0  
An object-oriented message-passing class library in C++, called PPI++, for portable parallel programming has been developed. PPI++ (parallel portability interface in C++) is designed to serve as a stable (unchanging) interface between the client parallel code and the rapidly evolving distributed computing environments. By taking advantage of encapsulation, inheritance, and polymorphism supported by C++, PPI++ provides a clean and consistent programming interface, which helps improve the clarity and expressiveness of client parallel codes and hides implementation details and complexity from the user to ease parallel programming tasks. In addition, the use of strong type-checking in C++ allows the detection of potential misuses of the library at compile time, and thus promotes code reliability. This paper describes the object-oriented design and implementation of PPI++. Evaluation of PPI++ on important performance issues, such as portability, ease-of-use, extensibility, and efficiency, is also discussed.  相似文献   

12.
用 JAVA代码实现了客户机和服务器双向身份认证 ,通过以后 ,客户机通过自己数字证书自动登录。  相似文献   

13.
java.net中包含了网络通信所需要的类,文中主要阐述了使用JAVA编程语言对基于客户/服务器模式的应用编写网络通信程序,讨论了SOCKET机制的原理,重点介绍Java中输入输出流的概念以及程序实现代码。  相似文献   

14.
Two kinds of interface contract violations can occur in component-based software: A client component can fail to satisfy a requirement of a component it is using, or a component implementation can fail to fulfill its obligations to the client. The traditional approach to detecting and reporting such violations is to embed assertion checks into component source code, with compile-time control over whether they are enabled. This works well for the original component developers, but it fails to meet the needs of component clients who do not have access to source code for such components. A wrapper-based approach, in which contract checking is not hard-coded into the underlying component but is "layered" on top of it, offers several relative advantages. It is practical and effective for C++ classes. Checking code can be distributed in binary form along with the underlying component, it can be installed or removed without requiring recompilation of either the underlying component or the client code, it can be selectively enabled or disabled by the component client on a per-component basis, and it does not require the client to have access to any special tools (which might have been used by the component developer) to support wrapper installation and control. Experimental evidence indicates that wrappers in C++ impose-modest additional overhead compared to inlining assertion checks.  相似文献   

15.
随着计算机技术以及各软件应用的开发,其已经逐步成为我们日常生活以及各企业工厂开发生产中的一个重要工具。而目前在软件开发与应用上仍存在着一些问题,软件开发方式也急需改变。为此,本文在设计模式下计算机的基础下进行研究,提出计算机软件总线的思想,采用CORBA作为主要标准,构造计算机软件总线的体系以及开发思想,并且设计出在整体结构当中各个模块所实行的功能。实现应用JAVA和C 语言编写客户端以及服务器之间的通信构成,最后进行该思想改进后计算机跨语言通信实际检测,检测结果良好,具有很强的通信效果和对于软件以往问题的解决。  相似文献   

16.
数据库连接池化技术及其JAVABEAN实现   总被引:2,自引:0,他引:2  
构造数据库连接池可以显著改善连入数据库的速度 ,而且可以跟踪连接的状态 ,为分析系统的运行状态提供参考 ,用 Java Bean组件封装的数据库的连接池提供了友好的用户接口 ,使 Web应用程序的开发大大加快 ,减少了维护代码的成本。给出了在以 JAVA技术构建的基于数据库的 Web应用系统中数据库连接池的简要JAVABEAN实现。  相似文献   

17.
一般金属蠕变试验有温度高、周期长的局限,运用JBuilder、JAVA 3D、VRML和3DS MAX等为主要开发工具,设计开发金属蠕变虚拟试验系统.该系统基于三层C/S结构,主要由三维试验场景与GUI用户界面组成的客户端、应用服务层以及后台数据库服务器管理程序组成.具有虚拟场景形象逼真、动态组合、实时保存和虚拟实验的交互性强、操作简便、动态扩充等特点,为理工科学生和一般工程技术人员学习、研究和应用蠕变试验,提供了快速高效的辅助工具.  相似文献   

18.
Active libraries can be defined as libraries which play an active part in the compilation, in particular, the optimisation of their client code. This paper explores the implementation of an active dense linear algebra library by delaying evaluation of expressions built using library calls, then generating code at runtime for the compositions that occur. The key optimisations in this context are loop fusion and array contraction.Our prototype C++ implementation, DESOLA, automatically fuses loops arising from different client calls, identifies unnecessary intermediate temporaries, and contracts temporary arrays to scalars. Performance is evaluated using a benchmark suite of linear solvers from ITL (Iterative Template Library), and is compared with MTL (Matrix Template Library), ATLAS (Automatically Tuned Linear Algebra) and IMKL (Intel Math Kernel Library). Excluding runtime compilation overheads (caching means they occur only on the first iteration), for larger matrix sizes, performance matches or exceeds MTL; when fusion of matrix operations occurs, performance exceeds that of ATLAS and IMKL.  相似文献   

19.
SCA因解决了组件的标准化和装配问题而受到广泛关注,但是目前大多数SCA应用都是基于Tuscany Java容器而非Tuscany C++容器的,Tuscany C++容器只提供了基于Axis2C的低效率的Web服务绑定(WS-Binding)。为了解决低效率的通信问题,本文研究了如何扩展Tuscany C++的SCA-Binding实现基于TUXEDO通信协议的专用绑定(ATMI-Binding)方案。在客户端实现基于ATMI的引用绑定(Reference Binding),使SCA客户端访问TUXEDO服务;在服务端实现基于ATMI的服务绑定(Service Binding),使TUXEDO客户端访问SCA服务;在服务和客户两端同时实现ATMI-Binding,就使得SCA客户端以高效的TUXEDO协议访问SCA服务。通过相同环境下的对比实验表明,ATMI-Binding的通信效率比WS-Binding提高了150%。本文最后给出了一个在复杂银行系统中应用ATMI-Binding和其他各种Binding的例子以证明该方案的可行性。  相似文献   

20.
Distributed middleware technologies, such as CORBA can enable finite element software to be used in a more flexible way. Adding functionality is possible without the need for recompiling client code. Applications and libraries can expose their functionality to other applications in a language neutral way, enabling a more direct and easy transfer of data, without the need for intermediate input and output files. The CORBA software components can be easily configured and distributed transparently over the network. A sample structural mechanics code, implemented in C++ is used to illustrate these concepts. Some future directions, such as placing CORBA enabled finite element software on HPC centres are also discussed.  相似文献   

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

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