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
Joined: Nov 14, 2000
Posts: 12
posted
0
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