Page 1 of 1
Packages
Posted: Tue Jan 28, 2003 5:35 am
by Brian
I can compile and even run Java programs, but the compiler will not recognize packages. I cannot import a package I created and I cannot use other classes located inside of a package I created. I included the package <package_name>; header in every different class. Please Help...........
Re: Packages
Posted: Mon Feb 03, 2003 3:48 pm
by Garrett
The problem is that you need to change your working directory and command name. If you have a 2-level package structure, such as:
com.mycompany.MyClass
Then you need to change your working directory from:
$FileDir
to:
$FileDir\..\..
That will drive you two directories up.
Also, you'll need to change the class name parameter sent to java.exe, from:
$BaseName
to:
com.mycompany.$BaseName
That should get it worked out. The problem is that TextPad has no understanding of packages or FQCN's, so you need to hold its's hand through it.
Re: Packages
Posted: Mon Feb 03, 2003 6:40 pm
by Tom
Anyone know how to make the package name into a varialbe like $BaseName?
thanks,
Tom
Posted: Thu Mar 20, 2003 1:13 pm
by adrian
perfect