0

I have Apache Hama installed and i can invoke it from Eclipse and it works fine. How could I run the same thing from unix terminal.

When I run

hama SSSP.java 

I am getting the error

Exception in thread "main" java.lang.NoClassDefFoundError: SSSP/java
Caused by: java.lang.ClassNotFoundException: SSSP.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: SSSP.java.  Program will exit.
user567879
  • 5,139
  • 20
  • 71
  • 105
  • 1
    You can't run a Java file, it needs to be compiled first. The next thing is that you need a jar. The command is indeed `bin/hama jar .jar` – Thomas Jungblut May 08 '14 at 17:11

1 Answers1

1

I am not familiar with hama, but maybe you need to export a runnable jar and then run as:

hama jar yourProject.jar

Kostas Kryptos
  • 4,081
  • 2
  • 23
  • 24