简体   繁体   中英

.jar works on Windows and Linux but not OSX

I recently made an application for a community I'm part of, Because I run Windows and don't have access to other OSes at the moment, I posted it saying it was untested on Linux & OSX and people have reported back that it runs fine on Linux and Windows but fails to even start on OSX, One person posted the output when they tried to run it and this is what they got:

ccemu.jar: line 1: PK: command not found
ccemu.jar: line 2:???@: command not found
ccemu.jar: line 3???@D?: command not found
ccemu.jar: line 4: syntax error near unexpected token `('
ccemu.jar: line 4: `?|?META-INF/MANIFEST.MFM??? Ew??Q^(1j???M7W?ħ???<p??K7??s?1??o?9?ة?}?#???C??z^?Jᘰ?S?ݿ????~X???I??kb,??J1b??͘s??????m??=-_?)??PK'

Obviously I have no clue what any of those errors mean otherwise I wouldn't be here, Hopefully someone can insight me.

It appears that the person who was testing it tried to execute it by doing chmod +x ccemu.jar; ./ccemu.jar chmod +x ccemu.jar; ./ccemu.jar , which in the general case doesn't work. That person should probably try calling java -jar ccemu.jar instead.

I have the same problem with a Java application (trying it on OS X) and the problem was that in the script that runs the application, the classpath was separated with ; instead of : .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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