Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

after download and unzip the zip package, I copy the modelsphere.bat file to, and change the content to:

 java -ms64m -mx512m -ss16m -classpath "./modelsphere.jar:./" org.modelsphere.sms.Application

but when running the with the command "./", following exception is thrown:

 Exception in thread "main" java.lang.NoClassDefFoundError: org/modelsphere/sms/Application
Caused by: java.lang.ClassNotFoundException: org.modelsphere.sms.Application
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
.  Program will class: org.modelsphere.sms.Application

when I run the command,

java -ms64m -mx512m -ss16m -classpath "./modelsphere.jar:./" org.modelsphere.sms.Application

which is the content of the "" file, it works.

why? and how could I start Open ModelSphere with the shell file of ""?

Could anyone give me any point? thanks in advance.

share|improve this question

It probably has DOS line endings (\r\n instead of \n). See

And for good practice, you should make sure the first line of the file says #!/bin/sh

share|improve this answer
to see if it has DOS end-of-lines: shell> cat -vt (and look for ^M at the end). To fix, run "dos2unix" (or tofrodos utils, or just edit the file & remove the ^M).. – michael_n Jan 12 '12 at 8:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.