I have just started learning java.
From the above link
I also wrote my first java program, but the problem comes here.
After setting the path and compiling, the class is not being created in the directory called 'src'.
The error is being displayed as:
"MooseGreetings.java:1: error while writing MooseGreetings: MooseGreetings.class <Access is denied>
public class MooseGreeting
1 error "
Hope you would help me regarding this, because with getting this small program executed I can't move furthur.
Windows Vista and Windows 7 have something called User Access Control (UAC). This will ask you each time when you try to make any changes to the Program Files or Windows folder. However, it doesn't work well when called from a command line or another application. And then there is simply an access denied message.
You can turn off UAC, but I suggest you use a different path instead. Not directly in C:, but something like C:\Java or perhaps a completely different drive.