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.
Asked by Aditya Gupta
(1 rep)
Jun 29, 2015, 07:29 AM
Last activity: May 10, 2025, 11:08 AM
Last activity: May 10, 2025, 11:08 AM