C#调用java包,报错:“java.lang.StdIO”的类型初始值设定项引发异常

GGL123 GGL123 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
求救:
我在C#里调用java包,
引用到:
IKVM.OpenJDK.Core.dll
IKVM.Runtime.dll
IKVM.Runtime.JNI.dll
还有一个打包好的java包:WsRequestDemo.dll

但是在使用时跳出错误:“java.lang.StdIO”的类型初始值设定项引发异常

具体为:
未处理 System.TypeInitializationException
Message="“java.lang.StdIO”的类型初始值设定项引发异常。"
Source="IKVM.OpenJDK.Core"
TypeName="java.lang.StdIO"
StackTrace:
在 java.lang.System.get_out()
在 java.lang.Class$3.run()
在 java.lang.Class$3.run()
在 java.security.AccessController.doPrivileged(Object , AccessControlContext , CallerID )
在 java.security.AccessController.doPrivileged(PrivilegedAction action, CallerID )
在 java.lang.Class.checkInitted()
在 java.lang.Class.privateGetDeclaredConstructors(Boolean )
在 java.lang.Class.getConstructor0(Class[] , Int32 )
在 java.lang.Class.newInstance0(CallerID )
在 java.lang.Class.newInstance(CallerID )
在 sun.security.jca.ProviderConfig$2.run()
在 sun.security.jca.ProviderConfig$2.run()
在 java.security.AccessController.doPrivileged(Object , AccessControlContext , CallerID )
在 java.security.AccessController.doPrivileged(PrivilegedAction action, CallerID )
在 sun.security.jca.ProviderConfig.doLoadProvider()
在 sun.security.jca.ProviderConfig.getProvider()
在 sun.security.jca.ProviderList.getProvider(Int32 )
在 sun.security.jca.ProviderList.getService(String type, String name)
在 sun.security.jca.GetInstance.getInstance(String type, Class clazz, String algorithm)
在 java.security.Security.getImpl(String , String , String )
在 java.security.MessageDigest.getInstance(String algorithm)
在 com.zht.WsRequestDemo.getMessageDigest(String str1, String str2)
在 WindowsFormsApplication1.Form1.button1_Click(Object sender, EventArgs e) 位置 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs:行号 28
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 WindowsFormsApplication1.Program.Main() 位置 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\projects\WindowsFormsApplication1\WindowsFormsApplication1\Program.cs:行号 18
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException: System.IO.FileNotFoundException
Message="未能加载文件或程序集“IKVM.OpenJDK.Util, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58”或它的某一个依赖项。系统找不到指定的文件。"
Source="IKVM.OpenJDK.Core"
FileName="IKVM.OpenJDK.Util, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58"
FusionLog="=== 预绑定状态信息 ===\r\n日志: 用户 = VSTFS\\Administrator\r\n日志: DisplayName = IKVM.OpenJDK.Util, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58\n (Fully-specified)\r\n日志: Appbase = file:///C:/Documents and Settings/Administrator/My Documents/Visual Studio 2008/projects/WindowsFormsApplication1/WindowsFormsApplication1/bin/Debug/\r\n日志: 初始 PrivatePath = NULL\r\n调用程序集: IKVM.OpenJDK.Core, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58。\r\n===\r\n日志: 此绑定从 default 加载上下文开始。\r\n日志: 未找到应用程序配置文件。\r\n日志: 使用 C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\config\\machine.config 的计算机配置文件。\r\n日志: 策略后引用: IKVM.OpenJDK.Util, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58\r\n日志: 相同的绑定已出现过,因 hr = 0x80070002 而失败。\r\n"
StackTrace:
在 sun.misc.URLClassPath.JarLoader.ensureOpen()
在 sun.misc.URLClassPath.JarLoader..ctor(URL , URLStreamHandler , HashMap )
在 sun.misc.URLClassPath$3.run()
在 sun.misc.URLClassPath$3.run()
在 java.security.AccessController.doPrivileged(Object , AccessControlContext , CallerID )
在 java.security.AccessController.doPrivileged(PrivilegedExceptionAction action, CallerID )
在 sun.misc.URLClassPath.getLoader(URL )
在 sun.misc.URLClassPath.getLoader(Int32 )
在 sun.misc.URLClassPath.access$000(URLClassPath , Int32 )
在 sun.misc.URLClassPath$1.next()
在 sun.misc.URLClassPath$1.hasMoreElements()
在 IKVM.Internal.AssemblyClassLoader.<GetResourcesImpl>d__0.MoveNext()
在 IKVM.Internal.AssemblyClassLoader.<GetResourcesImpl>d__0.MoveNext()
在 IKVM.NativeCode.ikvm.runtime.AssemblyClassLoader.getResources(ClassLoader classLoader, Assembly assembly, String name)
在 ikvm.runtime.AssemblyClassLoader.getResources(ClassLoader , Assembly , String )
在 ikvm.runtime.AssemblyClassLoader.getResources(String name)
在 java.util.ServiceLoader.LazyIterator.hasNext()
在 java.util.ServiceLoader$1.hasNext()
在 java.nio.charset.Charset$1.getNext()
在 java.nio.charset.Charset$1.hasNext()
在 java.nio.charset.Charset$2.run()
在 java.nio.charset.Charset$2.run()
在 java.security.AccessController.doPrivileged(Object , AccessControlContext , CallerID )
在 java.security.AccessController.doPrivileged(PrivilegedAction action, CallerID )
在 java.nio.charset.Charset.lookupViaProviders(String )
在 java.nio.charset.Charset.lookup2(String )
在 java.nio.charset.Charset.lookup(String )
在 java.nio.charset.Charset.defaultCharset()
在 sun.nio.cs.StreamEncoder.forOutputStreamWriter(OutputStream out, Object lock, String charsetName)
在 java.io.OutputStreamWriter..ctor(OutputStream out)
在 java.io.PrintStream..ctor(Boolean , OutputStream )
在 java.io.PrintStream..ctor(OutputStream out, Boolean autoFlush)
在 java.lang.StdIO..cctor()
InnerException:


...全文

相关推荐

基于滑模控制器的模型预测转矩永磁同步电机PMSM控制仿真(Simulink仿真实现)

内容概要:本文围绕基于滑模控制器的模型预测转矩控制策略在永磁同步电机(PMSM)中的应用展开研究,提出一种融合滑模控制强鲁棒性与模型预测控制前瞻优化能力的复合控制方法。通过Simulink搭建完整的PMSM控制系统仿真模型,设计滑模面与预测代价函数,实现对电机转矩的高精度动态调节。该方法有效抑制外部扰动与参数不确定性的影响,提升系统在复杂运行工况下的稳定性和响应性能,并通过对比仿真验证其相较于传统控制策略在转矩波动抑制、抗干扰能力和动态响应速度方面的显著优势。; 适合人群:具备自动控制理论、现代控制方法基础,以及电机驱动系统或电力电子背景的研究生、科研人员及从事电气自动化、新能源电驱系统开发的工程师。; 使用场景及目标:①深入研究滑模控制与模型预测控制的融合机制及其在高性能电机驱动中的实现路径;②开展PMSM高精度转矩控制系统的仿真设计与性能验证;③支撑高水平科研论文撰写、课题申报或工业级控制器的算法预研与原型开发。; 阅读建议:建议结合Simulink仿真模型与相关控制理论资料同步学习,重点掌握滑模面构造、预测模型建立、控制律推导及权重系数整定方法,可通过调整系统参数与扰动工况进行对比实验,深化对非线性控制系统设计原理与优化思路的理解。

程序辅导帮

顶刊复现改进优化反演控制的水面舰艇自适应跟踪控制程序

内容概要:本文档聚焦于“改进优化反演控制的水面舰艇自适应跟踪控制”这一前沿课题,提供一套基于Matlab/Simulink的完整仿真程序体系,系统复现了顶刊级别的先进控制算法。内容涵盖水面舰艇与无人船(USV/AUV/UUV)的动力学建模、路径跟踪、编队控制、围捕协同、自适应控制等核心技术,重点实现了反演控制(Backstepping)、非线性模型预测控制(NMPC)、视线导引律(LOS)、滑模控制、神经网络自适应控制等多种非线性控制策略,并结合KVLCC2等标准船型开展回转试验与Z型操纵仿真实验,具备详尽的代码注释与理论推导。研究进一步拓展至多智能体系统分布式控制、事件触发机制、协同轨迹跟踪等前沿方向,构建了从建模、控制器设计、稳定性分析到仿真实验验证的一体化科研闭环体系。; 适合人群:具备自动控制原理、非线性系统理论基础及Matlab编程能力,从事船舶与海洋工程、无人航行器控制、智能控制算法研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①复现高水平期刊论文中的先进控制算法,提升科研创新能力与论文写作水平;②开展水面/水下无人航行器的轨迹跟踪、编队协同与避障控制仿真研究;③深入掌握反演控制、自适应控制、NMPC等复杂控制方法的设计思想、数学推导与工程实现细节; 阅读建议:建议结合文档提供的参考文献与代码注释,按照目录结构由浅入深系统学习,优先夯实船舶运动建模与基本控制律设计基础,再逐步进阶至多智能体协同与优化控制策略,务必在Matlab/Simulink环境中动手调试运行代码,强化理论与实践的深度融合。

程序辅导帮

弹簧机在手机零件上应用.pdf

制造技术

可小已

垂直行业孵化器在寻找专属的智能匹配算法服务商时,应该通过哪些渠道进行评估?.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

模具零件出货管制作业规范.doc

制造技术

可小已
评论 6
收藏 已收藏
分享
返回顶部
GGL123
C# 111,130 成员 642,541 内容