Warning - Cannot find class de.ewe.ikdb.action.ActionForward

Hi,
I'm using external classes e.g. struts as a MVC framework. Using JavaDoc to create the API documentation causes lots of the following warnings:
warning - Cannot find class de.ewe.ikdb.action.ActionForward
Actually the class in question is form struts, in the package org.apache.struts.action. As I'm using ant to compile the classes and to generate the documentation so the class path should be ok.
First I tried the -link option to access the package-list file of struts. This didn't work (but maybe this is a problem due to our firewall).
So I downloaded the documentation and put it in a local directory and used the -linkoffline option instead. Now the javadoc command works again but I still get these warning messages.
Does anyone know how to avoid this?
Regards,
hedtfeld.

Hi guys,
as far as I understand I have to import the classes excplicitly and not with wildcards as my lazy self prefers to do it. It would be nice though to be able to use the wildcard as this is allowed by the java spec ...
Hope this will help anyone facing the same problem.
- hedtfeld.

Similar Messages

  • Cannot find class: Exception??

    Hi
    The compiler claims it cannot find class FileNotFoundException or any other exception in my Main. Any packages I import has no problem. My structure:
    java \ myMain \ Main.java
    java \ com \ myName \ packages //no, the space is just there as visual help:)
    Use javac -classpath java\ @compile.file
    ...where compile.file is a txt file giving the paths and filenames to all files I include.
    This is first time I use the -classpath parameter, but I believed java.lang always was included. What Am I doing wrong.
    regards
    JT

    You should review the tool documentation for the javac command and its use of classpath.
    Your problem appears to be due to the way you defined classpath, "-classpath java\". While you don't provide enough information to conclusively say what it should be, I'm guessing it should also include java\myMain\ - assuming that you're issuing the javac command from the parent of the \java\ directory, as your command example indicates.
    Here is a clip about its use of the classpath.
    "When compiling a source file, the compiler often needs information about a type whose definition did not appear in the source files given on the command line. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file but which provide information through inheritance.
    For example, when you subclass java.applet.Applet, you are also using Applet's ancestor classes: java.awt.Panel, java.awt.Container, java.awt.Component, and java.lang.Object.
    When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the CLASSPATH environment variable or by using the -classpath command line option. (For details, see Setting the Class Path).
    If you set the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path for both class files and source files."

  • Preverification error: Cannot find class com/sun/perseus/model/Viewport

    Hi all,
    I have a (previously) working Midlet to which I have added one line as follows:
    SVGImage image = (SVGImage)SVGImage.createEmptyImage(null);
    - and imported the necessary from javax.microedition.m2g. (I am using the library that comes with the WTK, jsr226.jar).
    This builds, jars, obfuscates fine. But when I try to preverify (using Antenna's wtkpreverify) on the jar, it gives up in disgust very swiftly as follows:
    [wtkpreverify] Error preverifying class javax.microedition.m2g.ScalableGraphics
    [wtkpreverify] VERIFIER ERROR javax/microedition/m2g/ScalableGraphics.render(IILjavax/microedition/m2g/ScalableImage;)V:
    [wtkpreverify] Cannot find class com/sun/perseus/model/Viewport
    I'm using the WTK2.5.1ea and antenna 0.9.14, CLDC1.1, MIDP2.0...
    Many thanks for any ideas.

    Problem resolved simply by replacing jsr226.jar (as distributed with WTK2.5.1ea) with m2g.jar (as distributed with J2MEPolish).

  • Cannot find class JPanel

    Hi,
    Im trying to use swing for almost the first time.
    I changed my system to Linux and installed J2sdk 1.4.
    When I write a class
    e.g.
    import javax.swing.*;
    import java.awt.*;
    etc...
    class Test extends JPanel {
    I receive an error message "Cannot find class "JPanel""
    Can anyone help ? Maybe I didnt install the right thing ?
    Thanks
    Ulrike

    you sure reinstall and overwrite your current sdk. Do you have the runtime environment installed too -- should come with the sdk

  • Cannot find class java/lang/Thread

    I'm getting this error trying to compile a program that I'm writing in java. Its a very simple program just to get me back to basics. Any ideas as to how I can fix this problem??

    Extracted from Sun's website,
    * Error Message: "Exception in thread NULL" or
    "Unable to initialize threads: cannot find class java/lang/Thread"
    If you are getting one of these fatal error messages when running java,
    javac, or appetviewer, you should check your CLASSPATH environment variable.
    It may list "c:\java" or the "classes" directory from an older release. You can either unset the CLASSPATH variable, or set it to
    include only the latest version of the Java platform class library. For example:
    C:\> set CLASSPATH=.;C:\jdk1.1.8\lib\classes.zip
    This will make sure that you are using the correct classes for this release.
    -- Sudha

  • Cannot find class "Hello"

    Hi,
    I'm developing a application for a windows ce v.2.11, and I've installed in my PDA (MIPS) Personal Java. The samples of Personal Java run perfectly. I've create a simple new class (Hello.class) with Sun One Studio, then I copy this file (Hello.class) in my pda, and when I run the application I saw this messages: "Cannot find class Hello".
    Anybody can explain me step by step the correct way to create a new class or a new jre to run in my PDA?
    Another question: Where are installed the classes as AWT?
    Thanks

    Please see my reply to your latest post.

  • Error:Cannot find class

    Hi
    I compile my application correctly, but when I copy this application in my PDA, and run this application (Hello.class) with Personal Java I saw a this message: Cannot find class Hello.class.
    I don't compile javacheck before copy in my PDA the application.
    Please help me

    Hi,
    are you sure that your classpath is set correct?
    For checking this you'll need a registry editor and check the command that is entered for the .class file extensions.
    Have a nice day,
    FReAK

  • Java teststand - Error 1500 Cannot find class

    Hi everyone,
    I am using TestStand 2010 and Java 1.7.
    I try to add a java class in the Computer example folder, and call the method.
    The java class is simply like below, because I just want to try calling my own java class.
    I have set the Class Path in Start JVM to the directory where the Computer example (which is also the directory where I put my java class) are located.
    TestStand can call the Computer's methods, but not mine (got error Error 1500 Cannot find class). I put my my java method calling among the defaults Computer example calls.
    Furthermore I have read similiar threads but still I cannot solve the error.
    Where is the part I miss, actually? Please share some insights.
    Note: I even try to leave the Class Path empty, but TestStand still can call the Computer's methods. Why?
    public class TestJava {
    public static void main(String[] args) {
    public String returnString(boolean a){
    return "success";
    Solved!
    Go to Solution.

    In order to load a class that is inside a package you have to use the package notation (or modify the example in order to use it). The path to the class is passed directly to the JVM in order to load the class, but really what is needed is the package from the class path including the full path to the class. 
    That means you have to do the following:
    1. Set the class path to the base directory where you built all your classes, if you have the following structure:
    MyFile.java
    builds
    MyPackage
    MyFile.class
    You have to set the classpath to the builds directory
    2. When you configure your steps, you have to set the path to the class in your Java steps to MyPackage/MyFile.class (note separator is a slash, not the usual Windows backslash, so the browse button doesn't quite help with that). 
     Another important thing is that when you set the classpath you are deleting the normal class path in Java, if you are using Java classes from the default libraries you might have to add <jre directory>\lib\rt.jar

  • Cannot find class javax.swing.JOptionPane

    Hello,
    I imported the class
    import javax.swing.JOptionPane;and written as a first line of my code in the form of a .java file.
    but error occurs as : cannot find the class javax.swing.JOptionPane. What should I do.
    Thank you.

    Are you doing something likeimport javax.swing.JOptionPane;
    class Test {
        public static void main(String args[]) {
            JOptionPane.showMessageDialog(null, "Testing",
                    "Testing", JOptionPane.INFORMATION_MESSAGE);
    }Mark

  • Cannot find class CustomerFacadeRemote in NetBeans IDE 5.0 Quick Start Guid

    Hi,
    I am new to Sun Java Studio Enterprise 8.1. I am follwing NetBeans IDE 5.0 Quick Start Guide for J2EE Applications example and got two following errors:
    C:\SunStudioWS\CustomerBook\CustomerBook-war\src\java\web\CustomerDetail.java:41: cannot find symbol
    symbol : class CustomerFacadeRemote
    location: package ejb
    ejb.CustomerFacadeRemote custFacade = lookupCustomerFacadeBean();
    C:\SunStudioWS\CustomerBook\CustomerBook-war\src\java\web\CustomerDetail.java:41: cannot find symbol
    symbol : method lookupCustomerFacadeBean()
    location: class web.CustomerDetail
    ejb.CustomerFacadeRemote custFacade = lookupCustomerFacadeBean();
    2 errors
    C:\SunStudioWS\CustomerBook\CustomerBook-war\nbproject\build-impl.xml:299: The following error occurred while executing this line:
    C:\SunStudioWS\CustomerBook\CustomerBook-war\nbproject\build-impl.xml:141: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 1 second)
    Here is the code:
    * CustomerDetail.java
    * Created on July 23, 2007, 3:27 PM
    package web;
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author yl
    * @version
    public class CustomerDetail extends HttpServlet {
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Servlet customerDetail</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Servlet customerDetail at " + request.getContextPath () + "</h1>");
    String customerNr = request.getParameter("customer_nr");
    if((customerNr != null) && !(customerNr.equals("")))
    try{
    ejb.CustomerFacadeRemote custFacade = lookupCustomerFacadeBean();
    out.println("Customer's info for nr. " + customerNr + ": " + custFacade.getCustomerInfo(
    Integer.parseInt(customerNr)));
    }catch(javax.ejb.FinderException ex){
    out.println("Customer with nr. " + customerNr +" not found");
    out.println("<form>");
    out.println("Customer number: <input type='text' name='customer_nr' />");
    out.println("<input type=submit value=Select />");
    out.println("</form>");
    out.println("</body>");
    out.println("</html>");
    out.close();
    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    /** Handles the HTTP <code>GET</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    /** Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    /** Returns a short description of the servlet.
    public String getServletInfo() {
    return "Short description";
    // </editor-fold>
    private web.ServiceLocator serviceLocator;
    private web.ServiceLocator getServiceLocator() {
    if (serviceLocator == null) {
    serviceLocator = new web.ServiceLocator();
    return serviceLocator;
    private ejb.CustomerFacaderRemote lookupCustomerFacaderBean() {
    try {
    return ((ejb.CustomerFacaderRemoteHome) getServiceLocator().getRemoteHome("java:comp/env/ejb/CustomerFacaderBean",ejb.CustomerFacaderRemoteHome.class)).create();
    } catch(javax.naming.NamingException ne) {
    java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne);
    throw new RuntimeException(ne);
    } catch(javax.ejb.CreateException ce) {
    java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ce);
    throw new RuntimeException(ce);
    } catch(java.rmi.RemoteException re) {
    java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,re);
    throw new RuntimeException(re);
    Thank you very much for any help.
    ylou

    In the code you have posted, some places refer to '.CustomerFacader' while others refer to '.CustomerFacade' leading to issues.
    Also: Have you considered using NetBeans 5.5.1 as an alternative to JSE 8.1?
    http://forum.java.sun.com/thread.jspa?threadID=5192837

  • Servlet cannot find classes when in a EAR

              Hi
              I have a EAR that contains a EJB module and a web application module.
              The Web application module contains two servlets to be deployed. One is Action
              Servlet (struts.jar) and the other is our home-made. I am able to deploy the
              WAR and JAR separately, but when these are packaged in an EAR I get the following
              errors
              <03-Oct-2003 11:14:58 o'clock BST> <Error> <HTTP> <BEA-101254> <[ServletContext(id=6832671,name=payments-web,context-path=/payments-web)]:
              Servlet class org.apache.struts.action.ActionServlet for servlet action could
              not be handled by the classloader with classpath C:\bea2\user_projects\domains\paymentsdomain\myserver\upload\payments.ear\payments-web.war;C:\bea2\user_projects\domains\paymentsdomain\myserver\upload\payments.ear\payments-web.war\WEB-INF\classes;C:\bea2\user_projects\domains\paymentsdomain\.\myserver\.wlnotdelete\extract\myserver_payments_payments-web\jarfiles\WEB-INF\lib\struts30440.jar.
              java.lang.ExceptionInInitializerError.>
              <03-Oct-2003 11:14:58 o'clock BST> <Error> <HTTP> <BEA-101216> <Servlet: "action"
              failed to preload on startup in Web application: "payments-web".
              javax.servlet.ServletException: [HTTP:101254][ServletContext(id=6832671,name=payments-web,context-path=/payments-web)]:
              Servlet class org.apache.struts.action.ActionServlet for servlet action could
              not be handled by the classloader with classpath C:\bea2\user_projects\domains\paymentsdomain\myserver\upload\payments.ear\payments-web.war;C:\bea2\user_projects\domains\paymentsdomain\myserver\upload\payments.ear\payments-web.war\WEB-INF\classes;C:\bea2\user_projects\domains\paymentsdomain\.\myserver\.wlnotdelete\extract\myserver_payments_payments-web\jarfiles\WEB-INF\lib\struts30440.jar.
              java.lang.ExceptionInInitializerError.
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:822)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181)
              at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3154)
              at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5637)
              at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:866)
              at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2017)
              at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2058)
              at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2624)
              at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2547)
              at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2349)
              at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2431)
              at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2343)
              at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2511)
              at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833)
              at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542)
              at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
              at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              <03-Oct-2003 11:14:58 o'clock BST> <Warning> <Deployer> <BEA-149004> <Failures
              were detected while initiating Deploy task for application payments.>
              <03-Oct-2003 11:14:58 o'clock BST> <Error> <Deployer> <BEA-149201> <Failed to
              complete the deployment task with ID 1 for the application payments.
              weblogic.management.DeploymentException:
              Exception:weblogic.management.ApplicationException: start() failed.
              Module: payments-web Error: java.lang.ExceptionInInitializerError
              My observations are
              1. The servlet has been located.
              2. Please note the <Warn> message that the ActionServlet class could not be handled
              by the classloader. What does this mean ???
              3 I also tried putting these jars in APP-INF/lib but got the same errors
              I am using WLS 8.1 SP1 on XP professional
              Thanks
              Jasmeet
              

              Just to add on to that ...
              If I put all my required/referemced application classes and dependent classes
              in System CLASSPATH, the whole deploys and runs quite nicely.
              Is that allowed ?? Would it not be better to have some application level classloading
              rather than going for the system classpath
              thanks
              jasmeet
              "jasmeet" <[email protected]> wrote:
              >
              >Hi
              >
              >I have a EAR that contains a EJB module and a web application module.
              >The Web application module contains two servlets to be deployed. One
              >is Action
              >Servlet (struts.jar) and the other is our home-made. I am able to deploy
              >the
              >WAR and JAR separately, but when these are packaged in an EAR I get the
              >following
              >errors
              >
              ><03-Oct-2003 11:14:58 o'clock BST> <Error> <HTTP> <BEA-101254> <[ServletContext(id=6832671,name=payments-web,context-path=/payments-web)]:
              >Servlet class org.apache.struts.action.ActionServlet for servlet action
              >could
              >not be handled by the classloader with classpath C:\bea2\user_projects\domains\paymentsdomain\myserver\upload\payments.ear\payments-web.war;C:\bea2\user_projects\domains\paymentsdomain\myserver\upload\payments.ear\payments-web.war\WEB-INF\classes;C:\bea2\user_projects\domains\paymentsdomain\.\myserver\.wlnotdelete\extract\myserver_payments_payments-web\jarfiles\WEB-INF\lib\struts30440.jar.
              >java.lang.ExceptionInInitializerError.>
              ><03-Oct-2003 11:14:58 o'clock BST> <Error> <HTTP> <BEA-101216> <Servlet:
              >"action"
              >failed to preload on startup in Web application: "payments-web".
              >javax.servlet.ServletException: [HTTP:101254][ServletContext(id=6832671,name=payments-web,context-path=/payments-web)]:
              >Servlet class org.apache.struts.action.ActionServlet for servlet action
              >could
              >not be handled by the classloader with classpath C:\bea2\user_projects\domains\paymentsdomain\myserver\upload\payments.ear\payments-web.war;C:\bea2\user_projects\domains\paymentsdomain\myserver\upload\payments.ear\payments-web.war\WEB-INF\classes;C:\bea2\user_projects\domains\paymentsdomain\.\myserver\.wlnotdelete\extract\myserver_payments_payments-web\jarfiles\WEB-INF\lib\struts30440.jar.
              >java.lang.ExceptionInInitializerError.
              > at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:822)
              > at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236)
              > at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181)
              > at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3154)
              > at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5637)
              > at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:866)
              > at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2017)
              > at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2058)
              > at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2624)
              > at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2547)
              > at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2349)
              > at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2431)
              > at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2343)
              > at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2511)
              > at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833)
              > at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542)
              > at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
              > at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >>
              ><03-Oct-2003 11:14:58 o'clock BST> <Warning> <Deployer> <BEA-149004>
              ><Failures
              >were detected while initiating Deploy task for application payments.>
              ><03-Oct-2003 11:14:58 o'clock BST> <Error> <Deployer> <BEA-149201> <Failed
              >to
              >complete the deployment task with ID 1 for the application payments.
              >weblogic.management.DeploymentException:
              >Exception:weblogic.management.ApplicationException: start() failed.
              > Module: payments-web Error: java.lang.ExceptionInInitializerError
              >
              >
              >
              >My observations are
              >1. The servlet has been located.
              >2. Please note the <Warn> message that the ActionServlet class could
              >not be handled
              >by the classloader. What does this mean ???
              >3 I also tried putting these jars in APP-INF/lib but got the same errors
              >
              >
              >I am using WLS 8.1 SP1 on XP professional
              >
              >
              >Thanks
              >Jasmeet
              

  • Cannot find class in same package but in different file

    I have following two source files. Both the file has same package statement as below
    package java.buron.doeacc ;
    But whenever i try to compile File: shoepolish.java ( mainfram.java compiled succesfully before)
    following error message appear
    ..\..\buron\doeacc\shoepolish.java:12: cannot resolve symbol
    symbol : class MainFrame
    location: class java.buron.doeacc.shoepolish
              MainFrame mainFrame = new MainFrame();
    ^
    ..\..\buron\doeacc\shoepolish.java:12: cannot resolve symbol
    symbol : class MainFrame
    location: class java.buron.doeacc.shoepolish
              MainFrame mainFrame = new MainFrame();
    ^
    Please tell me What is the problem and how it can be solved.
    why cannot find the class that are in same package.
    I have JDK 1.3
    FOLLOWING ARE THE TWO FILES
    File: mainframe.java/////////////////////////////////////////////////////////////////////
    package java.buron.doeacc ;
    import javax.swing.* ;
    import java.awt.*;
    import java.awt.event.* ;
    class MainFrame extends JFrame
         private final String APP_NAME = "Shoe Polish";
         // constructor
         public MainFrame()
              super("Shoe Polish");
              setSize(500, 500);
              setVisible(true);
    File : shoepolish.java
    package java.buron.doeacc ;
    import java.io.* ;
    import java.buron.doeacc.* ;
    class shoepolish
         public static void main(String args[])
              MainFrame mainFrame = new MainFrame();

    The javac compiler uses the Classpath to find classes. If your directory structure is c:\myjava\buron\doeacc (for example) then you need to have c:\myjava in the Classpath when you compile. For example javac -classpath c:\myjava MainFrame.java

  • Cannot find class in same directory during compilation

    hi
    i have two file hello.java & hi.java in same directory having simple println statements.
    hello.java
    public class hello {
      public static void main(String[] args) {
        System.out.println("hello");
        new hi();
    }hi.java
    class hi {
      hi() {
        System.out.println("hi");
    }hi.java has compiled
    but when i try to compile hello.java i get error saying "Cannot find symbol class hi"
    i've tried giving classpath pointing to current directory during compilation as
    javac -classpath . hello.java
    but this also does not work.
    Please let me know if i am missing anything?
    thanks in advance...

    The javac compiler uses the Classpath to find classes. If your directory structure is c:\myjava\buron\doeacc (for example) then you need to have c:\myjava in the Classpath when you compile. For example javac -classpath c:\myjava MainFrame.java

  • Cannot find class

    Hi,
    I have very simple problem, but cant find the solution, so if someone can see whats wrong thanks in advance:)
    I have few classes in one folder com\claudeduguay\mailets.
    When i try to compile a class UnavailableMessageBase.java which usses another class in this folder named UnavailableStore, im getting the following error:
    UnavailableMessageBase.java:26: cannot find symbol
    symbol : class UnavailableStore
    location: class com.claudeduguay.mailets.UnavailableMessageBase
    protected UnavailableStore store;
    ^
    UnavailableMessageBase.java:34: cannot find symbol
    symbol : class UnavailableStore
    location: class com.claudeduguay.mailets.UnavailableMessageBase
    store = new UnavailableStore(folder);
    ^
    Class UnavailableStore is compiled.Im ussing package com.claudeduguay.mailets; in both classes.

    After almost 2 years of Java development (per your profile), and you're still having simple classpath issues? Not good.
    Fix your classpath. Obviously it is incorrect, or the compiler wouldn't be complaining that it can't find something. Either that, or you misspelled a class/symbol name.

  • Cannot find class I wrote

    I tried posting this in another forum, but received no responses. I am having trouble compiling a file. It is looking for a class (say "classA") that I wrote and compiled fine. When I compile "classB", I receive a "Cannot find symbol : class classA" error because I am referencing an object from classA. Both classes are part of the same package.
    Any tips? What am I forgetting here?

    I tried posting this in another forum, but received no responsesDo you mean this?
    http://forum.java.sun.com/thread.jspa?threadID=699098&messageID=4057762#4057762
    If so, I suggest you use the code button when you post code. It
    is located just above the "Message" pane where you compose your
    post. The idea is to put all your code between [code] tags.
    For instance:
    [code]System.out.println("Using tags...");
    for(int ndx = 0; ndx < 100; ndx++) {
    System.out.println("...is cool!");
    Will look like this:System.out.println("Using tags...");
    for(int ndx = 0; ndx < 100; ndx++) {
        System.out.println("...is cool!");
    }Also post your actual error messages. Cut and paste them from the
    computer so there aren't any typing mistakes.
    Just a guess: make sure both .java files are in the same
    directory (it should have exactly the same name as the package),
    then from the command line from the parent of the package
    directory, tryjavac -cp . packagename\*.javaAlso if you use the files from your other post, the second won't
    compile any way (it's missing some method bodies) whether or
    not it finds the first. And there's some freaky stuff going on when
    you set the sister cities - you can make a variable reference an
    array just by assigning it, you don't need the for-loop.

Maybe you are looking for

  • My sound does not work on my internal speakers

    I used external speakers on Friday and unplugged them when finshed.  Shut my computer down, and turned it on today and my sound does not work for anything

  • How to add number of desktop

    I have two user in my MBA. One use account with 4 desktops. But another user account only with 1 desktop. May I know how can I add more desktop?

  • I have samples missing in Garageband 11 that I have in other versions on different computers.

    I was working on older computers with a community group using Grageband and they had all the samples available but I have transferred the sessions onto my MacBook Pro with Garageband 11 that I purchased from the App Store, and coem of the sample sect

  • R/3 to SCM event got stuck in queue

    Hello SCMGuru's, I'm a SD consultant but due to some Exigency, I'm asked to analyse a MM related ticket. The issue is... We have a process in our company where all our stores are setup as plants & the materials to them are supplied through an STO .Af

  • Where are the .pls files located

    I'm having trouble synching my iPad. I'd like to delete the .pls files to startfrom scratch, but I can't find them.I thought that they were stored in system.library, but I don't see them. thanks in advance ed