是否可以使用JNA librabry将映射对象从C返回到Java?

时间:2017-12-21 06:44:37

标签: java jna

想知道是否可以使用JNA librabry将地图对象从C返回到Java?

当我尝试传递来自C'的std::map时并将其映射到java.util.map它会抛出以下错误。

如果您有任何解决方法,请告诉我。

java.lang.IllegalArgumentException: Unsupported return type interface java.util.Map in function calculateWcet
        at com.sun.jna.Function.invoke(Function.java:471)
        at com.sun.jna.Function.invoke(Function.java:323)
        at com.sun.jna.Library$Handler.invoke(Library.java:236)
        at com.sun.proxy.$Proxy92.calculateWcet(Unknown Source)
        at com.x.accent.wcet.plugin.JNA_WCET.calculateWcet(JNA_WCET.java:17)
        at com.x.accent.wcet.plugin.WCETFinder$1.run(WCETFinder.java:70)
        at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726)
        at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:176)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:556)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:137)
        at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

0 个答案:

没有答案