• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PACKAGES

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your java files are just fine!
But when you compile it use.

and you should do fine!
// MAthias
 
Harjeet Dadwal
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic