Unresolve Symbol

Discussion in 'Java' started by tonyd62246@aol.com, May 14, 2005.

  1. Guest

    Tried the Netbean sample and received an unresolved symbol.
    /*
    * Main.java
    *
    * Created on May 13, 2005, 8:57 PM
    */

    package MyApp;

    /**
    *
    * @author Default
    */
    public class AcrosticExample {

    /** Creates a new instance of Main */
    public AcrosticExample() {
    }

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
    String result = LibClass.AcrosticExample(args);
    System.out.println("Result = " + result);

    }

    }
    D:\Netbeans_Projects\MyApp\src\MyApp\AcrosticExample.java:23: cannot
    resolve symbol
    symbol : variable LibClass
    location: class MyApp.AcrosticExample
    String result = LibClass.AcrosticExample(args);
    1 error
    BUILD FAILED (total time: 1 minute 3 seconds)

    Regards,

    Tony
    , May 14, 2005
    #1
    1. Advertising

  2. Rhino Guest

    <> wrote in message
    news:...
    > Tried the Netbean sample and received an unresolved symbol.
    > /*
    > * Main.java
    > *
    > * Created on May 13, 2005, 8:57 PM
    > */
    >
    > package MyApp;
    >
    > /**
    > *
    > * @author Default
    > */
    > public class AcrosticExample {
    >
    > /** Creates a new instance of Main */
    > public AcrosticExample() {
    > }
    >
    > /**
    > * @param args the command line arguments
    > */
    > public static void main(String[] args) {
    > String result = LibClass.AcrosticExample(args);
    > System.out.println("Result = " + result);
    >
    > }
    >
    > }
    > D:\Netbeans_Projects\MyApp\src\MyApp\AcrosticExample.java:23: cannot
    > resolve symbol
    > symbol : variable LibClass
    > location: class MyApp.AcrosticExample
    > String result = LibClass.AcrosticExample(args);
    > 1 error
    > BUILD FAILED (total time: 1 minute 3 seconds)
    >

    I've never used NetBeans but the error indicates that the compiler is
    looking for a class named LibClass that contains a method AcrosticExample()
    that is expecting a String array as its only argument. You need to put that
    class in the same directory as the your program or specify the path to that
    class in your classpath when you invoke the compiler.

    For example, if your program is in C: and your LibClass class is in D: when
    you compile, you will need something like this:

    javac -cp :D\LibClass AcrosticExample.java

    Rhino
    Rhino, May 14, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Momo
    Replies:
    0
    Views:
    480
  2. sunil
    Replies:
    1
    Views:
    967
  3. baumann@pan
    Replies:
    1
    Views:
    742
    Richard Bos
    Apr 15, 2005
  4. Song Ma
    Replies:
    2
    Views:
    229
    Charles Oliver Nutter
    Jul 20, 2008
  5. Replies:
    6
    Views:
    1,778
Loading...

Share This Page