![]() |
| ||
| Another "cannot find symbol" compiling error Hi, I'm very new to Java and I have the following problem while compiling a source code:
I've ran the compiler with the following flags: 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. ;) |
| ||
| Re: Another "cannot find symbol" compiling error 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? |
| ||
| Re: Another "cannot find symbol" compiling error Quote:
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: import java.util.Calendar; The beginning of a.jad file is: import javax.microedition.lcdui.*; 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 ;) |
| ||
| Re: Another "cannot find symbol" compiling error 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. |
| All times are GMT -4. The time now is 1:24 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC