I'm doing following code but it doesn't work, why ? I'M EXPLAINGING HEREUNDER:- I created a directory in jdk1.3\bin named as p1 and then created a file named as Class1.java in p1 eg.
then I compiled it as:- f:\jdk1.3\bin\p1>javac Class1.java Then I created a directory p2 in jdk1.3\bin\p1. and created a java source file named as Class2.java eg.
and then compiled it as:- f:\jdk1.3\bin\p1\p2>javac Class2.java And then created a file at root directory of p1 named as Importer.java eg.
then I compiled it as:- f:\jdk1.3\bin>javac Importer.java BUT IT GIVES ERROR AT COMPILE TIME AS:- Class1 is a bad file name no class file in p1.Class1 specify the correct path But if change the code of as in Importer.java as import p1.Class1 and import p1.p2.Class2 then it comiples successfully and run fine. PLEASE TELL WHY IT DOESN'T RUN USING "*" ??? ------------------ Harjeet Singh Dadwal
(added code tags) [This message has been edited by Marilyn deQueiroz (edited September 16, 2001).]
Your java files are just fine! But when you compile it use.
and you should do fine! // MAthias
Joined: Sep 09, 2001
whoops......!!! sorry Mathias It was not working yesterday but today runs without modification, I couldn't understand what happened but thanks anyway, very thanks to you for your reply. bye ------------------ Harjeet Singh Dadwal