Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 用于在小程序中加载dll的自定义类加载器_Java_Dll_Applet_Classloader - Fatal编程技术网

Java 用于在小程序中加载dll的自定义类加载器

Java 用于在小程序中加载dll的自定义类加载器,java,dll,applet,classloader,Java,Dll,Applet,Classloader,用小程序寻址.dll文件。我正在使用自定义类加载器加载以下.dll文件: 1-类加载器(复制自) 这就是我如何使用这个类加载器: cl = new CustomClassLoader(); ca = cl.findClass("com.DllLoader"); a = ca.newInstance(); 使用自定义类加载器加载.dll背后的动机是,它也将保证卸载,这就是大多数关于.dll加载/卸载问题的答案所建议的。但在我的例子中,loadClassData()(我的类加载器中的一个函数)出现

用小程序寻址.dll文件。我正在使用自定义类加载器加载以下.dll文件:

1-类加载器(复制自)

这就是我如何使用这个类加载器:

cl = new CustomClassLoader();
ca = cl.findClass("com.DllLoader");
a = ca.newInstance();
使用自定义类加载器加载.dll背后的动机是,它也将保证卸载,这就是大多数关于.dll加载/卸载问题的答案所建议的。但在我的例子中,
loadClassData()
(我的类加载器中的一个函数)出现了以下异常:

   loadClassData,Error: com\DllLoader.class (The system cannot find the path specified)
    java.io.FileNotFoundException: com\DllLoader.class (The system cannot find the path specified)
文件的绝对路径显示为:

**C:\Program Files\Mozilla Firefox\com.DllLoader

我想这就是它搜索文件的地方,applet的.jar文件不在这里

若有人能指出我犯的错误或告诉我如何引导浏览器在正确的文件夹中查找类文件,我将不胜感激


附言:请注意,一个答案似乎不能解决这个问题

“以解决小程序的.dll文件加载/卸载问题。”您得到了该线程中提到的
未满足的链接错误
?顺便说一句-如果小程序是使用自由浮动启动的,它几乎肯定会修复该错误。@Andrew Thompson:是的,你是对的,我之前在同一浏览器实例中重新加载小程序时遇到了“UnsatifiedLinkError”。正如我所说,如果“。小程序是使用Java Web Start自由浮动启动的。。”@Andrew Thompson:你是说自定义类加载不会以这种方式工作吗?@Andrew Thompson:实际上,由于许多原因(大部分是非技术原因),我们必须坚持使用小程序,因此,作为一种解决方法,我们现在提供了带有不同DLL的新jar(实际上相同的DLL具有不同的名称),这不是很好,但工作正常。说服团队和(特别是)客户考虑JWS需要时间。我们认为这将是解决方案。但感谢这次讨论,这非常有助于提供与我的团队开始讨论JWS的线索;)
cl = new CustomClassLoader();
ca = cl.findClass("com.DllLoader");
a = ca.newInstance();
   loadClassData,Error: com\DllLoader.class (The system cannot find the path specified)
    java.io.FileNotFoundException: com\DllLoader.class (The system cannot find the path specified)