由买买提看人间百态

topics

全部话题 - 话题: jna
(共0页)
c******n
发帖数: 4965
1
来自主题: Java版 - anyone familiar with JNA?
got an exception, can't figure out why it happened:
thanks a lot
INFO 17:48:12,321 Unable to link C library. Native methods will be disabled.
java.lang.UnsatisfiedLinkError: Error looking up function
'$$YJP$$mlockall': java: undefined symbol: $$YJP$$mlockall
at com.sun.jna.Function.(Function.java:179)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:344)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:324)
at com.sun.jna.Native.register(N... 阅读全帖
N******K
发帖数: 10202
2
在开发交互式算法 更不能用java和c++混合 而应该用单一语言 那就是c++ 这样设置
断点差错也方便
比如用 jna或者jni 调用c++库 出现的问题:
JNA does not support mapping of c++ classes, so if you're using c++ library
you will need a jni wrapper
If you need a lot of memory copying. For example, you call one method which
returns you a large byte buffer, you change something in it, then you need
to call another method which uses this byte buffer. This would require you
to copy this buffer from c to java, then copy it back from java to c. In
this case jni w... 阅读全帖
r******g
发帖数: 691
3
来自主题: Military版 - 风华不再
南联盟人民军(JNA)军歌
南斯拉夫联盟国歌
和铁托元帅在一起
五一劳动节歌
r*****y
发帖数: 264
4
来自主题: Java版 - anyone familiar with JNA?
dll在path里么?
d****i
发帖数: 4809
5
来自主题: Java版 - 请问hadoop hive调用jni的问题
前几天刚发现一个Java Native Access(JNA),貌似比JNI方便一些:
http://en.wikipedia.org/wiki/Java_Native_Access

peking2
d****i
发帖数: 4809
6
这个来自Red Hat的礼物提供了除了JNI, JNA之外的第三种Java和Native Code之间的桥
梁。
http://www.javaworld.com/article/2364511/project-panama-builds-
N***m
发帖数: 4460
7
来自主题: Programming版 - java小问题
正在学习JNA library,测试了一下
计算sum_i sin(i)的值,i=0,2000000。
分别调用c library和java自己的数学库。
结果如下:
using c function
result = 0.5520835778318177 | elapsed time = 5.188 seconds
using java function
result = 0.5520835778317068 | elapsed time = 0.718 seconds
为什么会差这么多?那大家要是平时需要快速计算结果的情况下,如何
把c++程序和java结合?
===========================================================
public class A {


public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)
... 阅读全帖
l******e
发帖数: 12192
8
来自主题: Programming版 - java小问题
jna本来就有overhead
d****i
发帖数: 4809
9
来自主题: Programming版 - vert.x 基本上没戏
可以用JNI或者JNA来调用非JVM语言。
d****i
发帖数: 4809
10
来自主题: Programming版 - 不要小看js
This is not a problem for Node at all. JavaScript is already super fast now
thanks to V8. For applications where you really need bare-metal performance,
you can use node-fft to call native libraries written in C/C++ easily,
pretty much like what JNI and JNA does for Java.
https://www.npmjs.com/package/node-ffi

actually
d****i
发帖数: 4809
11
来自主题: Programming版 - 新手请教Java数组问题
Then you should leave it as a C++ lib and give the so file to the Java folks
to call it via JNI or JNA. Pretty easy and straightforward.
d****i
发帖数: 4809
12
来自主题: Programming版 - akka能和C++程序通信吗?
If you don't want to have any overhead of IPC, then JNI is the best bet, or
if you don't want to write JNI wrapper function, then JNA (Java-Native-
Access) is an alternative way. Of course, there is SWIG to connect C/C++
with any other high level languages including Java:
http://www.swig.org/index.php
You may use that too. Also there are some ongoing effort by RedHat people to
make the C++<->Java bridge easier, called "Project Panama", but I haven't
tried that.
s****2
发帖数: 4569
13
来自主题: Chemistry版 - 急问!在线等!感谢
google: using acoustic AC mode AFM (AAC Mode AFM). The electrochemical
oxidation of these TBA sequences has been also performed by
http://www.sage-hindawi.com/journals/jna/2010/841932.html
jsut above: 2. Experimental
(共0页)