I have java 8 installed on fedora 20. Any java program runs perfectly fine via eclipse but when I run the same program on terminal it reports an error saying 'could not load main class' . what could be the problem?
I wrote a simple helloworld program named hello.java and executed on eclipse. Then I opened terminal and moved to the folder containing the hello.class in eclipse workspace and typed ' java hello '. But it said 'error:could not load main class'.
Also as I said I have installed and I use oracle java 8.