Win7 / AMD上的Java程序(Java program on Win7/AMD)

编程入门 行业动态 更新时间:2024-10-21 03:55:41
Win7 / AMD上的Java程序(Java program on Win7/AMD)

我有一个Java程序,可以执行多个文件I / O. 运行正常并在X86 / Win7-64b上编译。 准确的.jar被复制到AMD / Win7-64b并做了一些奇怪的事情,比如无法打开流或直到最后才读。

在相同的操作系统上运行但不同的处理器架构时,Java执行中是否会出现任何问题?

两者都有Java版本1.7.0_09

对于记录:

问题是在我的程序中使用JNI桥的2个Win7安装中略有不同的DLL。

I have a Java program that does several file I/O. Runs fine and get compiled on 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.

Could there be any issue in Java execution when running on the same OS but diferent procesor architectures ?

Both has Java Version 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.

最满意答案

如果是,您可以自己轻松搞清楚。 启动程序时,请注意以下事项:

您是从64位cmd.exe shell还是32位SYSWOW cmd.exe shell执行java? 你的JAVA_HOME是指向32位还是64位的Java? 您的PATH应设置为PATH =%JAVA_HOME%\ bin;%PATH%

如果这不能引起你的注意,那么关闭你的溪流或其他东西可能就是一个问题。 我听说JDK1.7中的File-IO库发生了变化......您是使用更新的语法还是仍在使用旧的JDK1.6传统读取文件?

If it is, you can easily figure it out on your own. Just be aware of the following things when you launch your program:

Are you executing java from the 64-bit cmd.exe shell or the 32-bit SYSWOW cmd.exe shell? Is your JAVA_HOME pointing to a 32bit or 64bit java? Your PATH should be set to 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?

更多推荐

本文发布于:2023-08-07 02:31:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1457861.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   AMD   program   Java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!