I have installed jdk and I m placing my class files or packages in c:/java/bin/. I created another folder on c: root and placed my class files in c:/javaPrep folder. Classes are compling successfully but when i try to run the class file it give me message that
But when I places this package containing test12.java in bin folder it works fine. I have added already c:/javaPrep in classpath. but not working. Please guide me how to do this.
If your package's directory structure is like c:->test->javaprep, then the class path should be only upto test. Don't include javaprep. In your case the classpath should have only c:\. Classpath should always mention the parent direcroty of the package directory. But, still the runtime error looks strange. It should acuatlly be . Anyways, try this.
Avishek<br />SCJP 5.0 - 90%
Joined: Jun 07, 2006
Thanks a lot for your helping replies
@Naseem Thats the problem you are right. Actually on my system oracle is installed as well. Now I checked version of java and javac as below as showing 2 different version
So thats why .class file was not running. Now my confusion is clear. Thanx a lot your prompt and helpfull answer.
@Avishek Thats not the problem Mr. Naseem pointed out the right point. thanks for your reply.