user567879
user567879

Reputation: 5339

How to run my java source for Apache hama from terminal

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.

Upvotes: 0

Views: 78

Answers (1)

Kostas Kryptos
Kostas Kryptos

Reputation: 4111

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

hama jar yourProject.jar

Upvotes: 1

Related Questions