简体   繁体   English

Win7 / AMD上的Java程序

[英]Java program on Win7/AMD

I have a Java program that does several file I/O. 我有一个执行几个文件I / O的Java程序。 Runs fine and get compiled on X86/Win7-64b. 运行正常并在X86 / Win7-64b上进行编译。 The exactly .jar is copied to an AMD/Win7-64b and does strange things like cannot open streams or does'nt read till end. 确切的.jar被复制到AMD / Win7-64b,并执行诸如无法打开流或直到结束才读取的奇怪操作。

Could there be any issue in Java execution when running on the same OS but diferent procesor architectures ? 当在相同的操作系统上但不同的处理器体系结构上运行时,Java执行中是否会出现任何问题?

Both has Java Version 1.7.0_09 两者都有Java版本1.7.0_09

For the records: 记录:

The problem was a slightly different DLL in the 2 Win7 installations that uses a JNI bridge in my program. 问题是在我的程序中使用JNI桥的2个Win7安装中的DLL稍有不同。

If it is, you can easily figure it out on your own. 如果是这样,您可以轻松地自行解决。 Just be aware of the following things when you launch your program: 启动程序时,请注意以下事项:

  1. Are you executing java from the 64-bit cmd.exe shell or the 32-bit SYSWOW cmd.exe shell? 您是从64位cmd.exe Shell还是32位SYSWOW cmd.exe Shell执行Java?
  2. Is your JAVA_HOME pointing to a 32bit or 64bit java? 您的JAVA_HOME是指向32位还是64位Java?
  3. Your PATH should be set to PATH=%JAVA_HOME%\\bin;%PATH% 您的PATH应该设置为PATH =%JAVA_HOME%\\ bin;%PATH%

If that doesn't clue you in, then it could just be a problem with closing your streams or something. 如果您不了解,那么关闭流或其他内容可能只是一个问题。 I heard that the File-IO libraries changed in JDK1.7 ... are you using that newer syntax or are you still reading files using the older JDK1.6 traditions? 我听说JDK1.7中的File-IO库发生了变化...您是在使用较新的语法还是仍在使用旧的JDK1.6传统读取文件?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM