Compiling error with a class that references another class

Hello,
I have two Java-Classes in two files in the same folder. Both are in the same package. The class StatusZwo should reference the function ValueX of the class Status.
The class Status has a function which returns the boolean value true. If compile the file Status.java there is no error, but if I
compile the file StatusZwo.java there comes the error message:
D:\Test\Test>javac StatusZwo.java
StatusZwo.java:12: cannot resolve symbol
symbol : variable Status
location: class Test.StatusZwo
System.out.printLn(Status.ValueX);
StatusZwo.java
package Test;
import Test.*;
public class StatusZwo{
public static void main (String arguments[]) {
System.out.printLn(Status.ValueX);
Status.java:
package Test;
public class Status{
public static boolean ValueX() {
return true;
What is the problem?
Thank you Flo

Next time please use [code] and [/code] tags around any code.
There are two issues on one particular line;
[code]System.out.printLn(Status.ValueX);[/code]
should be
[code]System.out.println(Status.ValueX());[/code]

Similar Messages

  • Cannot resolve symbol error when compiling a class that calls another class

    I've read all the other messages that include "cannot resolve symbol", but no luck. I've got a small app - 3 classes all in the same package. BlackjackDAO and Player compile OK, but BlackjackServlet throws the "cannot resolve symbol" (please see pertinent code below)...
    I've tried lots: ant and javac compiling, upgrading my version of tomcat, upgrading my version of jdk/jre, making sure my servlet.jar is being seen by the compiler (at least as far as I can see from the -verbose feedback)...any help would be GREAT! Thanks in advance...
    classes: BlackjackServlet, BlackjackDAO, Player
    package: myblackjackpackage
    tomcat version: 4.1.1.8
    jdk version: j2sdk 1.4.0
    ant version: 1.4.1
    I get the same error message from Ant and Javac...
    C:\Tomcat4118\src\webapps\helloblackjack\src\myblackjackpackage>javac *.java -verbose
    C:\Tomcat4118\src\webapps\helloblackjack>ant all -verbose
    compile error:
    BlackjackServlet.java:55: cannot resolve symbol
    symbol: method addPlayer (javax.servlet.http.HttpServletRequest,javax.servlet.http.Http
    ServletResponse)
    location: class myblackjackpackage.BlackjackServlet
              addPlayer(request, response);
    ^
    My code is:
    package myblackjackpackage;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.lang.*;
    /** controller servlet in a web based blackjack game application @author Ethan Harlow */
    public class BlackjackServlet extends HttpServlet {
         private BlackjackDAO theBlackjackDAO;
         public void init() throws ServletException {
    String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String dbUrl = "jdbc:microsoft:sqlserver://localhost:1433";
    String userid = "testlogin";
    String passwrd = "testpass";
         try {
         theBlackjackDAO = new BlackjackDAO(driver, dbUrl, userid, passwrd);
         catch (IOException exc) {
              System.err.println(exc.toString());
         catch (ClassNotFoundException cnf) {
              System.err.println(cnf.toString());
         catch (SQLException seq) {
              System.err.println(seq.toString());
    public void doPost(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
    doGet(request, response);
    public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
         String command = request.getParameter("command");
         if (command == null || (command.equals("stats"))) {
         else if (command.equals("add")) {
              try {
    //the following line is caught by compiler
              addPlayer(request, response);
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<html>");
              out.println("<body>");
              out.println("<p>Hi, your command was " + request.getParameter("command") + "!!!</p>");
              out.println("</body>");
              out.println("</html>");
              catch (Exception exc) {
                   System.err.println(exc.toString());
         else if (command.equals("play")) {
         else if (command.equals("bet")) {
         else if (command.equals("hit")) {
         else if (command.equals("stand")) {
         else if (command.equals("split")) {
         else if (command.equals("double")) {
         else if (command.equals("dealerdecision")) {
         else if (command.equals("reinvest")) {
         else if (command.equals("changebet")) {
         else if (command.equals("deal")) {
    package myblackjackpackage;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.lang.*;
    public class BlackjackDAO {
         private Connection myConn;
         public BlackjackDAO(String driver, String dbUrl, String userid, String passwrd)
                   throws IOException, ClassNotFoundException, SQLException {
              System.out.println("Loading driver: " + driver);
              Class.forName(driver);
              System.out.println("Connection to: " + dbUrl);
              myConn = DriverManager.getConnection(dbUrl, userid, passwrd);
              System.out.println("Connection successful!");
         public void addPlayer(HttpServletRequest request, HttpServletResponse response)
                   throws IOException, SQLException {
    //I've commented out all my code while debugging, so I didn't include
    //any here     
    compiler feedback
    C:\Tomcat4118\src\webapps\helloblackjack\src\myblackjackpackage>javac *.java -verbose
    [parsing started BlackjackDAO.java]
    [parsing completed 90ms]
    [parsing started BlackjackServlet.java]
    [parsing completed 10ms]
    [parsing started Player.java]
    [parsing completed 10ms]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/Object.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/sql/Connection.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/String.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/io/IOException.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/ClassNotFoundException.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/sql/SQLException.class)]
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/http/HttpServletRequ
    est.class)]
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/http/HttpServletResp
    onse.class)]
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/http/HttpServlet.cla
    ss)]
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/GenericServlet.class
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/Servlet.class)]
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/ServletConfig.class)
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/io/Serializable.class)]
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/ServletException.cla
    ss)]
    [checking myblackjackpackage.BlackjackDAO]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/Throwable.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/Exception.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/System.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/io/PrintStream.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/io/FilterOutputStream.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/io/OutputStream.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/Class.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/sql/DriverManager.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/util/Properties.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/Error.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/RuntimeException.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/lang/StringBuffer.class)]
    [wrote BlackjackDAO.class]
    [checking myblackjackpackage.BlackjackServlet]
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/ServletRequest.class
    BlackjackServlet.java:55: cannot resolve symbol
    symbol : method addPlayer (javax.servlet.http.HttpServletRequest,javax.servlet
    .http.HttpServletResponse)
    location: class myblackjackpackage.BlackjackServlet
    addPlayer(request, response);
    ^
    [loading c:\tomcat4118\common\lib\servlet.jar(javax/servlet/ServletResponse.clas
    s)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/io/PrintWriter.class)]
    [loading c:\j2sdk14003\jre\lib\rt.jar(java/io/Writer.class)]
    [checking myblackjackpackage.Player]
    [total 580ms]
    1 error
    C:\Tomcat4118\src\webapps\helloblackjack\src\myblackjackpackage>
    and here's the ant feedback...
    C:\Tomcat4118\src\webapps\helloblackjack>ant all -verbose
    Ant version 1.4.1 compiled on October 11 2001
    Buildfile: build.xml
    Detected Java version: 1.4 in: c:\j2sdk14003\jre
    Detected OS: Windows 2000
    parsing buildfile C:\Tomcat4118\src\webapps\helloblackjack\build.xml with URI =
    file:C:/Tomcat4118/src/webapps/helloblackjack/build.xml
    Project base dir set to: C:\Tomcat4118\src\webapps\helloblackjack
    Build sequence for target `all' is [clean, prepare, compile, all]
    Complete build sequence is [clean, prepare, compile, all, javadoc, deploy, dist]
    clean:
    [delete] Deleting directory C:\Tomcat4118\src\webapps\helloblackjack\build
    [delete] Deleting C:\Tomcat4118\src\webapps\helloblackjack\build\images\a_s.g
    if
    [delete] Deleting C:\Tomcat4118\src\webapps\helloblackjack\build\images\q_s.g
    if
    [delete] Deleting directory C:\Tomcat4118\src\webapps\helloblackjack\build\im
    ages
    [delete] Deleting C:\Tomcat4118\src\webapps\helloblackjack\build\index.html
    [delete] Deleting C:\Tomcat4118\src\webapps\helloblackjack\build\newplayer.ht
    ml
    [delete] Deleting C:\Tomcat4118\src\webapps\helloblackjack\build\WEB-INF\clas
    ses\myblackjackpackage\BlackjackDAO.class
    [delete] Deleting directory C:\Tomcat4118\src\webapps\helloblackjack\build\WE
    B-INF\classes\myblackjackpackage
    [delete] Deleting directory C:\Tomcat4118\src\webapps\helloblackjack\build\WE
    B-INF\classes
    [delete] Deleting C:\Tomcat4118\src\webapps\helloblackjack\build\WEB-INF\web.
    xml
    [delete] Deleting directory C:\Tomcat4118\src\webapps\helloblackjack\build\WE
    B-INF
    [delete] Deleting directory C:\Tomcat4118\src\webapps\helloblackjack\build
    prepare:
    [mkdir] Created dir: C:\Tomcat4118\src\webapps\helloblackjack\build
    [copy] images\a_s.gif added as C:\Tomcat4118\src\webapps\helloblackjack\bui
    ld\images\a_s.gif doesn't exist.
    [copy] images\q_s.gif added as C:\Tomcat4118\src\webapps\helloblackjack\bui
    ld\images\q_s.gif doesn't exist.
    [copy] index.html added as C:\Tomcat4118\src\webapps\helloblackjack\build\i
    ndex.html doesn't exist.
    [copy] newplayer.html added as C:\Tomcat4118\src\webapps\helloblackjack\bui
    ld\newplayer.html doesn't exist.
    [copy] WEB-INF\web.xml added as C:\Tomcat4118\src\webapps\helloblackjack\bu
    ild\WEB-INF\web.xml doesn't exist.
    [copy] omitted as C:\Tomcat4118\src\webapps\helloblackjack\build is up to
    date.
    [copy] images added as C:\Tomcat4118\src\webapps\helloblackjack\build\image
    s doesn't exist.
    [copy] WEB-INF added as C:\Tomcat4118\src\webapps\helloblackjack\build\WEB-
    INF doesn't exist.
    [copy] Copying 5 files to C:\Tomcat4118\src\webapps\helloblackjack\build
    [copy] Copying C:\Tomcat4118\src\webapps\helloblackjack\web\images\q_s.gif
    to C:\Tomcat4118\src\webapps\helloblackjack\build\images\q_s.gif
    [copy] Copying C:\Tomcat4118\src\webapps\helloblackjack\web\images\a_s.gif
    to C:\Tomcat4118\src\webapps\helloblackjack\build\images\a_s.gif
    [copy] Copying C:\Tomcat4118\src\webapps\helloblackjack\web\index.html to C
    :\Tomcat4118\src\webapps\helloblackjack\build\index.html
    [copy] Copying C:\Tomcat4118\src\webapps\helloblackjack\web\newplayer.html
    to C:\Tomcat4118\src\webapps\helloblackjack\build\newplayer.html
    [copy] Copying C:\Tomcat4118\src\webapps\helloblackjack\web\WEB-INF\web.xml
    to C:\Tomcat4118\src\webapps\helloblackjack\build\WEB-INF\web.xml
    compile:
    [mkdir] Created dir: C:\Tomcat4118\src\webapps\helloblackjack\build\WEB-INF\
    classes
    [javac] myblackjackpackage\BlackjackDAO.class skipped - don't know how to ha
    ndle it
    [javac] myblackjackpackage\BlackjackDAO.java added as C:\Tomcat4118\src\weba
    pps\helloblackjack\build\WEB-INF\classes\myblackjackpackage\BlackjackDAO.class d
    oesn't exist.
    [javac] myblackjackpackage\BlackjackServlet.java added as C:\Tomcat4118\src\
    webapps\helloblackjack\build\WEB-INF\classes\myblackjackpackage\BlackjackServlet
    .class doesn't exist.
    [javac] myblackjackpackage\Player.java added as C:\Tomcat4118\src\webapps\he
    lloblackjack\build\WEB-INF\classes\myblackjackpackage\Player.class doesn't exist
    [javac] Compiling 3 source files to C:\Tomcat4118\src\webapps\helloblackjack
    \build\WEB-INF\classes
    [javac] Using modern compiler
    [javac] Compilation args: -d C:\Tomcat4118\src\webapps\helloblackjack\build\
    WEB-INF\classes -classpath
    "C:\Tomcat4118\src\webapps\helloblackjack\build\WEB-I
    NF\classes;
    C:\tomcat4118\common\classes;
    C:\tomcat4118\common\lib\activation.jar;
    C:\tomcat4118\common\lib\ant.jar;
    C:\tomcat4118\common\lib\commons-collections.jar;
    C:\tomcat4118\common\lib\commons-dbcp.jar;
    C:\tomcat4118\common\lib\commons-logging-api.jar;
    C:\tomcat4118\common\lib\commons-pool.jar;
    C:\tomcat4118\common\lib\jasper-compiler.jar;
    C:\tomcat4118\common\lib\jasper-runtime.jar;
    C:\tomcat4118\common\lib\jdbc2_0-stdext.jar;
    C:\tomcat4118\common\lib\jndi.jar;
    C:\tomcat4118\common\lib\jta.jar;
    C:\tomcat4118\common\lib\mail.jar;
    C:\tomcat4118\common\lib\mysql_uncomp.jar;
    C:\tomcat4118\common\lib\naming-common.jar;
    C:\tomcat4118\common\lib\naming-factory.jar;
    C:\tomcat4118\common\lib\naming-resources.jar;
    C:\tomcat4118\common\lib\servlet.jar;
    C:\tomcat4118\common\lib\tools.jar;
    C:\j2sdk14003\lib\tools.jar;
    C:\tomcat4118\ant141\lib\servlet.jar;
    C:\tomcat4118\ant141\lib\jaxp.jar;
    C:\tomcat4118\ant141\lib\crimson.jar;
    C:\tomcat4118\ant141\lib\ant.jar;
    C:\Tomcat4118\src\webapps\helloblackjack;
    C:\mysql\jdbc_dvr\mm.mysql.jdbc-1.2c;
    C:\Program Files\SQLserverjdbcdriver\lib\msbase.jar;
    C:\Program Files\SQLserverjdbcdriver\lib\msutil.jar;
    C:\Program Files\SQLserverjdbcdriver\lib\mssqlserver.jar"
    -sourcepath C:\Tomcat4118\src\webapps\helloblackjack\src -g -O
    [javac] Files to be compiled:
    C:\Tomcat4118\src\webapps\helloblackjack\src\myblackjackpackage\BlackjackDAO
    .java
    C:\Tomcat4118\src\webapps\helloblackjack\src\myblackjackpackage\BlackjackSer
    vlet.java
    C:\Tomcat4118\src\webapps\helloblackjack\src\myblackjackpackage\Player.java
    [javac] C:\Tomcat4118\src\webapps\helloblackjack\src\myblackjackpackage\Blac
    kjackServlet.java:55: cannot resolve symbol
    [javac] symbol : method addPlayer (javax.servlet.http.HttpServletRequest,j
    avax.servlet.http.HttpServletResponse)
    [javac] location: class myblackjackpackage.BlackjackServlet
    [javac] addPlayer(request, response);
    [javac] ^
    [javac] 1 error
    BUILD FAILED
    C:\Tomcat4118\src\webapps\helloblackjack\build.xml:212: Compile failed, messages
    should have been provided.
    at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:559)
    at org.apache.tools.ant.Task.perform(Task.java:217)
    at org.apache.tools.ant.Target.execute(Target.java:184)
    at org.apache.tools.ant.Target.performTasks(Target.java:202)
    at org.apache.tools.ant.Project.executeTarget(Project.java:601)
    at org.apache.tools.ant.Project.executeTargets(Project.java:560)
    at org.apache.tools.ant.Main.runBuild(Main.java:454)
    at org.apache.tools.ant.Main.start(Main.java:153)
    at org.apache.tools.ant.Main.main(Main.java:176)
    Total time: 1 second
    C:\Tomcat4118\src\webapps\helloblackjack>

    yes!
    early on i tried: BlackjackDAO.addPlayer(request, response);
    instead of: theBlackjackDAO.addPlayer(request, response);
    you rock - thanks a ton

  • Compilation error while calling static method from another class

    Hi,
    I am new to Java Programming. I have written two class files Dummy1 and Dummy2.java in the same package Test.
    In Dummy1.java I have declared a static final variable and a static method as you can see it below.
    package Test;
    import java.io.*;
    public class Dummy1
    public static final int var1= 10;
    public static int varDisp(int var2)
    return(var1+var2);
    This is program is compiling fine.
    I have called the static method varDisp from the class Dummy2 and it is as follows
    package Test;
    import java.io.*;
    public class Dummy2
    public int var3=15;
    public int test=0;
    test+=Dummy1.varDisp(var3);
    and when i compile Dummy2.java, there is a compilation error <identifier > expected.
    Please help me in this program.

    public class Dummy2
    public int var3=15;
    public int test=0;
    test+=Dummy1.varDisp(var3);
    }test+=Dummy1.varDisplay(var3);
    must be in a method, it cannot just be out somewhere in the class!

  • Referencing a class that created another class

    Is there a certain way reference the class that created "you" - examples:
    public class SomeClass
      public SomeClass()
        // blah blah
        SomeOtherClass foo = new SomeOtherClass();
    public class SomeOtherClass
      public SomeOtherClass()
        // blah
      public void SomeMethod()
        // access SomeClass here
        TheClassThatCreatedMe.method();
    }Any ideas?

    one way is u can modify ur code this way
    public class SomeClass{  public SomeClass()  {    // blah blah    SomeOtherClass foo = new SomeOtherClass(String creator);  }}
    //where string creator u pass the same clasas name i.e someclass
    public class SomeOtherClass{  public SomeOtherClass()  {
    System.out.println("created class name is "+creator );
    // blah
    } public void SomeMethod() {    // access SomeClass here    TheClassThatCreatedMe.method();  }}

  • Compilation error with dataProvider attribute

    My objective is to have a ComboBox itemEditor for a column in
    a DataGrid. This
    will get used in a number of places in our app, for example
    to add an order
    line to an order. We would want the ComboBox to be populated
    with the list of
    available products, and Flex goes most of the way to
    providing that
    functionality. But I get a compilation error on a line that I
    would expect to
    work. Here's the full sample:
    quote:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="700" width="700"
    creationComplete="onLoad()">
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var myDP:Array = [
    {label1:"P1", quantity:3},
    {label1:"P2", quantity:3}
    [Bindable]
    public var products:Array = [ {label:"P1", data:1},
    {label:"P2", data:2}, {label:"P3", data:3} ];
    public function onLoad():void
    ProductsRequest.send() ;
    ]]>
    </mx:Script>
    <mx:HTTPService id="ProductsRequest"
    url="
    http://localhost:3000/lists/productlist"
    useProxy="false"/>
    <mx:Component id="ProductCodeEditor">
    <mx:ComboBox
    dataProvider="{ProductsRequest.lastResult.products.product}"
    labelField="name"/>
    </mx:Component>
    <mx:ComboBox
    dataProvider="{ProductsRequest.lastResult.products.product}"
    labelField="name"></mx:ComboBox>
    <mx:DataGrid id="myDG" dataProvider="{myDP}"
    variableRowHeight="true"
    editable="true">
    <mx:columns>
    <mx:DataGridColumn dataField="label1" headerText="Product
    Code" itemEditor="{ProductCodeEditor}"/>
    <mx:DataGridColumn dataField="quantity"
    headerText="Quantity"
    editorDataField="value">
    <mx:itemEditor>
    <mx:Component>
    <mx:NumericStepper stepSize="1" maximum="50"/>
    </mx:Component>
    </mx:itemEditor>
    </mx:DataGridColumn>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>
    I get a complation error on the following line
    quote:
    <mx:Component id="ProductCodeEditor">
    -->> <mx:ComboBox
    dataProvider="{ProductsRequest.lastResult.products.product}"
    labelField="name"/>
    </mx:Component>
    The error message is "Access of undefined property
    ProductsRequest"
    However, the other <mx:ComboBox> definition compiles
    and works fine. In
    other words, in the sample code (shown again below) we have
    two <mx:ComboBox>
    definitions with the same dataProvider definition. The one on
    line 33 compiles
    and works, the other doesn't, and the only difference is that
    one of them is
    within a <mx:Component> declaration.
    quote:
    27 <mx:HTTPService id="ProductsRequest"
    url="
    http://localhost:3000/lists/productlist"
    useProxy="false"/>
    28
    29 <mx:Component id="ProductCodeEditor">
    30 <mx:ComboBox
    dataProvider="{ProductsRequest.lastResult.products.product}"
    labelField="name"/>
    31 </mx:Component>
    32
    33 <mx:ComboBox
    dataProvider="{ProductsRequest.lastResult.products.product}"
    labelField="name"></mx:ComboBox>
    I really can't believe that this behaviour is by design. If
    it is, could
    somebody tell me what this design is, and how I am supposed
    to populate a
    combobox with product codes in a grid?
    Thanks,
    Ed.

    Sorry, I see you are trying to do that. I am not yet familiar
    with inline renderers.
    However, I suspect a scope issue. I bet the renderer
    component does not have access to the application scope, where the
    dataService is declared.
    This doc might help:
    http://livedocs.macromedia.com/labs/1/flex20beta3/00000857.html
    Tracy

  • Compilation errors with JDeveloper 10.1.2.2.0

    Hello,
    I want to change my environment work. First I worked with Eclipse (Europa, jre 1.6), I have no error with my following code source :
    private List<String> lString;
    and now I have a compilation error with the same code
    ' Error(43,14): <identifier> expected '
    I think it's a compiler version problem but I'm not sure and I don't know how to change the compiler version.
    If someone have any idea, I will be happy to receive response.
    Thanks

    JDeveloper 10.1.2.2.0 doesn't support neither JDK 1.6 nor JDK 1.5.
    --olaf                                                                                                                                                                                       

  • Compiler errors when using dynamic text in a class

    I have created a MovieClip with a custom class that has a dynamic text field (called "textArea"), which I want to modify by the Component Inspector, as well as via a custom method using:
    textArea.text = newText;
    It works fine in all cases and there are no problems, but the compiler still wants to give me the error:
    1120: Access of undefined property textArea.
    The error doesn't appear when I remove the component parameters (so that it's just a normal MovieClip). It still works, even with the error, so I'm not sure why it wants to complain. Am I doing something wrong or is it just being bitchy?

    By defining them in the class and using the class name under component definition:
    [Inspectable(name="Text", type=String, defaultValue="")]
    public function set text(setText:String)
         textArea.text = setText;
    public function get text():String
         return textArea.text;
    A problem I run into is that the compiler errors prevent the parameters from being defined so I comment out every line that has to do with textArea, define the component, then uncomment them so that it'll work when it runs.

  • Compiler Error with simple vi using MatLab script nodes

    While attempting to build a simple vi to test the capabilities of LabView's interface with MatLab, I received a compiler error message that said I should report the problem to National Instruments Tech Support. The error said, "reference to undefined label from: refPC=0x41C." I've attached the vi that created the error. I am using LabView 7.0 on a PC running Windows 98.
    Attachments:
    Compliererror.vi ‏11 KB

    I don't know if this will help your problem, but there is a fix for some problems with LabVIEW 7.0 and Matlab:
    http://digital.ni.com/public.nsf/websearch/4475BC3CEB062C9586256D750058F14B?OpenDocument
    Good luck,
    -Jim

  • Compilation error with RWTValDlist T find() method

    This code used to compile fine with SC 4.x C++ compiler. We are migrating to "Sun WorkShop 6 update 2 C++ 5.3 2001/05/15" and it is now generating the following compilation error:
    ===============================
    cd generic/src; make -f generic.mk
    /opt/SUNWspro/bin/CC -c -PIC -compat -library=rwtools7 -O2 -I. -I. -I../include -I/home/jm/sunos5.8/ib_service_3.4.3/include -I/opt/local/megen/include -I/opt/SUNWspro/WS6U2/include/CC -I../../interface/include -I../include -I. -I/home/jm/sunos5.8/acell_4.1/include -I/opt/local/access/home/include -I/home/jm/sunos5.8/acell_4.1/include/packetcpp -I/home/jm/sunos5.8/acell_4.1/include/ecl -I/home/jm/sunos5.8/acell_4.1/include/gels -I/home/jm/sunos5.8/acell_4.1/src/security/include -I/home/jm/sunos5.8/acell_4.1/include/sequencer -I/home/jm/sunos5.8/acell_4.1/include/gen -I/home/jm/sunos5.8/acell_4.1/include/recipeMgr -I/home/jm/sunos5.8/acell_4.1/include/EFEFeature -I/home/jm/sunos5.8/ib_service_3.4.3/include -I/opt/local/megen/include -I/opt/local/rv/include -I/opt/local/etk/include -I/opt/local/etk/include/tdl -DTCPIP=1 -D__SYSVR4 -DSHOP=1 -D_SOLARIS=1 -I/opt/local/std_comp/include ACEAlarmClock.C
    "ACEAlarmClock.C", line 479: Error: Could not find a match for RWTValDlist<ACEObject*>::find(int(const ACEObject*&,void*), void**, ACEObject*).
    1 Error(s) detected.
    *** Error code 1
    make: Fatal error: Command failed for target `ACEAlarmClock.o'
    ===============================
    The header file in question is:
    #include <rw/tvdlist.h>
    class ACEAlarmClock : public ACEObject
    // The public interface.
    public:
    ACEAlarmClock();
    // Default constructor.
    private:
    static void alarmCallback(void *passAheadRef, ib_alarmid alarmId);
    static RWTValDlist<ACEObject *> AlarmClocks;
    and the source file in question is:
    void
    ACEAlarmClock::alarmCallback(void *passAheadRef, ib_alarmid alarmId)
    ACEObject *object = 0;                        // returned by find()
    if (AlarmClocks.find(findAlarmId, &alarmId, object))
    ACEAlarmClock alarmClock = (ACEAlarmClock )object;
    if (alarmClock)
    AlarmClocks.remove(alarmClock);
    alarmClock->isActive_ = FALSE;
    alarmClock->onAlarm(passAheadRef, alarmId);
    return;
    Any help is highly appreciated. Thanks.
    Cesar Saavedra
    [email protected]

    The C++ Migration Guide that comes with the compiler explains in detail everything you to need to know about migrating from C++ 4.2 to C++ 5.3.
    Use the "-compat" option on every CC command, compiling and linking. Any code that worked with C++ 4.2 will work the same way with C++ 5.3 in compat mode.
    -compat=4 sets language and binary compatibility to that of the 4.x compilers. -compat=5 sets language and binary compatibility to ANSI/ISO standard mode. If the -compat option is not specified, -compat=5 is assumed.
    - Rose

  • Compiler errors with most recent update

    I just ran the SoftwareUpdate utility and it installed QuickTime 7.1 and Apple Security Update 2006-003. Now when I compile, I get the following errors:
    ld: Undefined symbols:
    _LLCStyleInfoCheckForOpenTypeTables referenced from QuartzCore expected to be defined in ApplicationServices
    _LLCStyleInfoGetUserRunFeatures referenced from QuartzCore expected to be defined in ApplicationServices
    This error used to be "[blahblahblah] referenced from Quicktime epected to be defined in ApplicationServices" not QuartzCore. I looked at /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore and sure enough, it has a modifcation date of today.
    The previous error was caused what appears to be QuickTime 7.0.4 being developed/compiled on Tiger and then distributed to Panther users like myself via Software Update.
    I can't figure out whether the QuickTime update or the Security Update changed my QuartzCore, but I'm having trouble figuring out a solution to this problem.
    Find a copy of the old QuartzCore framework? Figure out some way to add a dummy library that will define these symbols? Make sure Apple developers compile stuff on Panther when delivering code for Panther? I had to downgrade from Quicktime 7.0.4 to 7.0.1 to compile, which broke my iTunes 6.0.4. Now that won't even help, because the Quicktime 7.0.1 downgrade package doesn't contain QuartzCore.

    I can't compile anymore after the recent update on PowerMac G5 1.8GHz.
    It still works on iBook G4 1GHz.
    Both running Mac Os X 10.4.6
    Here is an example of config.log from a failed configuration.
    $ ./configure --prefix=/opt/local --infodir=${prefix}/share/info
    ## Platform. ##
    hostname = orca.local
    uname -m = Power Macintosh
    uname -r = 8.6.0
    uname -s = Darwin
    uname -v = Darwin Kernel Version 8.6.0: Tue Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC
    /usr/bin/uname -p = powerpc
    /bin/uname -X = unknown
    /bin/arch = unknown
    /usr/bin/arch -k = unknown
    /usr/convex/getsysinfo = unknown
    hostinfo = Mach kernel version:
    Darwin Kernel Version 8.6.0: Tue Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC
    Kernel configured for a single processor only.
    1 processor is physically available.
    Processor type: ppc970 (PowerPC 970)
    Processor active: 0
    Primary memory available: 1.25 gigabytes
    Default processor set: 68 tasks, 263 threads, 1 processors
    Load average: 2.71, Mach factor: 0.24
    /bin/machine = unknown
    /usr/bin/oslevel = unknown
    /bin/universe = unknown
    PATH: /opt/local/bin
    PATH: /opt/local/sbin
    PATH: /bin
    PATH: /sbin
    PATH: /usr/bin
    PATH: /usr/sbin
    PATH: /usr/X11R6/bin
    ## Core tests. ##
    configure:1658: checking build system type
    configure:1676: result: powerpc-apple-darwin8.6.0
    configure:1684: checking host system type
    configure:1698: result: powerpc-apple-darwin8.6.0
    configure:1721: checking for a BSD-compatible install
    configure:1776: result: /opt/local/bin/ginstall -c
    configure:1787: checking whether build environment is sane
    configure:1830: result: yes
    configure:1887: checking for gawk
    configure:1903: found /opt/local/bin/gawk
    configure:1913: result: gawk
    configure:1923: checking whether make sets $(MAKE)
    configure:1943: result: yes
    configure:2109: checking whether to enable maintainer-specific portions of Makefiles
    configure:2118: result: no
    User:
    ABI=
    CC=
    CFLAGS=(unset)
    CPPFLAGS=(unset)
    MPN_PATH=
    GMP:
    abilist=32
    cclist=gcc cc
    configure:3776: gcc 2>&1 | grep xlc >/dev/null
    configure:3779: $? = 1
    configure:3833: checking compiler gcc -O2 -mpowerpc
    Test compile:
    configure:3847: gcc -O2 -mpowerpc conftest.c >&5
    cc1: internal compiler error: Bus error
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:<a class="jive-link-external-small" href="http://">http://developer.apple.com/bugreporter> for instructions.
    configure:3850: $? = 1
    failed program was:
    int main () { return 0; }
    configure:4856: result: no
    configure:3754: cc -c conftest.c >&5
    cc1: internal compiler error: Bus error
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:<a class="jive-link-external-small" href="http://">http://developer.apple.com/bugreporter> for instructions.
    configure:3757: $? = 1
    configure:3776: cc 2>&1 | grep xlc >/dev/null
    configure:3779: $? = 1
    configure:3833: checking compiler cc -O2
    Test compile:
    configure:3847: cc -O2 conftest.c >&5
    cc1: internal compiler error: Bus error
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:<a class="jive-link-external-small" href="http://">http://developer.apple.com/bugreporter> for instructions.
    configure:3850: $? = 1
    failed program was:
    int main () { return 0; }
    configure:4856: result: no
    configure:5094: error: could not find a working compiler, see config.log for details
    PowerMac G5 1.8GHz (single processor)   Mac OS X (10.4.6)   1.2GB RAM

  • Compilation errors with store procedure

    Hi guys, I just started SQL so forgive me if I ask any real stupid questions. This is the problem I have right now as said in my title.
    This is my procedure.sql
    CREATE OR REPLACE PROCEDURE verify IS
    no_of_duplicates NUMBER:=0;
    BEGIN
    SELECT COUNT(*) INTO no_of_duplicates
    FROM EMPLOYEE
    WHERE E# =
    (sELECT E# FROM DRIVER
    WHERE EXISTS
    (SELECT E# FROM MECHANIC
    WHERE DRIVER.L# = MECHANIC.L#));
    IF no_of_duplicates:=0 THEN dbms_output.put_line('OK');
    ELSE
    SELECT E#,NAME FROM EMPLOYEE
    WHERE E# =
    (SELECT E# FROM DRIVER
    WHERE EXISTS
    (SELECT E# FROM MECHANIC
    WHERE DRIVER.L# = MECHANIC.L#));
    END IF;
    END verify;
    While trying to create the procedure, it gives me the compilation errors. I have been stuck with this for hours and can't seem to find anything wrong with it. Can anyone point me in the right direction? Thanks!

    Hi,
    Once again, post your code.  The error occurs when you call the procedure, but you haven't posted the code that calls the procedure and causes the error.
    When I do this in SQL*Plus:
    SET  SERVEROUTPUT  ON  FORMAT WRAPPED
    EXEC  verify;
    The procedure you posted runs perfectly (that is, is displays the e# only, exactly as it was designed to do).
    One way to display both the e# and the name is to BULK COLLECT both the e# and name into separate collections, like this:
    CREATE OR REPLACE PROCEDURE verify IS 
        TYPE  e#_table  IS TABLE OF employee.e#%TYPE;
        e#_list    e#_table;
        TYPE  name_table  IS TABLE OF employee.name%TYPE;
        name_list  name_table;
    BEGIN 
        SELECT            e#,       name
        BULK COLLECT INTO e#_list,  name_list
        FROM              employee 
        WHERE   e# IN (
                          SELECT  d.e#
                          FROM    driver    d
                          JOIN    mechanic  m  ON  d.e#  = m.e# 
        IF  e#_list.COUNT  = 0
        THEN
            dbms_output.put_line ('OK, there are no illict duplications');
        ELSE     -- that is, e#_list.COUNT <> 0
            dbms_output.put_line ('The following employees are both drivers and mechanics:');
            FOR j IN 1..e#_list.COUNT LOOP    -- i in parentheses sometimes displays wrong on the OTN site
                dbms_output.put      ( TO_CHAR ( e#_list (j)
                                               , '999999999999'
                dbms_output.put      ('   ');
                dbms_output.put_line (name_list (j)); 
            END LOOP; 
        END IF; 
    END verify; 
    SHOW ERRORS
    Here's the output I get when I run the procedure above with your sample data:
    The following employees are both drivers and mechanics:
                1   John Smith
    You'll notice I made several other changes in your code, sometimes because they are clearly better practices, and sometimes just to show you different ways to do the same thing, which you may or may not want to use in this problem.
    For example, you were doing the same query (with only very slight differences) 2 times: once to get no_of_duplicates, and then a second time to get the actual data.  I don't know if that's the most efficient way to do what you need.  Say there are 1000 rows in the result set.  You'll fetch all 1000 once just to get the total number, (which you don't need, if all you care about at this point is if there are any), and then to get the data.  When you do a BULK COLLECT, you automatically get the COUNT anyway, so why not do the BULK COLLECT first, then use that COUNT to see what you have to do next.  If the COUNT is more than 0, then you've already got the data, and you don't need to fetch it again.  Also, repeating (essentially) the same code is a maintenance problem.  If you ever need to make a change, you need to make the same change in multiple places.  At best, that's a pain; but this is the exactly the kind of mistake that is easy to miss in in testing, and you might have code running for weeks in Production before you notice that sometimes it's giving the wrong results.
    Another example: e# is a NUMBER.  While it is possible to convert NUMBERs into VARCHAR2s, and then store those VARCHAR2s in a VARCHAR2 collecction, wouldn't it make more sense just to store them in a NUMBER collection?

  • Compiling application (with several sub-packages) from another java app

    Hi,
    I'm writing my own build tool and need to be able to compile an external application (pulled from cvs, subversion, ...) from within this build tool.
    Probably I need to use com.sun.tools.javac.Main.compile ?
    But how do I pass classpath, output dir, etc to this class and how can I make it compile all files in all (sub)packages of the given folder ?
    thanks for any help.

    Never mind my previous post, I found a solution to the "the input line is too long" problem:
    Putting all the files in a temporary file and then providing that file as the source to compile, like this:
    javac -g:none -cp <classpath> -d classes @sourcefiles.txtwhere sourcefiles.txt is the name of the temporary file that contains the names of the source files (note the "@"-prefix)
    For some reason, this is not mentioned/documented in the java docs (at least not in my docs)
    Ok, so everything is compiling now, but I have one problem remaining:
    For each "module" that I compile (the application I use for my tests consists of several "modules", i.e. subpackages), I get an error stating that "The system cannot find the path specified"
    This seems obvious, because it is trying to write a file <package-name>\classes\<package-name>\<classname>.class
    But why is it trying to write that file ?
    -> Is this a known bug or something ?
    Let me explain a little more...
    For each compilation I do using the com.sun.tools.javac.Main.compile() method, it is giving this error.
    Everything is compiling correctly, but it seems it is trying to write an extra class file to a wrong path.
    Until now, it was always the first file in the row that gave the problem.
    Example:
    ** module 1:
    sources/com/example/module1/class1.java
    sources/com/example/module1/class2.java
    sources/com/example/module1/class3.java
    sources/com/example/module1/sub1/subclass1.java
    sources/com/example/module1/sub1/subclass2.java
    sources/com/example/module1/sub1/subclass3.java
    ** module 2:
    sources/com/example/module2/class1.java
    sources/com/example/module2/class2.java
    sources/com/example/module2/class3.java
    sources/com/example/module2/sub1/subclass1.java
    sources/com/example/module2/sub1/subclass2.java
    sources/com/example/module2/sub1/subclass3.java
    => My application will compile module 1, do some other things with it and the module 2 and again do some other things with it.
    The result would be:
    Application started.
    Loading configuration: OK
    Compiling sources for module module1: E:\temp\_User_\project\packaging\workingdir\source\com/example/module1\class1.java:12: error while writing com.example.module1.class1: com\example\module1\classes\com\example\module1\class1.class (The system cannot find the path specified)public class class1 extends Thread {
           ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -deprecation for details.
    1 error
    OK
    Note: Contents of my classes directory for module1:
    classes/com/example/module1/class1.class
    classes/com/example/module1/class2.class
    classes/com/example/module1/class3.class
    classes/com/example/module1/sub1/subclass1.class
    classes/com/example/module1/sub1/subclass2.class
    classes/com/example/module1/sub1/subclass3.class
    => all class files are correctly compiled
    Compiling sources for module module2: E:\temp\_User_\project\packaging\workingdir\source\com/example/module2\class1.java:12: error while writing com.example.module2.class1: com\example\module2\classes\com\example\module2\class1.class (The system cannot find the path specified)public class class1 extends Thread {
           ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -deprecation for details.
    1 error
    OK
    Application finished without errors.
    Note: Contents of my classes directory for module2:
    classes/com/example/module2/class1.class
    classes/com/example/module2/class2.class
    classes/com/example/module2/class3.class
    classes/com/example/module2/sub1/subclass1.class
    classes/com/example/module2/sub1/subclass2.class
    classes/com/example/module2/sub1/subclass3.class
    So, as you can see everything compiles as expected, but an error message is displayed related to each first file that is compiled.
    ==> Is this a known issue ?
    ==> What can I do about it ?
    Suggestions welcome

  • Compiler error with default arguments and static template function

    Hi 
    The following does not compile with visual studio 2010 sp1, and compiles with gcc.
    #include <string>
    class A
    public:
       template<class T>
       static T& Get(const std::wstring&);
    class B
     public:
      void f(
        double d,
        double c =A::Get<double>(L"test"));
    int main()
        B b;
        b.f(5);
    It gives me the following error 
    error C2783: 'T & A::Get(const wchar_t *)' : could not deduce template argument for 'T'
    If I change Get to be global function and not static function of A, it compiles.

    It seems to be a compiler bug.  It fails in VS2012, but compiles in VS2013.
    For completion sake, the problem exists if A is a namespace containing Get.  But not if Get is global.
    The only solutions I can see are try to workaround the problem (make Get global) or upgrade to a newer version of VS.

  • "catch is unreachable" compiler error with java try/catch statement

    I'm receiving a compiler error, "catch is unreachable", with the following code. I'm calling a method, SendMail(), which can throw two possible exceptions. I thought that the catch statements executed in order, and the first one that is caught will execute? Is their a change with J2SE 1.5 compiler? I don't want to use a generic Exception, because I want to handle the specific exceptions. Any suggestions how to fix? Thanks
    try {
    SendMail(....);
    } catch (MessagingException e1) {
    logger.fine(e1.toString());
    } catch (AddressException e2) {
    logger.fine(e2.toString());
    public String SendMail(....) throws AddressException,
    MessagingException {....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I found the problem:
    "A catch block handles exceptions that match its exception type (parameter) and exception types that are subclasses of its exception type (parameter). Only the first catch block that handles a particular exception type will execute, so the most specific exception type should come first. You may get a catch is unreachable syntax error if your catch blocks do not follow this order."
    If I switch the order of the catch exceptions the compiler error goes away.
    thanks

  • Compiler bug in 10.1.3 EA1?  get "Internal compilation error" with EnumSet

    The code sample below generates "Error: Internal compilation error, terminated with a fatal exception" when doing make. It's a very simple example, it creates an EnumSet with one element and dumps it via the "toString()" method.
    If I change the line:
    "EnumSet set = EnumSet.of(Buttons.ONE);"
    To:
    "EnumSet set = EnumSet.allOf(c);"
    It works fine. For some reason the "of" method of "EnumSet" crashes the compiler.
    Any ideas?
    ========================================
    package mypackage;
    import java.util.EnumSet;
    public class EnumDemo
    enum Buttons { ONE, TWO, THREE }
    public EnumDemo()
    public void dump()
              Class c = Buttons.class;
              EnumSet set = EnumSet.of(Buttons.ONE);
              System.out.println(set.toString());
    public static void main(String[] args)
    EnumDemo cls = new EnumDemo();
    cls.dump();
    ==============================

    package com.esp.main;
    import java.awt.Dimension;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JTree;
    import javax.swing.event.TreeModelEvent;
    import javax.swing.event.TreeModelListener;
    import javax.swing.event.TreeSelectionEvent;
    import javax.swing.event.TreeSelectionListener;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreePath;
    public class TreeNavigator extends JTree {
    private FormMain fm;
    public TreeNavigatorNode selectedTreeNode;
    public TreePath selectedTreePath;
    public JTree thisTree;
    public TreeNavigator(FormMain pFM) {
    fm = pFM;
    thisTree = this;
    addTreeSelectionListener(new TreeSelectionListener() {
    public void valueChanged(TreeSelectionEvent e) {
    selectedTreeNode = (TreeNavigatorNode)thisTree.getLastSelectedPathComponent();
    if (selectedTreeNode == null) {
    return;
    selectedTreePath = e.getPath();
    addMouseListener(new MouseAdapter() {
    public void mouseReleased(MouseEvent e) {
    if (e.getClickCount() == 1) {
    doPopup(e.getX(), e.getY());
    String nodeInternalFrameClassName = selectedTreeNode.getInternalFrameClassName();
    String nodeNodeTypeDesc = selectedTreeNode.getNodeTypeDesc();
    if ((selectedTreeNode != null) && (nodeNodeTypeDesc.equals("FORM") || nodeNodeTypeDesc.equals("GRAPH"))) {
    fm.showInternalFrame(nodeInternalFrameClassName, fm, null);
    } else if (e.getClickCount() == 1) {
    TreePath path = thisTree.getClosestPathForLocation(e.getX(), e.getY());
    thisTree.setSelectionPath(path);
    public void doPopup(int x, int y) {
    if ((selectedTreeNode != null) && selectedTreeNode.nodeTypeDesc.equals("MODULE")) {
    fm.cm.sendString("Do Nothing");
    } else {
    fm.cm.sendString("Launch form");
    setEditable(false);
    setMaximumSize(new java.awt.Dimension(3200, 3200));
    setPreferredSize(new java.awt.Dimension(800, 100));
    setShowsRootHandles(false);
    setLargeModel(false);
    setRootVisible(false);
    setDragEnabled(false);
    DefaultTreeModel treeNavigatorModel = new DefaultTreeModel(fm.treeNavigatorNodeArray[fm.rootNode], true);
    treeModel.addTreeModelListener(new NavigatorTreeModelListener());
    setModel(treeNavigatorModel);
    expandAll(this);
    try {
    jbInit();
    } catch (Exception e) {
    e.printStackTrace();
    public void expandAll(JTree tree) {
    int row = 0;
    while (row < tree.getRowCount()) {
    tree.expandRow(row);
    row++;
    private void jbInit() throws Exception {
    this.setSize(new Dimension(286, 383));
    TreeNavigatorCellRenderer renderer = new TreeNavigatorCellRenderer(fm);
    this.setCellRenderer(renderer);
    class NavigatorTreeModelListener implements TreeModelListener {
    public void treeNodesChanged(TreeModelEvent e) {
    TreeNavigatorNode node;
    node = (TreeNavigatorNode)(e.getTreePath().getLastPathComponent());
    * If the event lists children, then the changed
    * node is the child of the node we've already
    * gotten. Otherwise, the changed node and the
    * specified node are the same.
    try {
    int index = e.getChildIndices()[0];
    node = (TreeNavigatorNode)(node.getChildAt(index));
    } catch (NullPointerException exc) {
    public void treeNodesInserted(TreeModelEvent e) {
    public void treeNodesRemoved(TreeModelEvent e) {
    public void treeStructureChanged(TreeModelEvent e) {
    }

Maybe you are looking for