0
我們使用IKVM將我們的* .jar轉換爲dll,我們使用它將我們的代碼遷移到C#單聲道.. 我們有一個問題,特別是與罐子工作時包含了JNI調用,EXPL JnativeHook,它使一個錯誤,當我們嘗試轉換使用IKVM它,我已報告的錯誤給筆者的如下:如何轉換* .jar,其中包含本地調用DLL(單聲道C#)
I'm trying to use JnativeHook.jar library, its work for my java apllications, However:
Not: JnativeHook its a cross-platform containes 3 .dll depends on the OS when the java application is running (dynamic loading of *.dll)...
JnativeHook.jar containes also a package(demo) that containes a main classe, i have solved this problem by deleting this one, now i'm sure that will be converted to dll...
finally, when i try to convert this one to .dll i get this error:
C:\Users\marwen\Desktop\Kid protector\Tools and IDE\ikvmbin-7.2.4630.5\bin>ikvmc JNativeHook.jar
IKVM.NET Compiler version 7.2.4630.5
Copyright (C) 2002-2012 Jeroen Frijters
http://www.ikvm.net/
note IKVMC0002: Output file is "JNativeHook.dll"
*** INTERNAL COMPILER ERROR ***
PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE
System.UnauthorizedAccessException: L'accès au chemin d'accès 'C:\Users\marwen\Desktop\Kid protector\Tools and IDE\ikvmbin-7.2.4630.5\bin\JNativeHook.dll' est refusé.
à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
à System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, Str
ing msgPath, Boolean bFromProxy)
à System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
à System.IO.FileStream..ctor(String path, FileMode mode)
à IKVM.Reflection.Writer.ModuleWriter.WriteModule(StrongNameKeyPair keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds fileKind, PortableExecutableKinds portableExecutableKind, Ima
geFileMachine imageFileMachine, ResourceSection resources, Int32 entryPointToken, Stream stream)
à IKVM.Reflection.Emit.AssemblyBuilder.SaveImpl(String assemblyFileName, Stream streamOrNull, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine)
à IKVM.Reflection.Emit.AssemblyBuilder.Save(String assemblyFileName, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine)
à IKVM.Internal.CompilerClassLoader.Save()
à IKVM.Internal.CompilerClassLoader.Compile(String runtimeAssembly, List`1 optionsList)
à IkvmcCompiler.Compile(String[] args)
à IkvmcCompiler.Main(String[] args)
從響應作者:
>Comment By: Jeroen Frijters (jfrijters)
Date: 2013-02-12 03:28
Message:
Thanks. Fixed in cvs. BTW, the error is because ikvmc can't write to
JNativeHook.dll (probably because you don't have write access to the
directory).
正如你可以看到作者已經迴應幾個瓦特ORDS沒有給我們一個解決方案..
我的理解是嵌入式DLL的做出錯誤的,其實IKVM不知道如何使用它(的JAR內)...
有一些建議解決這個問題? PS:什麼意思Fixed in cvs
? 謝謝。
CVS是一個源代碼管理系統。作者讓你知道代碼已被修復(但不一定會發布)。他還告訴你他認爲問題的根源是什麼 – Perception 2013-02-13 12:29:36