Get DirectorySize In java

Hi,
I created progam to get the Folder Size in which i'm transversing between folders and fetching the each file sizes.
I'm able to get the respective size of the folder, but when i'm trying to run this application for the Network Folder where it has folder sizes more then 250Gb's the program is running too slow.
Is there any way for the fast retrieval ?
Thanks in Advance
- Hitesh

Hitesh_kumar wrote:
I'm able to get the respective size of the folder, but when i'm trying to run this application for the Network Folder where it has folder sizes more then 250Gb's the program is running too slow.I guess you have many small files on that folder..(and/or the access is slow)

Similar Messages

  • Could not get schema Object:java.sql.SQLSyntaxErrorException ora-904

    All of a sudden I get
    Could not get schema Object:java.sql.SQLSyntaxErrorException: ORA-00904: "SYS"."O"."NAME": ongeldige ID
    when doing anything in the tables tree in the connections pane
    The only thing I set recently is pga_aggregate_target
    Environment
    Oracle 11.2.0.1
    OS Windows Vista Ultimate sp2
    Sql developer 2.1.1.64.39 with its own JDK
    As the download links on OTN are broken I can not upgrade, and I'd rather not work in command line sqlplus.
    Help!!!
    Sybrand Bakker
    Senior Oracle DBA

    My copy of sqldeveloper isn't located in that directory. Would that matter?
    In the mean time I have disabled filtering the tables node. Opening the tables node doesn't result in exceptions anymore.
    Now, when I click on any table in that node I get 4 identical ora-904 error messages for sys.o.name for any table.
    Apparently it is querying either the all_objects view and it thinks it is querying sys.obj$.
    I didn't yet enable sql_trace for the session, I'm more or less giving up on sqldeveloper. I can not use the space bar in any datagrid, sqldeveloper has always been extreemly unresponsive when navigating the schema browser (as opposed to Toad), etc, etc. Too bad I bought Sue Harpers book, but I think I will be de-installing sqldeveloper soon.
    Sybrand Bakker
    Senior Oracle DBA

  • While opening SXMB_IFR i am getting a error  Java.lang.noclassFounderror

    U have installed SAP XI in my laptop while opening 
    SXMB_IFR i am getting a error  Java.lang.noclassFounderror
    so i not able to go further please help me
    thanking you
    sridhar

    Hi,
    There are number of ways to do that :
    1. Try this url
    http://<host-name or IP address of XI server>:<java Port number)>/rep/start/index.jsp
    If this is successful that means your J2EE server and services are fucntioning fine. The problem could then be on the ABAP stack.
    2. Can you start visual admin tool and check that all the services are running. You might have to manually start those which have not automatically started. Check the connectivity with all system & server (inc n/w) & Register the hostserver entry in your sys32/ host file
    e.g 10.2.4.56 <server name>
    3. Have you download java sdk 1.4 on you laptop?
    http://java.sun.com/j2se/1.4.2/download.html
    also have a look at this sap note: 801868
    (make sure not to install the 1.5 version of JWS. XI does not work properly with the 1.5 version)
    4. Lastly, u might have some problem with ur JRE installation. In that case i would sugesst you to re-install JRE/ Java WebStart.
    This blog may help you to analyze the errors-
    /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
    Refer
    XI Installation problem  
    XI Installation problem
    503 error in SXMB_IFR
    XI Initial screen problem  
    XI Initial screen problem
    thanks
    Swarup
    Edited by: Swarup Sawant on Feb 19, 2008 8:42 AM

  • Getting Error in java mapping: Parsing empty source. Root element expected!

    Hi Experts,
       I am using java mapping for schema validation of input message. I have followed all the standard procedures and implemented the java class in the interface mapping.
    My interface mapping is like this:
    OrderData --->Java Class ---SchemaValidate
                         Mesg Map ---OrderData_to_BAP --->BAPI Msg
    So first I want to validate the schema of the input message. If the input message is invalid then XI should throw an exception. Then I use the actual message mapping to map the input order data to the BAPI input parameters.
    In the java code I am using xerces parser.
    The java code works fine when I run it as a standalone application.
    The interface mapping also works fine if I don't include the java mapping. Ofcourse schema validation does not happen.
    But when I test the interface mapping by including the java mapping then I am getting the error:
    Call method execute of the application Java mapping SchemaValidate
    Java mapping SchemaValidate completed. (execute() of SchemaValidate
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Parsing an empty source. Root element expected!
    What am I doing wrong? Why it is not getting the root element?
    My Java code is as follows:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import java.io.*;
    import java.util.Map;
    import javax.xml.parsers.*;
    import org.xml.sax.helpers.*;
    import org.xml.sax.*;
    import org.apache.xerces.jaxp.*;
    Sample mapper for SAP-XI
    @author Gopal
    public class SchemaValidate implements StreamTransformation {
        //Constants when using XML Schema for SAX parsing.
         static final String JAXP_SCHEMA_LANGUAGE =
         "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
         static final String W3C_XML_SCHEMA =
         "http://www.w3.org/2001/XMLSchema";
         static final String JAXP_SCHEMA_SOURCE =
         "http://java.sun.com/xml/jaxp/properties/schemaSource";
    Injection of mapping parameters
    from integration engine
    @param map Map with configuration data
        public void setParameter(Map map) {
    Mapping implementation
    @param inputStream Input data from integration engine
    @param outputStream Output data to integration engine
        public void execute(InputStream inputStream,
                            OutputStream outputStream)
          throws StreamTransformationException {
            try {
                  // obtain an object of class javax.xml.parsers.SAXParser,
                  SAXParserFactory spf = SAXParserFactoryImpl.newInstance();
                  spf.setNamespaceAware(true);
                  spf.setValidating(true);
                  SAXParser sp = spf.newSAXParser();
                  // setup the schema file
                  sp.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                  sp.setProperty(JAXP_SCHEMA_SOURCE, new File("IOReqMsgSchema.xsd"));
                  //parse the input xml using the given schema
                  sp.parse(inputStream, new ParseErrorHandler());
            catch(SAXException se) {
              se.printStackTrace();
            catch ( Exception e ) {
              throw new StreamTransformationException( e.getMessage() );
    My input message is :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:OrderCreate_request xmlns:ns0="mynamespace">
       <ORDER>HTEST1234567</ORDER>
       <ORDER_TYPE>z001</ORDER_TYPE>
       <ORDER_NAME>Test Order</ORDER_NAME>
       <CO_AREA>INTC</CO_AREA>
       <CCTR_POSTED>1234567890888888888</CCTR_POSTED>
       <CURRENCY>USD</CURRENCY>
       <PERSON_RESP>12345679</PERSON_RESP>
    </ns0:OrderCreate_request>
    Kindly help! please this is urgent!!!!!!
    Thanks
    Gopal
    Edited by: gopalkrishna baliga on Feb 28, 2008 9:34 AM

    Hi Stefan,
       I did the code changes to return output stream and the java code works perfectly in standalone mode in my PC.
       But when I use the same in the Java mapping with XI then It throws an error "Getting Error in java mapping: Parsing empty source. Root element expected!".
    My XI J2EE server has JDK1.4.3.11.
    Is there any limitation of using SAX parser in XI? If Yes, then which parser should be used for schema validation in XI?
    I have included the XSD file for schema validation along with class files in the .jar file. This jar file is then imported in XI repository. Is the XI engine not able to read the XSD file?
    Do I have to handle reading XSD file differently? Any suggession how?
    Is this parser error due to some security access?
    Kindly help me! I have been struggling with this problem since 2 weeks. I will be greatfull to you if you can help me.
    Thanks
    Gopal

  • Any idea when we will get support for Java 7.5 in Safari?

    I'm in school for a degree in software engineering and Java is a big part of it.  As a regular Mac user who uses Safari as his main browser, it's disappointing that adoption of the latest Java versions in Safari seem to be lacking.  Is there any way to get Safari to look at the latest versions of Java instead of being stuck on Java 1.6?
    Thanks in advance for any help! :-)

    Apple has kept up to date (more recently) with the latest releases of Java 6 (1.6.0_33), which is the current public release of Java. You can install the development Java 7 runtime from Oracle (currently on build 5), but this will not support many features and functions of the final release. All future updates to Java will be issued and maintained by Oracle as it's done on other platforms. Apple will not be offering an in-house Java runtime after Java SE 6. You can get the latest Java updates here: http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • Getting started in Java Comm API

    Hi This is all new to me. So I would really appreciate if anyone can help me figure this out..I am trying to read from the serial port using a VS4000 Image Scanner(Symbol). I want to scan a driver's license bar code. I believe PDF417 is the type of barcode to read driver's license. However, Im just curious if there is any code out there that actually parses the information out of the license. I need to get the lastname, firstname,dob,gender,address,drivers #, etc.. Does any one have any idea where I could get more information in how to scan a driver's license. I need more guidance in how to really do this. Although, I went to the introduction to Java Communications and found a example code "SimpleRead.java". However, I get some errors....
    can anyone help..I have a nullpointer ..not sure how to fix it...
    I get this error :
    java.lang.NullPointerException
         at SimpleRead.<init>(SimpleRead.java:64)
         at SimpleRead.main(SimpleRead.java:53)
    Exception in thread "main" Process terminated with exit code 1
    Here is the original code :
    import java.io.*;
    import java.util.*;
    import javax.comm.*;
    public class SimpleRead implements Runnable, SerialPortEventListener {
    static CommPortIdentifier portId;
    static Enumeration portList;
    InputStream inputStream;
    SerialPort serialPort;
    Thread readThread;
    public static void main(String[] args) {
    portList = CommPortIdentifier.getPortIdentifiers();
    while (portList.hasMoreElements()) {
    portId = (CommPortIdentifier) portList.nextElement();
    if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    if (portId.getName().equals("COM1")) {
    //if (portId.getName().equals("/dev/term/a")) {
    SimpleRead reader = new SimpleRead();
    public SimpleRead() {
    try {
    serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
    } catch (PortInUseException e) {}
    try {
    inputStream = serialPort.getInputStream();
    } catch (IOException e) {}
         try {
    serialPort.addEventListener(this);
         } catch (TooManyListenersException e) {}
    serialPort.notifyOnDataAvailable(true);
    try {
    serialPort.setSerialPortParams(9600,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);
    } catch (UnsupportedCommOperationException e) {}
    readThread = new Thread(this);
    readThread.start();
    public void run() {
    try {
    Thread.sleep(20000);
    } catch (InterruptedException e) {}
    public void serialEvent(SerialPortEvent event) {
    switch(event.getEventType()) {
    case SerialPortEvent.BI:
    case SerialPortEvent.OE:
    case SerialPortEvent.FE:
    case SerialPortEvent.PE:
    case SerialPortEvent.CD:
    case SerialPortEvent.CTS:
    case SerialPortEvent.DSR:
    case SerialPortEvent.RI:
    case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
    break;
    case SerialPortEvent.DATA_AVAILABLE:
    byte[] readBuffer = new byte[20];
    try {
    while (inputStream.available() > 0) {
    int numBytes = inputStream.read(readBuffer);
    System.out.print(new String(readBuffer));
    } catch (IOException e) {}
    break;
    Thanks a bunch!! :)
    Jess...

    I actually got my scanner to work. I got my SimpleRead.java to work as an application. I set up this as an applet. Now my problem is that I the inputread reading from the serial port is not reading correct data always. It sometimes does scan correct data at times and other times it will not. So, I am not sure what is wrong. Does anyone have any clue why this could happen?

  • Getting Started In Java

    Hi, I've read some of the posts regarding newbies and resources (books) to learn Java. I do have a question about this. Most, if not all, of these books are old (3-7 years). So, if I get Head First Java or Thinking In Java from Amazon, won't they be out of sync with the current Java version? Will that matter? Are there any current books for beginners?
    Thanks

    If you're talking about links you've seen here, it's quite possible that they're canned links that regulars have been posting for the past several years that land on the editions of those books that were available when the links were created. If you google the titles, you may find there are newer editions.
    Having said that, even if the latest editions are a few years old, the Java language has only had a couple of minor changes in the last 5 years or so. There were major language changes in 1.5 (a.k.a Java 5 or something), and very few language changes in 1.6 (a.k.a. Java 6 or something), so if the book at least covers 1.5--look for things like generics, autoboxing, typesafe enums, and annotations--it will be fine, especially for a beginner. Changes in 1.6 I think were mainly API and possibly tool changes, though you can google for something like java 1.6 release notes for details.
    There are major language changes coming in 1.7/7/whatever they're calling it. I know early-access versions are available, but I'm not sure when the GA release will be. If you can find a book by one of the recommended authors that covers 7, you might want to grab it, but most of those language changes are more advanced features anyway, I think.
    Also, do check out the tutorials:
    http://download.oracle.com/javase/tutorial/getStarted/index.html
    http://download.oracle.com/javase/tutorial/java/index.html
    both of which are from
    http://download.oracle.com/javase/tutorial/

  • How to get rid of "Java Applet Window"  from JDialog

    Hi Friends,
    I am developing an applet that uses JDialog class. I want to get rid of "Java Applet Window" that appears at the bottom of my JDialog.
    When I run my application from the web, I do not want that to show up.
    Is there any way of doing it ?
    Many thanks in advance.
    Ramesh

    http://search.java.sun.com/search/java/index.jsp?qp=&nh=10&qt=%22Java+Applet+Window%22&col=javaforums&x=36&y=9

  • How can I get a certified java programmer ???

    Hello to all Java Programmer out there!!
    Can somebody tell my what I must do to get a certified java programmer?
    You can send me an email to the adress [email protected]
    Thank you!

    Wow, 5 responses, only one of them valid! Then again, a statement like that begs to be picked on! Anyway, another good site would be www.jchq.net. Lots of good resources, but I also suggest going to B&N (or some other big book-seller), and get a certification book. My general rule of thumb is, the bigger the book, the better. That's not always true, but it's good to go on. I'm picking one up this weekend, hopefully. Study, study, study!!!
    James

  • Getting Error as java.lang.StackOverflowError

    Hi,
    I am running dbca Application thru command prompt
    I am getting Error as:
    java.lang.StackOverflowError
    Kindly can anyone help me on this.It will be needful for me

    Hi,
    Thanks for the Info.
    Oracle version:10.2.0.1.0
    OS:Windows XP
    I am doing the operation by running the dbca application through createDB.cmd from command prompt:
    createDB.cmd (File containing the below lines)
    time /t
    SETLOCAL
    REM #SET DISK_DRIVE=%1
    SET MY_ORACLE_HOME=%1
    REM -- provide full name of the template including the .extension like General_Purpose.dbt
    SET TEMPLATE_NAME=%2
    SET MY_ORACLE_SID=%3
    SET MY_GLOBAL_DB_NAME=%4
    SET sysPassword=%5
    SET systemPassword=%6
    SET recoveryAreaDestination=%7
    SET CONFIGURE_EM=%8
    SET dbsnmpPassword=%9
    REM -- The shift command allows a argument (%10) to become %9; so windows can read its value to desired variable.
    REM -- you may need to add more shifts, you decide to pass more parameters.
    SHIFT
    SET sysmanPassword=%9
    REM #SET PATH=%MY_ORACLE_HOME%\bin;%PATH%
    REM #SET DISK_DRIVE=E:\Oracle
    SET PATH=%MY_ORACLE_HOME%;%PATH%
    if "%configure_em%"=="NO" goto no_em_config
    dbca -silent -createDatabase -templateName %TEMPLATE_NAME% -gdbname %MY_GLOBAL_DB_NAME% -sid %MY_ORACLE_SID% -sysPassword %sysPassword% -systemPassword %systemPassword% -emConfiguration LOCAL -dbsnmpPassword %dbsnmpPassword% -sysmanPassword %sysmanPassword%
    goto end
    :no_em_config
    dbca -silent -createDatabase -templateName %TEMPLATE_NAME% -gdbname %MY_GLOBAL_DB_NAME% -sid %MY_ORACLE_SID% -sysPassword %sysPassword% -systemPassword %systemPassword% -recoveryAreaDestination %recoveryAreaDestination%
    :end
    Thanks and Regards

  • Howto get information about Java Stored Procedures programmaticly

    Hi all,
    using the DatabaseMetaData object it is easily possible to get information about database objects like tables, columns or even plsql stored procedures.
    But is there a way to get information about Java Stored Procedures which are published in packages ? Is it possible here to use a DatabaseMetaData object or is there any other solution ?
    TIA,
    Chris

    What sort of information do you want to know about the Java stored procedures?
    Would the views USER_SOURCE or USER_OBJECTS contain the information you need?

  • Following recent Firefox update, I keep getting the foillowing Java message -Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWindowsRegKey.op

    Following recent Firefox update, I keep getting the following Java message each time I attempt to download a file, - Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWindowsRegKey.op.
    Following a click on the off cross, it then allows the download to continue.
    When is AFG Safe Search to be fixed?

    please report this error to AVG, the 3rd party developer of the addon, in order for them to fix it...

  • How do I not get rmi.UnmarshalException: java.lang.ClassNotFoundException:?

    Hello,
    I'm not able to run the RMI example code provided by the sun tutorial. When I attempt running ComputeEngine in Eclipse I get:
    ComputeEngine exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.lang.ClassNotFoundException: compute.Compute
    The code may be found on http://java.sun.com/docs/books/tutorial/rmi/running.html
    I've only removed the code concerned with security. I run the registry in the terminal, before trying to execute. I recall it had worked with me yesterday, but today presenting it not.

    The RMI Registry can't find the class(es) in question on its CLASSPATH. So what to do?Err, make sure the RMI Registry can find the class(es) in question on its CLASSPATH?
    For example, specify -J-classpath when starting the RMI Registry. Or start it in the root directory of your .class package structure. Or start it withing the server JVM via LocateRegistry.createRegistry(). Or use the codebase feature.

  • Getting the error " [java] Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class " while building the O2A 2.1.0 PIP

    Getting the error " [java] Problem invoking WLST - java.lang.RuntimeException: Could not find the OffLine WLST class " while building the O2A 2.1.0 PIP. I am using the Design Studio 4.3.2 for building the O2A 2.1.0 PIP. Please let me know how to resolve this issue. Here I am enclosing the log file .

    We have basically the same issue when we try to create the interpreter using the embedded method..
    I was able to use the interpreter embedded in a java client as long as the weblogic jars were located in a weblogic install if I tried to use them from a maven repository no luck at all...
    All of this worked easily in 9.2 now in 10.3 it seems more error prone and less documented.
    I have seen close to a 100 posts on issues related to this so is there a document which outlines specifics....
    We / I have used weblogic now for almost 10 years and moving from 8.1 to 9.2 was painful and we expected the move from 9.2 to 10.3 not to be soo bad but its proving to be as painful if not more painful than moving to 9.2. We seem to spend a good bit of our time working around issues in the next new release that were not in the previous one..
    Any help would be appreciated I think we will open a support case but even that is more painful...
    Any help would be greatly appreciated..
    PS: We confirmed that all jars in the startweblogic classpath were in the startup. The server we have the embedded wlst instance is a managed server and we are using the component in a war... Are there any restrictions which we are unaware of.
    Error we get is
    1 [ERROR] com.tfn.autex.order.weblogic.QueueMaintenanceUtility.addQueue():217 Error Adding Queue wowsers JNDI Name wowsers Exception: Invocation Target exception while getting the WLSTOffLineScript path

  • Need help getting opatch and java working on 10g

    I am trying to configure opatch on a Solaris 2.9 Unix server with Oracle 10g
    We don't have java installed. How can I get the required java installed and opatch and OUI (Oracle Universal Installer) working?
    Thanks
    Ben P

    u can download java from Sun's site and install it in any location. Use -jdk or -jre option and specify the path to java, while invoking opatch, then it works fine.

Maybe you are looking for