System.IO.FileNotFoundException: myCSharpDemoCalcworkMyCSh
本文关键字:myCSharpDemoCalcworkMyCSh FileNotFoundException IO System | 更新日期: 2023-09-27 17:49:18
jni4net不生成MyCSharpDemoCalc.j4n.dll。generateProxy说它创建了,但是没有创建文件。因此,我得到System.IO.FileNotFoundException。这是jni4net的bug吗?我使用的版本是0.8.6.0
D:'Temp'jni4net'samples'myCSharpDemoCalc>generateProxies
..'..'lib'jni4net-LGPL-3.0.txt
..'..'lib'jni4net.j-0.8.6.0.jar
..'..'lib'jni4net.n-0.8.6.0.dll
..'..'lib'jni4net.n.w32.v20-0.8.6.0.dll
..'..'lib'jni4net.n.w32.v40-0.8.6.0.dll
..'..'lib'jni4net.n.w64.v20-0.8.6.0.dll
..'..'lib'jni4net.n.w64.v40-0.8.6.0.dll
7 file(s) copied.
jni4net.proxygen - Copyright (C) 2009 Pavel Savara - licensed under GPLv3
will generate JVM mycsharpdemocalc.icalc
will generate JVM mycsharpdemocalc.democalc
proxygen done
compile classes
MyCSharpDemoCalc.j4n.jar
MyCSharpDemoCalc.j4n.dll
csc: file `/nologo' does not exist
compiling usage
D:'Temp'jni4net'samples'myCSharpDemoCalc>run
D:'Temp'jni4net'samples'myCSharpDemoCalc>cd work
D:'Temp'jni4net'samples'myCSharpDemoCalc'work>java -cp jni4net.j-
0.8.6.0.jar; MyCSharpDemoCalc.j4n.jar;。mycalcusagejava线程"main"异常System.IO.FileNotFoundException:
D: ' Temp ' jni4net ' samples ' myCSharpDemoCalc ' ' MyCSharpDemoCalc.j4n.dll工作在net.sf.jni4net.Bridge.LoadAndRegisterAssemblyFromClassLoader(文件汇编文件,ClassLoader, ClassLoader)net.sf.jni4net.Bridge。LoadAndRegisterAssemblyFrom(文件assemblyFile)
在net.sf.jni4net.__Bridge。LoadAndRegisterAssemblyFrom3 (IntPtr __envp,JniLocalHandle __class, JniLocalHandle在net.sf.jni4net.Bridge。LoadAndRegisterAssemblyFrom(本地方法)MyCalcUsageInJava.main (MyCalcUsageInJava.java: 11)
其他人有同样的问题吗?
问题在这里
csc:文件'/nologo'不存在
你必须把DotNet编译器的路径(C:'Windows'Microsoft.NET'Framework64'v4.0.30319在我的情况下)在你的可变环境。