| 
 
Advertisement
 
 | 
 
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new 
Artima Forums.
 
Message:
 
 
Name does matter
 
 
Posted by Kishori Sharan on November 26, 2000 at 1:13 PM 
I know your problem. You are putting your class in a package like package lu.ping ; class Test { }   In this case your program will compile fine if you give a command javac Test.java   However, it won't run when you give a command java Test     You have to give a command  java lu.ping.Test   I mean you have to give a fully-qualified name of your class Test. And make sure that you have set the classpath correctly. If you have a directory strucure like C:\lu\ping\Test.java     then you must include C:\ in your classpath variable in autoexec.bat if you are using windows95/98. Thanx Kishori
 
 
 
  
Replies:
 
- Thanks Lu Ping November 27, 2000 at 9:52 AM
(0)
 - Ask for help Lu Ping November 27, 2000 at 3:18 AM
(6)
  
 |