Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

New at java. Was using command prompt to run my helloworldapp. I was already in the directory wherein my helloworldapp.class file is. I typed in "java helloworldapp" (of course without brackets) and it printed an error saying "could not find or load main class helloworldapp". I googled the problem and then according to a solution I typed in "java -cp . helloworldapp" and the output came.

I am not able to understand the meaning of this. I mean when I am already in that directory why do I had mention -cp. Sorry not very good at these concepts right now. Thanks in advance.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.