This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1) you can put your .java files anywhere you want - it doesn't matter. it's a bad idea to mix your own .java/.class files with the ones that come with the JDK, but you're not doing that, so you're ok.
2) when you say you "do javac MyFirstApp.java", what DOES it do? tell us EXACTLY what it says. Where are you when you do it (i.e. what directory are you in, what EXACTLY is the command you type, etc). The more details you give, the easier it is to help. Otherwise, we're just kind of guessing.
3) When you say "when i drag my file..." WHAT file are you dragging?
Generally, java doesn't work by 'dragging a file onto the java.exe'. Once you get your .java file to compile into a .class file, you would then run something like the following:
So, if I wrote a class called HelloWorld.java, I would compile it with this:
That should create a file called "HelloWorld.class" in the same directory with my HelloWorld.java file. I would then run
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors