Java运行时Windows与Linux版本 [英] Java RunTime Windows Vs Linux versions

查看:67
本文介绍了Java运行时Windows与Linux版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用GML4J,这是用JAVA编码的开源GML阅读器.
我在Linux& Windows平台,在JRE版本5,6& 7.

它在Linux上工作正常,但在Windows上我总是遇到运行时错误:

I am trying to use GML4J, an open-source GML reader coded in JAVA.
I tested it on Linux & Windows platform, under JRE versions 5,6 & 7.

It works fine on Linux but on windows I am always getting run-time error :

java.lang.NullPointerException at java.io.StringReader.<init>(StringReader.java:33)</init>



我无法将源代码放在某些IDE(例如eclipse)下并进行调试
它可以更清楚地描述问题.

Windows和Windows的JRE之间有什么区别吗? Linux的?是否缺少某些JDK组件
在我的机器上?由于在Linux上一切正常,这似乎没有问题
与代码.它似乎是JAVA安装/库问题.如何对此进行分析



I am not able to put the source code under some IDE (like eclipse) and debug
it to describe the problem more explicitly.

Is there any difference between JRE for windows & Linux? Is some JDK component is missing
on my machine? As things are working fine on Linux, it does not appear to be problem
with code. It appears to be JAVA installation/library issue. How this can be analyzed
and resolved?

推荐答案

打开文件时确定使用正确的路径和文件分隔符吗?
http://download.oracle.com/javase/1.4.2/docs/api/java/io/File.html [ ^ ]

祝你好运!
Are you sure to use the correct path and file separators when opening files?
http://download.oracle.com/javase/1.4.2/docs/api/java/io/File.html[^]

Good luck!


应用程序的输入是XML文件.因此,我最初怀疑路径问题.但是从堆栈跟踪中,我可以看到路径输入对于Windows系统是正确的.因此,堆栈中类的初始级别不会报告任何异常.当GML阅读器想要读取XML模式时,会在以后阶段发生该异常.
The input to application is an XML file. Hence, I was suspecting the path issue, initially. But from the stack trace, I can see that path input is proper as per windows system. And hence, initial level of classes in stack do not report any exception. The exception occurs at later stage when the GML reader wants to read the XML schema


这篇关于Java运行时Windows与Linux版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆