Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Package problem - PLEASE HELP.

Reply
Thread Tools

Package problem - PLEASE HELP.

 
 
Gandu
Guest
Posts: n/a
 
      07-08-2003
Could some Java Guru help me? I have a subdirectory(named Testpackage) inside
a directory(named Tempjava). The subdirectory Testpackage contains an
interface(Testinterface.java) and a concrete class that implements that
interface(Test.java). If I get into the directory Tempjava and type:
javac Testpackage/Test.java
I get the error message:
Testpackage/Test.java:5: cannot resolve symbol
symbol : class Testinterface
location: class Testpackage.Test
public class Test implements Testinterface{
^
1 error

I have included the interface class and concrete class below:
//Testinterface.java
package Testpackage;

public interface Testinterface{
void doit();
}
//Test.java
package Testpackage;

import java.io.*;

public class Test implements Testinterface{

public void doit(){}

public static void main(String [] args){
System.out.println("Implementing interface in package");
}
}

Could someone please tell me what exactly to do to get around this
problem. Thanks in advance for your help.
 
Reply With Quote
 
 
 
 
Brad BARCLAY
Guest
Posts: n/a
 
      07-08-2003
Gandu wrote:
> Could some Java Guru help me? I have a subdirectory(named Testpackage) inside
> a directory(named Tempjava). The subdirectory Testpackage contains an
> interface(Testinterface.java) and a concrete class that implements that
> interface(Test.java). If I get into the directory Tempjava and type:
> javac Testpackage/Test.java
> I get the error message:
> Testpackage/Test.java:5: cannot resolve symbol
> symbol : class Testinterface
> location: class Testpackage.Test
> public class Test implements Testinterface{


Make sure you have Tempjava in your CLASSPATH. Either that, or go into
Testpackage and run "javac *.java" to compile everything at once.

Brad BARCLAY

--
=-=-=-=-=-=-=-=-=
From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project: http://www.jsyncmanager.org

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      07-08-2003
On Tue, 08 Jul 2003 05:35:15 GMT, Brad BARCLAY
<(E-Mail Removed)> wrote or quoted :

>subdirectory(named Testpackage)


packages and the directories that contain them should have lower case
names. They had better match precisely.


--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
Brad BARCLAY
Guest
Posts: n/a
 
      07-08-2003
Roedy Green wrote:

>>subdirectory(named Testpackage)

>
> packages and the directories that contain them should have lower case
> names. They had better match precisely.


Not necessarily. The only element in the spec that specifically
_requires_ lower-case characters is the TLD (which in the JLS v1.0 spec
was supposed to be all uppercase).

Everything after the TLD has no specific case requirements.

Brad BARCLAY

--
=-=-=-=-=-=-=-=-=
From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project: http://www.jsyncmanager.org


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Package that imports with name of dependent package David Pratt Python 4 05-13-2006 05:12 PM
single package import v/s the entire package Parvinder Java 6 02-27-2005 02:02 PM
package module import name clash with global package George P Python 3 09-11-2004 01:19 PM
Importing a package and looping through modules in the package Dave Python 2 02-10-2004 08:14 PM
please help... ...me learn C++ please please please :) KK C++ 2 10-14-2003 02:08 PM



Advertisments