开发者

Running java program in windows which is compiled in linux

开发者 https://www.devze.com 2023-01-19 00:36 出处:网络
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开发者_运维

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

精彩评论

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

关注公众号