Problem accessing Class A from Class B in the same package

Hi,
I have two classes, Class A and Class B residing in the same directory.
Class A is called as QuitGreen65
Class B is called as Green65
QuitGreen65 has been defined as
public class QuitGreen65 extends Dialog {
and Green65 has been defined as
public class Green65 extends Frame {
In Green65 I have a function with the following piece of code
void Green65_WindowClosing_Interaction1(java.awt.event.WindowEvent event)
     try {
          // QuitDialog Create and show as modal
          (new QuitGreen65(this, true)).setVisible(true);
catch (Exception e) {
Althoug this looks fine to me, I am getting the following error during compilation
Green65.java:267: cannot resolve symbol
symbol : class QuitGreen65
location: class Green65
(new QuitGreen65(this, true)).setVisible(true);
^
Could anyone please help me in resolving this situation,
Thanks,
Rahul.

This would happen if the class path were incorrect. The classpath needs to include the location of the root of the package hierarchy and the hierarchy needs to be reflected in your directory structure.
Chuck

Similar Messages

  • Cannot resolve symbol when the classes are in the same package

    i have one interface and two classes all in the same package. am getting " cannot resolve symbol", when the code refers to the interface or the class .
    the package name is collections.impl and
    the directory i used to store all the java files:
    c:\jdk\bin\collections\impl.
    isthere any othe option other than compiling all the files from the comand line at the same time?
    please help - i m new to java.

    If you have:
    I.java:
    package some;
    public interface I {
        void method();
    }A.java:
    package some;
    public class A implements I {
        public void method() {
            new B();
    }B.java:
    package some;
    public class B implements I {
        public void method() {
            new A();
    }in c:/temp/some for example
    you can compile your files with
    javac c:/temp/some/*.java
    It seems that you have errors in your code.
    Recheck it twice or use NetBeans IDE(http://www.netbeans.org) it will do this for you ;)

  • Cannot access APEX pages from other IP in the same network

    Hi,
    I installed APEX 3.0 on Oracle XE (Windows OS). The PC I installed has a static IP (no DHCP and DHCP servie is stopped).
    I started the HTTP server and I am able to access the XE database home page and the APEX developer page and admin page. This PC has a static IP too.
    When I tried to access the APEX page from another PC. It is not loading the page.
    When tried using Internet Explorer it says "Internet Explorer Cannot display the page"
    Please let me know whether I missed any configurations to the access the page from another IP.
    Thanks.
    Niko

    Hi,
    Most likly the cause is windows firewall. Try the following:
    1 - from Control panel select windows firewall
    2 - click on the exception tab
    3 - Click Add port
    4 - for name enter yhe name you want (APEX)
    5 - For port number enter APEX prot number
    Hope that will solve your problem
    Regards,
    Ribhi

  • Calling a method of one class from another withing the same package

    hi,
    i've some problem in calling a method of one class from another class within the same package.
    for eg. if in Package mypack. i'm having 2 files, f1 and f2. i would like to call a method of f2 from f1(f1 is a servlet) . i donno exactly how to instantiate the object for f2. can anybody please help me in this regard.
    Thank u in advance.
    Regards,
    Fazli

    This is what my exact problem.
    i've created a bean (DataBean) to access the database. i'm having a servlet program (ShopBook). now to check some details over there in the database from the servlet i'm in need to use a method in the DataBean.
    both ShopBook.java and DataBean.java lies in the package shoppack.
    in ShopBook i tried to instantiate the object to DataBean as
    DataBean db = new DataBean();
    it shows the compiler error, unable to resolve symbol DataBean.
    note:
    first i compiled DataBean.java, it got compiled perfectly and the class file resides inside the shoppack.
    when i'm trying to compile the ShopBook its telling this error.
    hope i'm clear in explaining my problem. can u please help me?
    thank u in advance.
    regards,
    Fazli

  • JNDI Naming Problem accessing Session Bean from Message Driven Bean

    Hi,
         I am facing a very strange problem in JNDI look up accessing a Session Bean from a Message Driven Bean. I have a session fa�ade bean(Remote Bean) which is being called from Struts Action class getting the home reference from the ServiceLocator (I have implemented ServiceLocator pattern to obtain JNDI reference for all EJBs). When I am calling the session fa�ade EJB from the Struts Action class everything is working fine.
         But when I am trying to call the same EJB from my Message Driven Bean, I am getting a JNDI exception (NameNotFoundException - No Object bound to name �java:comp/env/ejb/EJBJNDIName�). I am trying to get the remote reference from the same ServiceLocator which is successfully providing me a reference while calling from the struts action class. But the same ServiceLocator is not able to provide me a reference while calling from the Message Driven Bean. If I use the JNDI name directly like �EJBJNDIName� in the lookup it is working fine. The lookup for the name is working fine and I am able to call the Session Fa�ade bean with that reference.
         I am really not sure what exactly the problem is. If I have any problem in the ServiceLocator, it should have given me the same error while calling from Struts Action class. But it is working fine with the full name �java:comp/env/ejb/EJBJNDIName� calling from the struts action class. I am not sure whether Message Driven Bean has something to do with it. Why I am not able to get a reference of the EJB with the full name? Please Help.
    Thanks
    Amit

    Hi Bhagya,
    Thanks for your response. I think from EJB container we can call Local EJBs with the full JNDI name. The session facade bean which is being called is a remote bean. From the session facade bean I am calling a local stateless session bean for database access. I am getting the reference of the local EJB from my session facade bean with full JNDI name "java:comp/env/ejb/EJBJNDIName". It is working fine with out any problem. My servicelocator is able to provide me the reference of the local EJB from the session facade remote bean with Full JNDI name. I am only having this problem calling from the MDB. I am really not sure whether what is causing it?
    Thanks
    Amit

  • Accessing other classes in the same package

    I have the following two classes in the same package. Why cant I access the myString vairable from Test2 like I try and do below?
    package test;
    class Test1 {
         public static String myString = "Hello world";
    package test;
    class Test2 {
         static void printMe(){
              System.out.println(Test1.myString);
         public static void main(String args[]) {
                   printMe();
    }

    Why when I take the "package test;" line of code away I can compile it normally?This depends on how you call the compiler and how you have set the class search path. Classes that are in a package are expected to be found from some place in the search path under a directory that has the same name as the package. The default class path consists of only the current directory, ".", so you can avoid all problems by compiling and running from the directory above "test" rather than "test" itself.

  • I have installed ACDSee Pro3 and have problem to transfer photofiles from device: I got the message; The item could not be edited because you do not have sufficent access privileges or destination volume is no longer available." What can I do?

    I have installed ACDSee Pro3 and have problem to transfer photofiles from device: I got the message; The item could not be edited because you do not have sufficent access privileges or destination volume is no longer available." What can I do?

    Ask the ACDSee Pro support personnel. 
    With iPhoto that message means the library is a referenced library (photo not copied when imported into iPhoto's structure) and the source file is not where it was when first added to the library.  I don't know how ACDSee works. Does it have a referenced mode as opposed to copying photos into its structure?
    OT

  • I have a new Macbook pro and need to run some Windows software, it appears "Parallel" should work well from what I've have read. Will I have any issues or problems accessing and printing from various printers on my Windows 7 network within Parallel?

    I have a new Macbook pro and need to run some Windows software, it appears "Parallel" should work well from what I've have read. Will I have any issues or problems accessing and printing from various printers on my Windows 7 network within Parallel? Is Parallel in fact the best way to go?

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • Problems accessing itunes store from itunes

    I have a new Hewlett Packard laptop which runs on Vista. I can load itunes but when I try to access itunes store from itunes I get the following error message:
    itunes cannot connect to the itunes store, make sure your network connection is active and try again. There are no problems with my network connection, can any one advise?
    Many thanks.

    Just run the network diagnostics and got this result.
    Microsoft Windows Vista Home Edition (Build 6000)
    Hewlett-Packard HP Pavilion dv2000 (RY395EA#ABU)
    iTunes 7.3.2.6
    Current user is not an administrator.
    Network Adapter Information
    Adapter Name: {3C041088-24CC-4479-B125-2CD62BD51FC1}
    Description: Bluetooth Device (Personal Area Network)
    IP Address: 0.0.0.0
    Subnet Mask: 0.0.0.0
    Default Gateway: 0.0.0.0
    DHCP Enabled: Yes
    DHCP Server:
    Lease Obtained: Thu Jan 01 00:00:00 1970
    Lease Expires: Thu Jan 01 00:00:00 1970
    DNS Servers:
    Adapter Name: {83B81DF1-7E46-41D7-80B0-31BC4AC8814D}
    Description: Intel(R) PRO/Wireless 3945ABG Network Connection
    IP Address: 192.168.1.101
    Subnet Mask: 255.255.255.0
    Default Gateway: 192.168.1.1
    DHCP Enabled: Yes
    DHCP Server: 192.168.1.1
    Lease Obtained: Sat Aug 25 11:48:50 2007
    Lease Expires: Sun Aug 26 11:48:50 2007
    DNS Servers: 194.168.4.100
    194.168.8.100
    Adapter Name: {5EA6FE6E-AB37-4640-A3BB-5C0FB94C0B34}
    Description: Intel(R) PRO/100 VE Network Connection
    IP Address: 0.0.0.0
    Subnet Mask: 0.0.0.0
    Default Gateway: 0.0.0.0
    DHCP Enabled: Yes
    DHCP Server:
    Lease Obtained: Thu Jan 01 00:00:00 1970
    Lease Expires: Thu Jan 01 00:00:00 1970
    DNS Servers:
    Network Connection Information
    Active Connection: LAN Connection
    Connected: Yes
    Online: Yes
    Using Modem: No
    Using LAN: Yes
    Using Proxy: No
    SSL 3.0 Support: Enabled
    TLS 1.0 Support: Enabled
    Firewall Information
    Windows Firewall is off.
    Connection attempt to Apple web site was unsuccessful.
    The network connection timed out.
    Connection attempt to iTunes Store was successful.
    Secure connection attempt to iTunes Store was successful.

  • HELP: signer info doesn't match info of other classes in the same package

    I have several jars which need to be signed. They contain several applications and packages which
    are split up based on which parts are needed by server vs client code. How do I get rid of this error?
    I'm signing all the jars using the keytool and jar signer in java 1.3.1. I generate a certificate file.
    My assumption is that each time I sign a different jar, the info is updated in the keystore and
    certificate file. What might I be doing wrong when signing multiple jars?
    (Yes, code from the same package may be in different jars. I don't have any controll of this,
    I'm not in charge of the build and distribution of the various packages).
    Exception in thread "main" java.lang.SecurityException: class
    "com.ibm.ucm.bootup.UCMSysMgtConstants"'s signer information does not match signer
    information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at com.ibm.ucm.bootup.UCMServerUpdater.<init>(Unknown Source)
    at com.ibm.ucm.bootup.UCMServerUpdater.<init>(Unknown Source)
    at com.ibm.ucm.bootup.UCMAdminServerUpdater.<init>(Unknown Source)
    at com.ibm.ucm.bootup.UCMAdminServerUpdater.main(Unknown Source)

    Where you able to solve this issue? (I'm seeing the same problem.)
    Thanks,
    Stacy

  • Cannot acess classes in the same package.

    Hi
    I have "a.java" in c:/java/test directory. I have "b.java" file in the same directoty which creates a instance of "a" class. "a.java" compiled fine. But when compliling "b.java" i get error message
    cannot resolve symbol
    symbol : class a
    I have used "public" as acess modifier for both the classes. As per rule I can access the classes in the same package. But for some reason my program is not compiling. Can anyone tell me what the acutal problem is.
    Thanks in advance.

    Javapedia: Classpath
    Setting the class path (Windows)
    How Classes are Found
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • Signing 2 different classes in the same package differently.

    I have a class B in the default package.
    I have another class C which is kept in a jar file without any package information. I have signed this jar file in using one alias in my keystore.
    class B instantiates class C and passes its own reference to it.
    When I run class B, i get an error saying,
    Exception in thread "main" java.lang.SecurityException: class "C"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(ClassLoader.java:599)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:532)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at B.main(B.java:23)
    Does this mean, I cannot have 2 classes in the same package, signed differently?
    Thanks
    AahRiMaaN

    coupdegrace wrote:
    JoachimSauer wrote:
    Force1 wrote:
    Do the files get automatically compiled if they are in the same package ?No, but if the class you compile depends on another that's not yet been compiled (or for which the source is newer than the .class file), then it will be compiled as well.Like,say If i add a int parameter, amethod(int i),then I will get a error,isn't it ?It actually gives a error.
    Also it will compile automatically only for the first time and any changes made to any file will have to be compiled into latest .class files ?Yes.
    Did compile the files under the above constraints.
    So it is a smooth "run" for the first time,but not after editions to the either files.
    I would appreciate if experts give some feedback on this.
    Thank you.

  • Cannot compile two classes that are on same package

    When I compile two classes that are on same package one class that is independent of other class gets compiled but the other class which uses
    the first one shows cannot find symbol error with the first class name

    try...
    javac *.java
    that should compile all the java files in that folder at the same time. I dont know if that will fix your problem but it is worth a shot.

  • [svn] 1091: compiler: class renaming in the compiler package

    Revision: 1091
    Author: [email protected]
    Date: 2008-04-03 13:32:09 -0700 (Thu, 03 Apr 2008)
    Log Message:
    compiler: class renaming in the compiler package
    * flex2.compiler:Context to CompilerContext
    * flex2.compiler.util:Console to ConsoleLogger
    Bugs: n/a
    QA: No
    Doc: No
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/API.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilationUnit.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerSwcContext.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/PersistenceStore.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Source.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/SymbolTable.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/abc/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/EmbedExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/StyleExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/SyntaxTreeEvaluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingFirstPassE valuator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/TypeAnalyzer.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeSecondPassEv aluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ASDocExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/i18n/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractDocumentBuil der.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/OEMConsole.java
    Added Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerContext.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/ConsoleLogger.java
    Removed Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Context.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Console.java

    Out of curiosity, do you have a directory called WEB-INF inside of
    MyPortal\portalApp\portlets\WFWeb? If so, can you try removing/renaming it?
    "Gavin" <[email protected]> wrote in message
    news:40581f2e$[email protected]..
    >
    I create a Application naming "MyPortal" in WorkShop.
    And create a Project naming "portalApp".
    In folder "portalApp", I create a folder "portlets"
    And create a PageFlow in folder "portlets", so I get a jpf naming"WFWebController.jpf"
    >
    >
    W:\bea\user_projects\applications\MyPortal\portalApp\portlets\WFWeb\WFWebCon
    troller.jpf
    >
    But I add some java code in the method of WFWebController.jpf
    when I run the WFWebController.jpf from workshop
    the compiler throws a ERROR message "A PageFlowController at the root ofthe web
    application must be in the default package."
    Have any solution about this ERROR ?
    Thanks,
    Gavin.

  • [svn:osmf:] 15863: Remove FLEXOSMF 4.0 tagging, the OSMF for Flex 4 version of this class lives in the display package

    Revision: 15863
    Revision: 15863
    Author:   [email protected]
    Date:     2010-05-02 19:20:15 -0700 (Sun, 02 May 2010)
    Log Message:
    Remove FLEXOSMF 4.0 tagging, the OSMF for Flex 4 version of this class lives in the display package
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/layout/ScaleMode.as

    What I've done is remove osmf.swc from the Flex 4.0 sdk, then I added the new osmf.swc file to my libs folder for my project. Is there a for updating osmf in Flex 4.0 it works nativly with the sdk. The original reason why I got errors was because the frameworks/projects/osmf/src/OSMFClasses.as  packages in Flex 4 were not the same as the new osmf.swc (most of the flex 4 swc have these package reference files). So those would have to be updated every time the osmf packages change.

Maybe you are looking for