文件名称:Using-C-to-achieve--method
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 742kb
- 下载次数:
- 0次
- 提 供 者:
- pen***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
用C语言实现Java类的本地方法 1. 0目的与意义在用Java开发应用程序的过程中,如果能100 的使用Java,那当然是最好不过了。但是,有时候我们却不得不在Java的应用程序中使用其它语言编写的代码(即本地代码),例如:(1)原来已有大量经过测试的代码,想要直接在Java应用程序中使用,而把这些代码转换成Java代码可能需要大量的时间和财力。(2)有些功能如访问系统设备等,单纯地使用Java语言可能很难实现或根本就无法实现,这时就需要用其它语言来实现这种底层的功能,以综合各种语言的优点。(3)有些核心算法被成千上万地调用,而运行速度对系统来说又非常重要,这时就可能需要使用其它的运行速度更快的语言来实现这些算法。 但是如果在Java应用程序中使用本地代码将失去Java语言的一个显著的优点,即程序的可移植性。也就是说针对应用程序的不同平台需要对本地代码进行重新编译,甚至做一些改动以使本地代码适应于不同的平台。所以在开发Java应用程序的时候应尽量不使用本地代码,除非万不得已的时候。本文只考虑在Windows环境下用C语言来实现本地方法。-Using C language to achieve Java local methods 1 Purpose and significance in Java application development process, if can use Java 100 , that of course is the best. However, sometimes we have to Java applications to use other language code ( i.e. the local code ), for example: ( 1) that has a large number of tested code, want to directly in the Java application, and put the code into Java code may require a lot of time and money. ( 2) some features such as access to system equipment, simply use the Java language can be very difficult to achieve or simply can not be achieved, then the need to use other language to realize this low-level features, to combine various language advantages. ( 3 ) some core algorithm is tens of thousands of calls, and the running speed of system is also very important, you may need to use other faster operation of the language to implement these algorithms. But if in Java applications using native code will lose the Java language a significant advantages, nam
(系统自动生成,下载前可以参看下载内容)
下载文件列表
jexample\javaTocExample.~htm
........\javaTocExample.jpr
........\javaTocExample
........\..............\Factory.~jav
........\..............\worker.dll
........\..............\javaTocExample.dependency
........\..............\main.class
........\..............\Factory.java
........\..............\main.java
........\..............\Worker.~jav
........\..............\main.~jav
........\..............\Worker.java
........\..............\Factory.dll
........\..............\Factory.class
........\..............\Worker.class
........\javaTocExample.html
........\Factory
........\.......\factory.c
........\.......\Factory.opt
........\.......\Factory.dsp
........\.......\javaTocExample_Factory.h
........\.......\Factory.dsw
........\.......\Factory.ncb
........\.......\Debug
........\.......\.....\vc60.idb
........\.......\.....\vc60.pdb
........\.......\.....\Factory.dll
........\.......\.....\Factory.pdb
........\.......\.....\Factory.lib
........\.......\.....\Factory.exp
........\.......\.....\Factory.ilk
........\.......\.....\Factory.pch
........\.......\.....\factory.obj
........\.......\Factory.plg
........\worker
........\......\worker.dsp
........\......\worker.opt
........\......\javaTocExample_Worker.h
........\......\worker.c
........\......\worker.dsw
........\......\worker.ncb
........\......\Debug
........\......\.....\vc60.idb
........\......\.....\vc60.pdb
........\......\.....\worker.pch
........\......\.....\worker.obj
........\......\.....\worker.dll
........\......\.....\worker.lib
........\......\.....\worker.exp
........\......\.....\worker.pdb
........\......\.....\factory.obj
........\......\.....\worker.ilk
........\......\worker.plg
........\javaTocExample.deployment.properties
........\out
........\javaTocExample.~ds
........\javaTocExample.dsk
........\UnnamedPackage.dependency
jexample
........\javaTocExample.jpr
........\javaTocExample
........\..............\Factory.~jav
........\..............\worker.dll
........\..............\javaTocExample.dependency
........\..............\main.class
........\..............\Factory.java
........\..............\main.java
........\..............\Worker.~jav
........\..............\main.~jav
........\..............\Worker.java
........\..............\Factory.dll
........\..............\Factory.class
........\..............\Worker.class
........\javaTocExample.html
........\Factory
........\.......\factory.c
........\.......\Factory.opt
........\.......\Factory.dsp
........\.......\javaTocExample_Factory.h
........\.......\Factory.dsw
........\.......\Factory.ncb
........\.......\Debug
........\.......\.....\vc60.idb
........\.......\.....\vc60.pdb
........\.......\.....\Factory.dll
........\.......\.....\Factory.pdb
........\.......\.....\Factory.lib
........\.......\.....\Factory.exp
........\.......\.....\Factory.ilk
........\.......\.....\Factory.pch
........\.......\.....\factory.obj
........\.......\Factory.plg
........\worker
........\......\worker.dsp
........\......\worker.opt
........\......\javaTocExample_Worker.h
........\......\worker.c
........\......\worker.dsw
........\......\worker.ncb
........\......\Debug
........\......\.....\vc60.idb
........\......\.....\vc60.pdb
........\......\.....\worker.pch
........\......\.....\worker.obj
........\......\.....\worker.dll
........\......\.....\worker.lib
........\......\.....\worker.exp
........\......\.....\worker.pdb
........\......\.....\factory.obj
........\......\.....\worker.ilk
........\......\worker.plg
........\javaTocExample.deployment.properties
........\out
........\javaTocExample.~ds
........\javaTocExample.dsk
........\UnnamedPackage.dependency
jexample