Java 找不到或无法打开PDB文件Visual studio 2012

Java 找不到或无法打开PDB文件Visual studio 2012,java,c++,jar,jvm,java-native-interface,Java,C++,Jar,Jvm,Java Native Interface,我正在尝试从C运行jar文件++ 我写了这段代码: #include "stdafx.h" #include <iostream> #include <strsafe.h> #include <stdexcpt.h> #include "jni.h" #include <conio.h> #include <Windows.h> using namespace std; #pragma comment (lib,"C:\\Users\

我正在尝试从C运行jar文件++

我写了这段代码:

#include "stdafx.h"
#include <iostream>
#include <strsafe.h>
#include <stdexcpt.h>
#include "jni.h"
#include <conio.h>
#include <Windows.h>
using namespace std;

#pragma comment (lib,"C:\\Users\\Hilla\\Documents\\Visual Studio 2012\\helloworld\\helloworld\\jvm.lib")

int main()

{  
    JavaVM *jvm;
    JNIEnv *env;
    JavaVMInitArgs vm_args;

    JavaVMOption options[3];
    options[0].optionString = "-Djava.compiler=NONE";
    options[1].optionString="-Djava.class.path=C:\\Users\\Hilla\\Documents\\Visual      
        Studio 2012\\helloworld\\Debug\\hello.jar";
    options[2].optionString="verbose.jni";
    vm_args.version=JNI_VERSION_1_6;
    vm_args.nOptions=3;
    vm_args.options=options;
    vm_args.ignoreUnrecognized=0;
    int ret=JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
    printf("hilla");



}
#包括“stdafx.h”
#包括
#包括
#包括
#包括“jni.h”
#包括
#包括
使用名称空间std;
#pragma注释(lib,“C:\\Users\\Hilla\\Documents\\visualstudio 2012\\helloworld\\helloworld\\jvm.lib”)
int main()
{  
JavaVM*jvm;
JNIEnv*env;
JavaVMInitArgs vm_args;
JavaVMOption选项[3];
选项[0]。选项字符串=“-Djava.compiler=NONE”;
选项[1]。选项字符串=“-Djava.class.path=C:\\Users\\Hilla\\Documents\\Visual
Studio 2012\\helloworld\\Debug\\hello.jar”;
选项[2]。选项字符串=“verbose.jni”;
vm_args.version=JNI_version_1_6;
vm_args.nOptions=3;
vm_args.options=选项;
vm_args.ignoreunrecogned=0;
int ret=JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
printf(“hilla”);
}
我使用x64编译器。 我将JVM lim添加到系统路径中

它仍然给我这个错误:

'helloworld.exe'(Win32):加载了'C:\Users\Hilla\Documents\Visual Studio 2012\helloworld\x64\Debug\helloworld.exe'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\ntdll.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\kernel32.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\KernelBase.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\ProgramFiles\Java\jdk1.7.0\U 45\jre\bin\server\jvm.dll'。无法找到或打开PDB文件。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\msvcp110d.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\msvcr110d.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\user32.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\advapi32.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\wsock32.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\winmm.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\psapi.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\msvcr100.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\gdi32.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\msvcrt.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\sechost.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\rpcrt4.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\ws2\u 32.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\winmmbase.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\nsi.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\cfgmgr32.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\devobj.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\imm32.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\msctf.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\nvinitx.dll'。无法找到或打开PDB文件。
'helloworld.exe'(Win32):加载了'C:\Program Files\NVIDIA Corporation\coprocmanager\detoured.dll'。找不到或无法打开PDB文件。'helloworld.exe'(Win32):加载了“C:\Program Files\NVIDIA Corporation\coprocmanager\Nvd3d9wrapx.dll”。无法找到或打开PDB文件。
'helloworld.exe'(Win32):加载了'C:\Windows\System32\setupapi.dll'。已加载符号。
'helloworld.exe'(Win32):加载了'C:\Program Files\NVIDIA Corporation\coprocmanager\nvdxgiwrapx.dll'。找不到或无法打开PDB文件

程序“[7688]helloworld.exe”已退出,代码为0(0x0)


如何修复此问题?

PDB是Visual Studio使用的调试信息文件。这些是系统DLL,您没有调试符号。转到
工具->选项->调试->符号
并选中复选框
Microsoft符号服务器
,Visual Studio将自动下载PDB。


请阅读一个类似的问题,针对VS 2010

我怀疑英伟达DLL有PDB文件,所以你将无法调试这些容易。尽管您真的需要了解GPU驱动程序内部的情况吗?实际问题是什么?int ret=JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);返回-1?java类路径中有一个空格。这需要用引号括起来吗?因为我已经20年没有学过java了,我不记得了。java类path变量是否需要在包含空格的路径上使用带引号的字符串,或者JavaVMOption是否会处理这个问题。我怀疑jvm没有找到jar文件,因为路径中有空间。