Another "cannot find symbol" compiling error

Reply

Join Date: Dec 2004
Posts: 2
Reputation: aaaa is an unknown quantity at this point 
Solved Threads: 0
aaaa aaaa is offline Offline
Newbie Poster

Another "cannot find symbol" compiling error

 
0
  #1
May 29th, 2005
Hi,
I'm very new to Java and I have the following problem while compiling a source code:

  1.  
  2. g:\Java\Proj\baseline.java:1487: cannot find symbol
  3. symbol : constructor a(baseline)
  4. location: class baseline.a
  5. k.setItemStateListener(new a(this));
  6. ^


I've ran the compiler with the following flags:

  1. javac -d g:\Java\Proj\compiled\ -classpath g:\Java\WTK2\wtklib\emptyapi g:\Java\Proj\baseline.java

The source files are composed by a file called "baseline.jad" and another called "a.jad" which are in the same folder. Now I've renamed both files with the ".java" extension.
I don't know much about java but I think that the error could be caused by wrong filename/folder of the "a.java" or if the "a.java" class must be imported/declareted in some way in the "baseline.java" source.
Many thanks in advance for any help.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Another "cannot find symbol" compiling error

 
0
  #2
May 30th, 2005
I'm not sure I undestand what your doing with the calll of new a(this)...Could you explain.

The way you have it, it's like you have an inner class called a, and your are trying to pass the whole class to it. Am I correct?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2
Reputation: aaaa is an unknown quantity at this point 
Solved Threads: 0
aaaa aaaa is offline Offline
Newbie Poster

Re: Another "cannot find symbol" compiling error

 
0
  #3
May 31st, 2005
Originally Posted by server_crash
I'm not sure I undestand what your doing with the calll of new a(this)...Could you explain.

The way you have it, it's like you have an inner class called a, and your are trying to pass the whole class to it. Am I correct?
Probably it may sound ridiculous but neither I know what this call to "a" exactly is. :rolleyes: :lol:

I try to explain myself better:
I've the sourcecode of a Java app for mobile phones and I need to recompile it.
So I've downloaded the J2ME classes (microedition.midlet, etc.) and now I'm stuck with 8 compiling errors.

The sourcecode is composed by 8 files:
baseline.jad, a.jad, b.jad, c.jad, (...), g.jad

At the beginning "baseline.java" calls (imports?) each class with this code:

  1. import java.util.Calendar;
  2. import java.util.TimeZone;
  3. import java.util.Enumeration;
  4. import javax.microedition.midlet.MIDlet;
  5.  
  6. public class baseline extends MIDlet
  7. implements CommandListener
  8. {
  9.  
  10. final void a()
  11. {
  12.  
  13. // CODE CUT
  14.  
  15. }
  16.  
  17. final void b()
  18. {
  19.  
  20. // CODE CUT
  21.  
  22. }
  23.  
  24. // ETC.



The beginning of a.jad file is:

  1. import javax.microedition.lcdui.*;
  2.  
  3. final class a
  4. implements ItemStateListener
  5. {
  6.  
  7. // CODE CUT
  8.  
  9. }

So, why I get this compiling error?

I really hope that this can help, as I've said before I'm quite new to Javaso I apologize for the inaccuracy of the question :rolleyes:

I can provide more info if needed.
Many thanks for your help
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Another "cannot find symbol" compiling error

 
0
  #4
May 31st, 2005
The imports statements simply import classes that you need from the java library , not the classes that you are trying to instantiate in your program. Have you compiled all the other classes before trying to compile that one class with the errors? Or are you getting errors with those other classes? See, in order for that code to run, there must be a class called a, which there is, but it also must already be compiled or the compiler wont recognize it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC