This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
What happened when you compiled the file - were any directories created?
Joined: Feb 02, 2005
Hi, This is the error which i am getting while compiling a file which imports the package and uses the class "Factorial" ---------------- TestFactorial.java:6: cannot access Factorial bad class file: D:\Shyam\fact\Factorial.class class file contains wrong class: fact.Factorial Please remove or make sure it appears in the correct subdirectory of the classpa th. Factorial facObj=new Factorial();
----------------- I have set the classpath as follows set classpath=%classpath%;d:\Shyam;. where my package "fact" lies in D:\Shyam.
What might be the problem
Rgds Sree ^
Joined: Mar 22, 2005
Does the Factorial class actually have a statement "package fact;"? Or do you have another class Factorial somewhere? It sounds as if the hierarchy is somehow not correct.