开发者

Running java program in windows which is compiled in linux

I compiled java program in fedora12.I could execute it successfully in fedora.I copied .class to Windows XP environment and tried to execute.I got class Not Found exception.why ? what could开发者_运维问答 be the reasons ?


You probably compiled the program in a newer version of the JDK than the one installed in the Window box. Post the details here so that we can help.


If you specify a classpath, note that in Windows the entries are separated by semicolon rather than colon (even under Cygwin):

  • Linux: java -cp lib/a.jar:lib/b.jar myMain
  • Windows: java -cp lib/a.jar;lib/b.jar myMain
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜