0

i'm using linux, and i downloaded a program (called hype) that was written for a mac and saved as a dmg. i then used the dmg2img program to mount the program as an image file. after doing that successfully, i opened a folder called MacOSX (since that's what it was written for) and found a java class file (hype.class). i attempted to run the class file but it threw a ClassNotFoundException.

so i tested my java installation with a helloworld java class file, and it ran fine.

i don't know if it doesn't work since the program was written for a mac instead of linux or if a different method is required to run the program. should i be trying to run something other than the java class file?

does anybody have any idea how or if i can get the program to run on linux?

the error was as follows:

    Exception in thread "main" java.lang.NoClassDefFoundError: Hype/class
Caused by: java.lang.ClassNotFoundException: Hype.class
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: Hype.class. Program will exit.
henry bemis
  • 490
  • 3
  • 8
  • Please show the contents of the mounted img file – Sri Harsha Chilakapati Nov 09 '12 at 01:55
  • What class did it say was not found? (Maybe show the actual error message.) – Phillip Mills Nov 09 '12 at 01:59
  • Getting an OSX program to run on Linux is not a programming (or programmer's tool) question, and therefore is off-topic here. The [FAQ](http://stackoverflow.com/faq) is pretty clear about the types of questions that are appropriate to ask here, and "running a Mac program on Linux" doesn't seem to be among them. Voting to close for that reason. – Ken White Nov 09 '12 at 02:49
  • it is a debug issue that falls under the faq: "software tools commonly used by programmers//practical, answerable problems that are unique to the programming profession" and "if your motivation is “I would like others to explain ______ to me”, then you are probably OK" – henry bemis Nov 09 '12 at 08:18

1 Answers1

2

You're including .class as part of the class name when launching - it should just be Hype.

Dmitri
  • 8,999
  • 5
  • 36
  • 43