Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的 .Net 应用程序中使用 net.sf.jni4net。
调用时:
Bridge.CreateJVM(bridgeSetup);
当分配的内存太大时,在调试输出中我可以看到消息:
无法为 1048576KB 对象堆保留足够的空间。
我的 .Net 应用程序崩溃。我想捕获该错误并使用 nlog 将消息写入我的日志文件。
我怎样才能做到这一点?