This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to compile a code with package

 
eric lee
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my cal.java inside C:\java\com\ibm\store
my control.java in C:\java
control.java import cal.java
when i type javac control.java, it shows error:
-----------------------------------------------
control.java:6: package com.ibm.store does not exist import com.ibm.store.cal;
------------------------------------------------
how to solve it? thanks
 
Jon Dornback
Ranch Hand
Posts: 137
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here are some things to check:
have you compiled the com.ibm.store package? if not, you should be in the directory above com (c:\java in this case) and type at the command prompt:
javac com/ibm/store/*.java
is the package in your class path? type in the command:
set
and that will display all your environment variables. see if the current directory is in the classpath variable. if not, add it in.
Jon
Originally posted by eric lee:
my cal.java inside C:\java\com\ibm\store
my control.java in C:\java
control.java import cal.java
when i type javac control.java, it shows error:
-----------------------------------------------
control.java:6: package com.ibm.store does not exist import com.ibm.store.cal;
------------------------------------------------
how to solve it? thanks
 
eric lee
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks,Jon Dornback . i got it
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic