could anyone spot me a place where i can learn everything about compiling and excecuting a java program(with package ,without package, ...etc) through command prompt?
*shudder* i'm having a look now, because I spent days on this, but i can't seem to find the website I liked.
I would just google and experiment. You'll run into problems with classpaths and running the compiler from the wrong root directory, then you can google that too. I would do this over using the oracle tutorials on the subject. I personally think they are poor.
Let me go and have a quick look for you, but regardless, if you work on it yourself it would help me too if you post your problems here. I've *mastered* it twice now, but because I'm not doing it daily it often catches me out, so I could do with the practise.
s sivaraman wrote:could anyone spot me a place where i can learn everything about compiling and excecuting a java program(with package ,without package, ...etc) through command prompt?
When it comes down to compiling source code files and running class files from the command line, you'll definitely need a good understanding of packages. So have a look at the lesson about packages of Oracle's Java tutorials, especially the Managing Source and Class Files section.
In the The "Hello World!" Application lesson provides detailed instructions for compiling and running a simple "Hello World!" application. And this article has a good explanation about the basics of compiling and running using a more complex example.
These pages could be useful as well some time: javac and java. Don't be intimidated by the gazillion options you can use for both commands. You'll probably only need to know the option -cp (or -classpath).
Finally, most study guides for the OCA exam will have basic coverage about javac and java as well, because it's recommended to prepare for the OCA exam not using an IDE but only your favourite text editor, javac and java. (And it's an exam objective for the OCA8 exam as well)
If you are experiencing any problem/issue when compiling or running an application, just create a new topic in this forum and ask your question. CodeRanch is really packed with friendly ranchers who will definitely help you to solve your problems.