We're using IKVM to convert our *.jar to dll that we using to migrate our code to C# with Mono.. We have a problem especially when working with jar contains a JNI call, expl JnativeHook, its make an error when we try to convert it using IKVM, i have reported the error to the author as the follow:
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)
The response from the author:
>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).
As you can see the author has respond with a few words without giving us a solution..
What i understand is the embedded Dll make the error, in fact IKVM does not know how to work with it(inside the JAR)...
there is some suggestions to solve this problem?
PS: what does mean Fixed in cvs
?
Thank you.