How to run my java source for Apache hama from terminal

82 Views Asked by At

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.
1

There are 1 best solutions below

1
On

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

hama jar yourProject.jar