Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package compilation - urgent

 
saquib nisar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following setup:
Directory c:\project1 containing my Java sources
java source files with package com.caluk.utils as the first line.
When these compile they (i.e. the class files) get written to directory c:\project1\com\caluk\utils (using JCreator)
However, if I do a compile of a java source file which imports one of these files (using import com.caluk.utils.*), I get the following errors:
1) If I add c:\project1\com\caluk\utils to my classpath I get a bad class file error
2) Without changing the classpath I do get errors indicating that the class files cannot be found.
What am I doing wrong? Do I need to change the classpath, or should it just work?
Thanks.
Saquib Nisar
snisar@caluk.com
 
kirank
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to put your java source file and the package in the same directory level. You dont have to edit the path for this to work. Just include the source file and the package in the same level.
Kiran
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic