I am new to programming, java and stackoverflow. I am starting with Herbert Schidlt 9th edition and compiling first program Example. java . It gets compiled when I type path "C:\Program Files\Java\jdk1.8.0_91\bin\javac" Example.java But it do not gets compiled when I type java Example.java and gives error "could not find or load main class Example"
I tried changing Path to C:\Program Files\Java\jdk1.8.0_91\bin or C:\Program Files\Java\jre1.8.0_91\bin or C:\Program Files\Java\jdk1.8.0_91\bin\javac that I learnt from various Stackoverflow discussions but it do not works.
Also compiler check do not works with javac -version but works well with java -version
Please help. I am stuck up with this problem from last 5 days and have tried many things from various discussions.