File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package compilation - urgent

 
saquib nisar
Greenhorn
Posts: 14
  • 0
  • 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
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic