JAVA Class error .. cannot locate the issue (my code included)

I am diving into JAVA, and I am experiencing a little bit of difficulty. The code below is not working ::
package therectangeclass;
public class Rectangle {
private double length;
private double width;
public Rectangle(double l, double w) {
length = l;
width = w;
public double calculateArea() {
return length * width;
public class RectangleUser
public static void main(String argv[]) {
Rectangle rectangle1 = new Rectangle(30,10);
Rectangle rectangle2 = new Rectangle(25,20);
System.out.println("rectangle1 area" +
rectangle1.calculateArea());
System.out.println("rectangle2 area" +
rectangle2.calculateArea());
This is the error I am getting::
public static void main(String argv[]) {
1 error
BUILD FAILED (total time: 0 seconds)
Im in the wrong category

Hi everybody... Im studing too.. I think thats error is because you cannot declare static into inner classes. I re-write your code and work... I just declare the inner class inside the static main.
What you think about...
/***************** CODE ************************************************/
public class Retangulo
     private double largura ;
     private double altura ;
     Retangulo( double lar, double alt)
          System.out.println("Altura: " + alt);
          System.out.println("Largura: " + lar);
     public static void main(String[] args)
          Retangulo myRetan = new Retangulo(5.55,5.55) ;
          class AreaRetangulo
               AreaRetangulo(double douLar , double douAlt)
                    System.out.println("Area: " + douLar*douAlt);     
          new AreaRetangulo(5.55,5.55) ;
/****************************** END CODE *********************************************************************/
PS:. Sorry about my english im studing too.

Similar Messages

  • Dbx cannot locate the (DLM) source codes correctly for 64bit app

    It's hard for me to prepare a test case. Because it seems for a simple "hello world" it works.
    The reason I raise this issue here is because my project was recently upgraded to compile with 64bit. And since then dbx cannot locate the source codes correctly, especially for some DLM codes. (sometimes it shows to "/usr/include/iso/..." which it should never be!). While it works fine on a 32bit compiled mode.
    Did anyone experience the similar situation and can share your idea?
    Thanks in advance.

    Can't think of any good reason why going to 64 bit would confuse dbx (except for unknown bug in dbx, which is not impossible).
    I'd first look for changes in your build - for example, 32-bit code used to go to bin/ directory, but 64-bit goes to bin/sparcv9, which happens to be a symlink somewhere else or something like that. Symlinks might sometimes confuse dbx, please read
    (dbx) help finding-filestopic (in dbx console, type "help finding-files").
    Since you are using CC 5.9 that generates DWARF info by default, location and even presence of .o files is not important. All debug info should be in the shared library itself.
    Here's another idea: inspect DWARF info by hand and see if it looks correct to you.
    $ dwarfdump a.out | lessLook for
                    DW_AT_name                  a.ccand
                    DW_AT_comp_dir              /home/maxim/tempThose two should give location of source file (/home/maxim/temp/a.cc in my case). Maybe this will give you some clue.

  • Failed to open package file due to error 0x800C0006 "The system cannot locate the file in C# code.

    Hi, Am facing issue when I try to run SSIS package via C# code, I have given full access to all the folder in which the package is available.
    In the below line am getting error,
    using Microsoft.SqlServer.DTS.Runtime;
    Application app=new Application();
    Package package=null;
    package=app.LoadPackage("PackageFullPath",null) --error line
    Failed to open package file "C:\SSIS\Package.dtsx" due to error 0x800C0006 "The system
    cannot locate the object specified.".  This occurs when loading a
    package and the file cannot be opened or loaded correctly into the XML document

    Are you trying to run this code from job or something? Check if account executing the package has access to the path. Also check if path value passed is correct. If its a remote system path pass it in UNC format (ie //machine/...)
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Error from iTunes Setup Asst -- iTunes cannot locate the CD Config folder

    It says: iTunes cannot locate the CD Configuration folder, so you cannot import or burn CDs and DVD's. This folder must be in the same directory as iTunes.
    Because of space issues, I moved iTunes to run off of a portable hard drive (it's a silver iomega 100 GB drive, if it matters). I had to uninstall and reinstall iTunes and import the old library into iTunes to get it to work, but now it's giving me the error.
    I just imported music from a disc, so that works actually, but when I try to burn a disc, it says "disc burner or software not found." I'm flummoxed.
    Diagnostics are below:
    Microsoft Windows XP Professional Service Pack 2 (Build 2600)
    Dell Inc. Latitude D820
    iTunes 7.0.2.16
    CD Driver 2.0.6.1
    CD Driver DLL 2.0.6.1
    LowerFilters: PxHelp20 (2.0.0.0), DRVMCDB (1.0.0.1), DLACDBHM (1.0.0.1),
    UpperFilters: GEARAspiWDM (2.0.6.1),
    Video Driver: NVIDIA Quadro NVS 110M \GeForce Go 7300
    IDE\DiskST980825AS_____________________________8.02___, Bus Type ATA, Bus Address [0,0]
    USBSTOR\DiskHTS421210H9AT00_______0000, Bus Type USB
    IDE\CdRomSONYDVD+-RW_DW-Q58A____________________UDS2___, Bus Type ATA, Bus Address [0,0]
    If you have multiple drives on the same IDE or SCSI bus, these drives may interfere with each other.
    Some computers need an update to the ATA or IDE bus driver, or Intel chipset. If iTunes has problems recognizing CDs or hanging or crashing while importing or burning CDs, check the support site for the manufacturer of your computer or motherboard.
    Current user is an administrator.
    Failed while scanning for CD / DVD drives, error 2500.
    Virtual drives can sometimes interfere with reading and writing CDs in iTunes. If this is a virtual drive and you are having problems with other drives, try uninstalling the virtual CD application.
    D: Unsupported CD or DVD drive.
    Virtual drives can sometimes interfere with reading and writing CDs in iTunes. If this is a virtual drive and you are having problems with other drives, try uninstalling the virtual CD application.
    Any help anyone could provide would be much appreciated.
    Dell Latitude D820   Windows XP  

    Howdy beanettejurke,
    The article linked below provides troubleshooting tips that’ll resolve optical drive issues, like the CD alert you’re seeing when launching iTunes on your PC. 
    iTunes for Windows: Troubleshooting CD issues caused by device filters - Apple Support
    Cheers,
    -Jason 

  • When I download photos from a flash drive,everything is fine and they show in Events and Pictures, but when I click on the individual pic I get an error message saying that it cannot locate the JPG. Any thoughts?

    When I download photos from a flash drive,everything is fine and they show in Events and Pictures, but when I click on the individual pic I get an error message saying that it cannot locate the JPG. Any thoughts?

    It sounds like your iPhoto Advanced preferences are set to not copy photos during import, i.e. a Referenced library:
    Check your Advanced preferences to see if that's the case. If it is the best solution would be to select the checkbox to copy the photos and reimport the photos from the flash drive.  Then check the new import. It it was OK you can delete the previous event with the "missing" photos.
    OT

  • Error when running oracle report - Cannot locate the font file 'arial.ttf'

    Hello
    I am running a report and I am getting the following error. Terminated with error: <br>REP-3316: Cannot locate the font file 'arial.ttf' REP-1924:
    Any help appreciated.
    David

    Hello,
    REP-1924: Cannot locate the font file '<filename>'Cause:
    The font file specified in UIFONT.ALI is not found.
    Action:
    Make sure that the font file exists in REPORTS_PATH.
    So, it seems that you are using DESFORMAT=PDF and that subsetting has been configured in the file uifont.ali
    In this case, a file arial.ttf must exist in a directory of REPORTS_PATH
    regards

  • Terminated with error: REP-1924: Cannot locate the font file 'Arialbd.ttf'

    hi all
    i am using Application server 10g R2 while running report i am getting the following error
    Terminated with error: REP-1924: Cannot locate the font file 'Arialbd.ttf'
    i configured the Reports_Path
    with C:\windows\fonts if anyone faced the same problem plz help me.

    hi
    if you have problem you can post your own thread and we will try to help you.
    sarah

  • Error: "Cannot access the web server" with BlazeDS Turnkey

    Help! I'm new to Flex and BlazeDS and Eclipse.  I was trying to setup a Flex Project using a BlazeDS/Tomcat server running from Eclipse on Windows XP per the example in flexbandit.com/archives/55#comment-269 and in (www.infoq.com/articles/blazeds-intro).   I am NOT using the Eclipse Flex plug-in.  I'm using Flex Builder for the Flex code.
    Here's what I've done:
    I installed BlazeDS and tested http://localhost:8400 - That worked.
    I setup Tomcat in Eclipse.  -  That seemed to work.
    I created a Dynamic Web Project in Eclipse - That seemed to work.
    I created the bare-bones BlazeDS Configuration under the Eclipse project and then created a basic HelloWorld java class.
    I added the destination in the “remoting-config.xml” file found in the c:/projects/workspace/ReportGenTool/WebContent/WEB-INF/flex” directory:
    <destination id="HelloWorld">   <properties>  <source>HelloWorld</source> </properties> </destination>
    When I started the application server by clicking on the server's green play button in Eclipse and then tried to open localhost:8400/ReportGenTool, I got the 404 error : The requested source (/ReportGenTool/) is not available which according to the instructions is fine.
    Next I created a Flex Project, but when I try to validate the new Flex project configuration, it gives me an error "Cannot access the web server. The server may not be running, or the web root folder or root URL may be invalid."
    When I validated the server was running after setting up the BlazeDs Turnkey, I saw the BlazeDS page.
    Now when I bring up http://localhost:8400 I get:
          Directory Listing for /
          Apache Tomcat/6.0.14
    My eclipse project is named ReportGenTool and I've overwritten the WebContent directory with the META-INF and WEB-INF directories from the BlazeDS installation (C:\blazeds\tomcat\webapps\blazeds).  According to Eclipse the server is running.
    My Flex project is named ReportGenTool and is located in another directory away from the Eclipse project directory.
         My root folder is: C:\Projects\workspace\ReportGenTool\WebContent
         Root URL: is http://localhost:8400/ReportGenTool/
         Context root is: /ReportGenTool/
    Any idea what might be wrong? What didn't I configure that needs to be configured?
    Thanks in advance.

    This is not working because your router has a direct to your web server that is not through the outside interface which is needed for nat to occur, for this to work you need to setup a loopback interface as nat outside and policy route traffic to there for your server traffic
    Bu if your server is internal why do you need nat at all? Can you not use bind with views that might be simpler
    M
    Sent from Cisco Technical Support iPad App

  • Error "cannot locate object' launching app with Web Start

    Hello,
    I receive the error shown below when launching a Java application and cannot figure out where to begin with debugging. It was developed under Netbeans 5.0.
    You can recreate the error by launching this application:
    http://www.mikenaglich.net/ztest17.jnlp
    Error text and JNLP file follow. I am really puzzled and would appreciate any help. Thanks.
    Mike
    Error Text
    ========
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    The system cannot locate the object specified. Error processing resource 'http://www.netbeans.org/jnlp/DTD/jnlp.dtd'.
    App JNLP File
    ===========
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN" "http://www.netbeans.org/jnlp/DTD/jnlp.dtd">
    <jnlp codebase="http://www.mikenaglich.net" href="ztest17.jnlp">
    <information>
    <title>ztest17</title>
    <vendor>Mike Naglich</vendor>
    <homepage href="www.mikenaglich.net"/>
    <description> </description>
    <icon href="default"/>
    <offline-allowed/>
    <shortcut online="true">
    <desktop/>
    </shortcut>
    </information>
    <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
    </resources>
    <resources>
    <jar download="eager" href="dist/ztest17.jar" main="false"/>
    </resources>
    <resources locale="" os="">
    <jar download="eager" href="dist/lib/swing-layout-1.0.1.jar" main="false" version=""/>
    </resources>
    <application-desc main-class="ztest17.Main"/>
    </jnlp>

    I receive the error shown below when launching a Java
    application and cannot figure out where to begin with
    debugging. There are a number of problems, potential problems,
    redundancies and illogicalities in that JNLP file.
    ...It was developed under Netbeans 5.0. Uh-Huh. I am coming to recognise those
    (damnable) NetBeans JNLP files.
    You can recreate the error I don't think I need to, your error output and JNLP
    file are quite instructive..
    ...by launching this
    application:
    http://www.mikenaglich.net/ztest17.jnlp
    Error text and JNLP file follow. I am really puzzled
    and would appreciate any help. Thanks.
    Error Text
    ========
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please
    correct the error and then click the Refresh button,
    or try again later.
    The system cannot locate the object specified. Error
    processing resource
    'http://www.netbeans.org/jnlp/DTD/jnlp.dtd'.
    1) Whenever you see a message from Java,
    JavaWS, or an application saying words the the
    effect of 'cannot find..', try checking the URL of the
    resource in a browser. If a browser comes
    up '404' (not found), then the Java tool or app.
    will be unable to access it either.
    That is the first and fundamental problem with that
    JNLP. The DOCTYPE element is not strictly needed
    in a JNLP, and I would recommend removing it entirely
    rather than try and hunt down any NetBeans DTD.
    With the way NB writes JNLP's, I would not trust
    a DTD written or controlled by them, in any case.
    App JNLP File
    ===========OK.. I recommend replacing the current JNLP
    with the one below, here is a summary of the
    changes I made..
    - removed DOCTYPE line with reference to '404' DTD
    - compacted resource elements, removing empty attributes
    - changed ztest17.jar to main='true'
    - removed redundant 'download="eager"' attributes as well
    as main="false" and version="" from swing-layout.. jar element
    - removed broken(?) <icon> element and empty <description>
    - changed homepage href to relative
    Some of them are guesses, but I'd give it a 90%+
    chance of working, if written like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="http://www.mikenaglich.net" href="ztest17.jnlp">
    <information>
      <title>ztest17</title>
      <vendor>Mike Naglich</vendor>
      <homepage href="/"/>
      <offline-allowed/>
      <shortcut online="true">
        <desktop/>
      </shortcut>
    </information>
    <resources>
      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
      <jar href="dist/ztest17.jar" main='true' />
      <jar href="dist/lib/swing-layout-1.0.1.jar" />
    </resources>
    <application-desc main-class="ztest17.Main"/>
    </jnlp> Note that a glance inside the ztest17.jar supports
    it contains a manifest file tat specifies the main class,
    so it might be possible to remove main='true'
    altogether - best not for the moment, though.

  • Problem in JAVA proxy scenario: cannot locate QSI root directory

    Hi Frnds,
    i am using RFC to JavaProxy, actually through java proxy we are connecting to the bank for payment.
    And the bank has provided one payment client application which needs to be installed on the server for interacting with the bank,
    and we had installed the payment client on to the server. But we are getting following type of error in the response,
    SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error invoking method egateJavaMsgIntInOutJava of proxy bean $Proxy258: cannot locate QSI root directory: com.sap.aii.proxy.xiruntime.core.XmlInboundException: Error invoking method egateJavaMsgIntInOutJava of proxy bean $Proxy258: cannot locate QSI root directory</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    What could be the possible solution in order to solve this error.
    Thanks,
    Raj
    Edited by: RajSrivastava on Jul 8, 2009 11:03 AM

    Hi Madhav,
                    Please check the following links regarding to u rproblem.
    Java Proxy Server: cannot locate proxy bean...
    Cannot locate proxy bean IN RWB
    https://forums.sdn.sap.com/click.jspa?searchID=11113489&messageID=3039952
    warm regards
    mahesh.

  • REP-1924: Cannot locate the font file 'IDAutomationSC128XXL.ttf'

    Hi,
    I'm running Reports9i and playing with the new font sub-setting feature. I have added the following line to my uifont.ali file under the [ PDF:SUBSET ] section:
    IDAutomationSC128XXL = "IDAutomationSC128XXL.ttf"
    I have placed the above ttf file in a directory that is in my REPORTS_PATH. I have set the font of a field in my report to the above mentioned font. When I select "Generate to File: PDF" from the java program I get the error message stated in the subject.
    REP-1924: Cannot locate the font file 'IDAutomationSC128XXL.ttf'
    Any idea sloving the above problem?
    Thanks
    Kalyan

    hi
    if you have problem you can post your own thread and we will try to help you.
    sarah

  • Nokia C3 Java Class Error

    Hi all,
    I have just upgraded my Nokia C3 to latest software update. 
    After this whenever iopen any application (e.g. ebuddy or rocket talk) it shows java class error not found & asking me to delete some items. 
    I checked my memory the Memory card has 1 gb Free space then why should it ask to free memory
    someone having faced this issue kindly assit.
    currently unable to open any application that i download from net.
    regards,
    thads

    HI,
    Can you try restore factory settings?
    Plese remember to backup you phone's data.
    If your application you installed before is not working, uninstall them and install again.
    I hope this helps.
    Br
    Mahayv

  • Error :cannot show the value of the filter.The Field may not be filterable or the number of items returned exceeds the list view threshold enforced by administrator

    Issue : In sharepoint 2013, I am experiening below error while using filter in the list view due to the number of items in this list exceeds the list view threshold, which is 10000 items. Tasks that cause excessive server load (such as those
    involving all list items) are currently prohibited.
    Error :cannot show the value of the filter.The Field may not be filterable or the number of items returned exceeds the list view threshold enforced by administrator
    Could you please suggest a way to avoid this issue apart from incrementing the list view threshold limit .
    Prashanth

    Reorganizing content, or creating more specific views. sharepoint is warning you that the content is structured in such a way that it can cause performance issues, which should be addressed in some way.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Xmlreader schema validation error: Cannot find the declaration of element

    I have multiple schemas with namespaces but I would like to validate an xml document without namespaces. The schemas all have elementFormDefault="unqualified" in the root element.
    I am encountering error below in my validation using xmlreader:
    ERROR:
    Cannot find the declaration of element 'NewTradenetDeclaration'.
    my code is:
    xmlReader = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    xmlReader.setFeature(VALIDATION_FEATURE_ID, true);
    xmlReader.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
    xmlReader.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);
    xmlReader.setFeature(SCHEMA_NAMESPACE_FEATURE_ID, true);
    xmlReader.setProperty(JAXP_SCHEMA_LANGUAGE, XMLConstants.W3C_XML_SCHEMA_NS_URI);
    String schemaURI = "NewTradenetDeclaration.xsd";
    // ive tried all of the ff but throws the same error
    //xmlReader.setProperty(EXTERNAL_SCHEMA_LOCATION, "urn:crimsonlogic:tn:schema:xsd:NewTradenetDeclaration NewTradenetDeclaration.xsd");
    //xmlReader.setProperty(EXTERNAL_SCHEMA_LOCATION, schemaURI);
    xmlReader.setProperty(JAXP_SCHEMA_SOURCE, schemaURI);
    // set entity resolver to resolve xsd locations
    MyResolver resolver = new MyResolver();
    xmlReader.setEntityResolver(resolver);the entity resolver has:
    public InputSource resolveEntity (String publicId, String systemId) {
      String filename =  "c:/workspace/TXParser/schema/"+ systemId.substring(systemId.lastIndexOf("/")+1);
      File f = new File(filename);
      InputSource source = null;
      try {
        source = new InputSource(new FileReader(f));
      } catch(Exception e) {
      System.out.println("InputSource exception: " + e.getMessage());                 
      return source;
    }Help please. Thanks.

    I fight with the same error, it is curious that the schema from schemaLocation can not be validated. If i set the schema manually through an attribute it works. What i try to do is overwriting the resolveEntity in the handler to get the schema from another location and validate the xml against the schema specified in the attribute schemaLocation rather than setting it manually :-(

  • PDFMaker cannot locate the Adobe PDF Printer's printer driver. Please re-install Adobe Acrobat 10.1

    The following error message appears when I try to create a PDF in Publisher:
    PDFMaker cannot locate the Adobe PDF Printer's printer driver. Please re-install Adobe Acrobat 10.1.
    I have tried update patches to no avail.
    Can anyone please help?
    Thank you.
    Susan

    This is the forum for Adobe Reader (not Acrobat). If you have Reader, you won't have that driver. If you have Acrobat, you'll want to ask in that forum: http://forums.adobe.com/community/acrobat

Maybe you are looking for

  • XSL file formatting

    XSL file formatting Hi there. I have problem with this files xsl, the problem is the output for the field date and number: a) `2011-05-13T21:50:00` instead of `13/05/2001 21:50:00` b) `.00` instead of `0`This is the output in XML: <xml xmlns:s="uuid:

  • Memory Usage in FCE 2.0

    I am dropping frames capturing video from an HD camera (SONY HDR-HC1), after only 10 seconds or so. I went into System Settings and checked "Memory Usage", and it says I am using 100% of 185MB. I have 4GB of memory installed, and 3.64GB free at this

  • When exporting an image: Image sizing, resize to fit auto changes measurements eg 22cm becomes 22,000cm. How do I fix this?

    When exporting an image in LR, any measurement entered into "Risize to fit...."automatically changes the measurement from 22cm to 22,000cm. for eg. or 33cm becomes 33,000cm. How do I fix this?

  • OS 10.4.8 and sleep

    I have a different problem. With 10.4.8, my computer randomly goes to sleep. Sometimes in the middle of a sentence! It wakes up OK -- some of the time. Other times the sleep is so profound, that I cannot reboot without removing the battery and power

  • Change pointer not triggered for LBKUM of MM02

    HI im generating Idoc for material master change through BD21. But when I change the value of Total stock (LBKUM) in accounting view of MM02 Im using transaction MIGO to update LBKUM value. In this case change pointer is not getting generating....and