System.load()永远不会发生
System.load() never happens
我在一个自签名Java applet上使用System.load(),旧版本的dll加载良好,但我的新版本(即使dll构建良好)不加载,不抛出任何异常,只是停止代码在它的轨道。
你知道是什么原因导致的吗?
这是部署jar文件的html:
<embed id = "IB"
type = "application/x-java-applet"
width = "{$width}"
height = "{$height}"
code = "{$code}"
archive = "{$archive}"
username = "{$username}"
password = "{$password}"
account = "{$customer_ref}"
debug = "{$debug}"
baseweburl = "{$baseweburl}"
webserviceurl = "{$webserviceurl}"
/>
我用来创建Dll文件的c++代码:
标头(javah created)
/*
* Class: i_jni_B
* Method: DeviceOnline
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_i_jni_B_DeviceOnline
(JNIEnv *, jobject);
Cpp文件
JNIEXPORT jboolean JNICALL Java_i_jni_B_DeviceOnline
(JNIEnv *env, jobject)
{
try
{
CDevice* clsDevice = new CDevice();
clsDevice->Initialize();
clsDevice->Release();
return true;
}
catch (System::Exception^ ex)
{
return false;
}
}
你永远不会相信这个解决方案:我在调试模式下使用了Visual Studio。当设置为释放模式时,一切功能完美!
相关文章:
- 为什么是谷神星协方差.计算()似乎永远运行而不返回?
- 密码登录程序将永远循环并显示不正确的结果
- 我想在C++中读取一些多个字符,但它永远不会读取第二个字符
- SFML 碰撞永远不会在我的系统中注册
- 先进先出:一个进程永远不会从管道读取
- 移动构造函数永远不会被调用
- DRD 报告"conflicting load" std::mutex::lock 上的错误
- 程序永远不会进入虚拟析构函数
- numpy.load 给出 ValueError: descr 不是有效的 dtype 描述符:
- 在 *.cpp 文件中实现的 c++ 函数/方法永远不会内联扩展吗?
- 指针永远不会在链表深层复制构造函数中达到 null
- 为什么我的 while 循环永远不会在 C++ 中的数字猜测游戏中结束?
- 类似函数的宏参数名称替换是否保证永远不会发生?
- curl_slist->next 永远不会为空,因此当循环卡住时
- 我应该使用无符号字符而不是 int 来存储永远不会大于 255 的值吗?
- Qt3D:"Mesh is empty, nothing to load"消息
- Java 1.8 本机 System.load 通过 JNI 调用C++产生 TLSv1.如何获取 TLSv1.2?
- cudaMemcpyToSymbol只是挂起,永远不会返回.GPU 处理速度为 100%.代码在 K40 上工作正常,但
- 暂停功能,它永远循环
- System.load()永远不会发生