Problem with Runtime.getRuntime ()! Need help!

I use the following command for the connected USB media formatting (in the case h: here's the connected media). Format happens correctly, but the problem is to format does not occur until you have completed running the java program.
I used the following code in a simple java main class and it worked well. But my request is broad and may not terminate / close it to complete the task of format.
Any ideas?

Process p = Runtime.getRuntime () .exec (new/H: String [] {"cmd.exe", "/ c", "format q /fs:exFAT /v:Test"}); "})

Execution of format will not move forward unless you program java, after that Runtime.exec () will simulate the playback format output and simulate you required ENTRY for format to continue. This procedure is not really easy, but fortunately the article explains well.
In pseudo-code, instead of:

Runtime.exec()
CodeBehind()

You should:

Runtime.exec()
ExtremelyImportantCodeFromTheArticleThatAllowsFormatToCompleteRightAway()
CodeBehind()

In fact, I don't know why after all the format is successful when the program stops.

Edit: If java stuff seems too heavy, try a magic command line like:

Process p = Runtime.getRuntime().exec(new String[]{"cmd.exe", "/c",
     "echo.", "|",                              // Queue an ENTER as input to the 'format' command that follows so that java does not have to do it
     "format", "E:", "/Q", "/fs:exFAT", "/v:KINGSTON",      // The format command...
     "1>", "nul", "2>", "nul"});                    // ...with output suppressed so java does not need to deal with it
p.waitFor();

All I can say is that above works fine on my computer and I feel it should work on all windows because it does not use any new thing shell.

Tags: Java

Similar Questions

  • Problem with my phone, need help from Sony

    Hello
    I bought my phone in Oct 17 with local agent warranty Sony "Cell Avenue", I noticed a flaw on the phone "pixel does not" same day to night and visited cell AAvenue to file a claim and raise a ticket the next day and this is what happened:
    1 asked me to come in November as they still new in Jordan and tools to check the device are still to come
    2 visited their first week of November, they asked me to come in 2 weeks
    3 made their visit in 2 weeks and they took my phone to check on it
    05:04 days I called them and they ask me to call them to visit
    5 that I went there and they approved the request and wanted to replace the screen that I refused. I asked my right to have a replacement and they said they do not now have them and call them / or they call me in one or more or more. They gave me a claim or number of what they call a service order number 230 and who was in November 26, 2014
    6 sine they don't call, I called after one month, they said replacement are not yet there and call in 2 weeks.
    7 I called during the first week of Jan and there is a snow storm, nothing happens
    8 I called them last week, they said that we finally got the screens and please call us on Thursday (last Thursday)
    Note: I've been surprised, they mentioned on the screen and I thought we had an understanding that I don't want a screen I want a new phone... Then I realized that they do not remember the case.
    9 in any case, I called them today instead of Thursday and they said: Yes, we have the screens and you can replace your screen... I told the technician again I want to unlock my phone, he said why u na not come before I told him that I did several times and you delayed me u asked me to wait waiy and come later. I gave him the claim number and explained to him again and he said: Oh yes we do not always have the replacement... And that we'll call me later, I begged him to give me a date limit when he will remember, says, I'm busy and I don't know when. I insisted a date limit, he said, he will call today. And to be honest, I am sure that it will not be called and I'll call him tomorrow.

    Sony, I need a solution today until tomorrow... Please help me.

    THX

    I am sure you are aware that we are a user support forum members feel to help other members and thus no influence on Sony - Sony representatives do visit occasionally, but are unable to get involved in other air-consuming countries you would be better to return your unit to the place of purchase or contact Xperia care http://www.sonymobile.com/global-en/support/contact-us/

  • Having a problem with the trigger. (need help)

    Hi all

    I m totally new to the PL/SQL... hope someone can help me with this...

    I am now using the trigger to block insertion in the 'attendance99' table when records reach the maximum limit and insert the record in the table «waiting_list»
    The problem I encounter is using RAISE_APPLICATION_ERROR, it will block the insertion at the table "waiting_list" as well...
    I try to only use the DBMS_OUTPUT. Put_line instead, but end by > > > inserting record in the table 'presences' so many tables "waiting_list.



    -------------------------------------------------------------
    CREATE OR REPLACE TRIGGER trig_attendance
    Before Insert on attendance99
    Referring again like new
    for each line
    DECLARE
    maxstud NUMBER (2);
    currstud NUMBER (2);
    Begin
    SELECT COUNT (*) INTO currstud FROM attendance99 WHERE offering_id =:New.offering_id;
    SELECT max_no_students INTO maxstud to offer WHERE the offering_id =:New.offering_id;
    IF currstud > = maxstud
    THEN
    insert_waitinglist (: new .offering_id,: New.student_id,: New.evaluation,: New.amount_paid);
    RAISE_APPLICATION_ERROR (-20500, ' sorry, this offering ID has reach maximum students, you will be placed in queue! ");
    END IF;
    END;
    /
    ---------------------------------------------

    CREATE OR REPLACE PROCEDURE insert_waitinglist
    (v_offeringid IN waiting_list.offering_id%TYPE,
    v_studentid IN waiting_list.student_id%TYPE,
    v_evaluation IN waiting_list.evaluation%TYPE,
    v_amountpaid IN waiting_list.amount_paid%TYPE)
    IS
    BEGIN

    INSERT INTO waiting_list (student_id, assessment, offering_id, amount_paid)
    VALUES (v_offeringid, v_studentid, v_evaluation, v_amountpaid);
    END insert_waitinglist;
    /
    -----------------------------------------------

    Hello

    Try this:

    CREATE OR REPLACE PROCEDURE insert_waitinglist(v_offeringid IN waiting_list.offering_id%TYPE,
                                                   v_studentid  IN waiting_list.student_id%TYPE,
                                                   v_evaluation IN waiting_list.evaluation%TYPE,
                                                   v_amountpaid IN waiting_list.amount_paid%TYPE) IS
        PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    
        INSERT INTO waiting_list
            (offering_id,
             student_id,
             evaluation,
             amount_paid)
        VALUES
            (v_offeringid,
             v_studentid,
             v_evaluation,
             v_amountpaid);
    
        COMMIT;
    END insert_waitinglist;
    /
    

    Kind regards

    Published by: Walter Fernández on April 15, 2009 10:10 - missing ';', sorry

  • More problems with BSOD? Need help!

    So I already made a thread on the BSOD and thought that I had solved the problem. But, I've got 2 blue screens tonight. One was "IRQL_NOT_LESS_OR_EQUAL" and the fault was of ntoskrnl.exe84d5b and the other ntoskrnl.exef20d4.  I have downloaded on my SkyDrive (https://skydrive.live.com/redir?resid=5051AC31078E096A%21149), mini dump files if someone could read the files and give their opinion on what could be the cause of it, I would really appreciate it.

    I think it might be my motherboard some how, it has been with me all the time that since the BSOD. I changed almost every component.
    Someone suggested that it could be a memory error, but it's unreleased memory, I tried in another machine of friends and there not once BSOD. I bought a new graphics card, thinking that they were the cause of the BSOD but it was very good. I also bought an SSD of 335 Intel, which is quite good in other platforms. Only other thing left for material is motherboard, what could be her.
    Thank you very much.

    Anne

    These related to the nvlddmkm.sys nVidia Display Driver.  There is a known issue with this driver (December 2013).  I would come back to a previous driver (6 months old) at least until they release a new driver with less bugs.

    Also of note, you still have the remnants of Symantec, which is known to be problematic and Kaspersky (also problematic).  If updating the video driver solves the problem I delete both and replace it with MSE.

    Do not forget to disable the Auditor by typing auditor/Reset

  • What is the problem with this request - need help

    Requirement: need to get the names of the employees who were hired Tuesday it must use the function to_char

    Select ename
    WCP
    where to_char (hiredate, 'day') = "Tuesday";

    When I run the query
    o/p is without selected lines

    Help, please.

    Thanks in advance.

    Hello

    861173 wrote:
    Requirement: need to get the names of the employees who were hired Tuesday it must use the function to_char

    Select ename
    WCP
    where to_char (hiredate, 'day') = "Tuesday";

    When I run the query
    o/p is without selected lines

    Try:

    WHERE   TO_CHAR (hiredate, 'fmday')  = 'tuesday'
    

    Without "FM" in the 2nd argument, TO_CHAR pads the results to make a uniform length. If your NLS_DATE_LANGUAGE = ENGLISH, which means it will always return a string of 9 characters, as the longest name in English ("Wednesday") has 9 letters. "FM" (case-insernsitive) tells TO_CHAR does not add this kind of padding.

  • Having a problem with Actionscript. Need help

    I'm trying to set up the first page of my project so that I have capture a person's name... and I can use it again later, the. I had discussed this in a previous thread with Ned Murphy:

    http://forums.adobe.com/message/3319540#3319540


    I half way have this working. For some reason when I type in the name, only parts of it appear when I retrieve it.

    Here's a look at my actionscript on the first page:

    stop();

    //Setting Up Name TextInput Field and Variable
    var userInput:String="";

    //Enter Button Setup
    enter_btn.addEventListener(MouseEvent.CLICK, copyText);

    function copyText(e:MouseEvent):void
         {
             userInput=name_ti.text;
               gotoAndPlay(2);
         }


    And here's the actionscript on the retrieval page

    //Textbox Greeting
    greeting_txt.text="Hello "+userInput+(!);


    Where am I going wrong?

    Have you tried to embed the fonts in your text entry box?  If you use Flash CS5 Pro is very important.

  • Problem with services shared - need help Urgent please!

    Hello Experts

    One of my clients has installed a new oracle instance and copied all schemas and data on the new instance.

    Now when they bring shared services, have lost all our supply. None of the projects are recognized by the shared serices and gets the following error message when we try to set up a user

    'xxxxx' is not a recognized shared services project. Please contact your administrator

    Is there something we can do to restore Shared Services to its original state?


    Thanks in advance.

    Kind regards


    Sonu

    Published by: 637223 on January 20, 2009 02:19

    Hello

    If all hyperion services were closed and the database has been moved then in theory you must have run the configuration utility to reconfigure the part of the database.
    This should be done for all databases that have been moved.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • HP 15-f209wm with Intel Celero: need help with a unusual amenities. Install windows 7 on a new computer windows 10.

    Hello

    I am really puzzled here and need help you guys!

    A friend of mine, who is not computer savy is used to windows 7 and would like to 'return' in Windows 7 to a windows 10.
    She recently bought a new computer:
    Black HP 15.6 "15-f209wm with Intel Celeron N2840 4 GB memory 500 GB (windows 10)

    And had me working on it to install it as a Windows 7.
    The problem that I didn't forsee is that after I installed wiondows 7 Nothing worked because all the installed drivers were too 'new' for the Windows 7 operating system at least that is what I think the problem is.

    The main thing that doesn't work is the USB ports and Wifi,
    and I cannot find drivers to make this 'connection', this 'bridge' of sorts between Windows 7 operating system and the hardware inside the computer.  And I can't find solutions on the net!

    An idea that I'm trying is to copy and paste drivers from another computer Windows 7 HP, on it. But I don't know if that's going to walk.

    I am really confused with this and need your expertise!

    We thank you in advance.

    * Note *.
    This computer has not been upgraded from a previous version of Windows.
    I tried the Driver Booster to see if it would be the auto scan, detect and install fix it but it didn't.
    I got the Lan/Ethernet is finally working.

    Hello:

    This driver installs usb, not the chipset driver controllers... (the last driver that I posted on my first answer).

    Download, unzip and run the setup.exe file.

    https://Downloadcenter.Intel.com/download/25687/us B-3-0-Intel-USB-3-0-Driver-for-Intel-NUC6i-x-SY

    According to the specifications of product for your laptop, the USB driver above must have worked.

    If the usb driver 3 above fails to install the usb controller...

    Please view the the hardware ID for the USB controller requiring driver.

    To find the hardware ID, go the Device Manager and click on the usb controller requiring driver.

    Then click on the Details tab in the upper part of the window of the USB controller.

    Now you will see a drop-down list of property, and it will be set to the Description of the unit.

    On this list and select the 2nd (Hardware ID).

    After the first string of characters you see in the window.

  • Problem with my innerjoin. Help, please

    Hello;
    I try to write a complicated page and I get an error in my query. I have another question for this request that I can't seem to work, but lets make this one problem at a time.

    This is the error I get when you go directly to this page:
    Run database query error. [Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] Syntax error (missing operator) in a query expression 'Projects.CategoryID Categories.Name'.
    The error occurred on line 12.

    This is my code:
    <!-it's the query with the error, he manages the project files and either bring them all to the top or only those of the category chosen in another page. ->
    < cflock timeout = "10" type = "exclusive" scope = "application" >
    < name cfquery = "getProjects" datasource = "#APPLICATION.dataSource #" >
    SELECT Projects.Name AS PName, Projects.ProjectID AS ID, Projects.CategoryID
    Categories.Name AS CName, categories. CategoryID
    PROJECT INNER JOIN categories on projects. CategoryID = categories. CategoryID
    < cfif StructKeyExists (url, "CategoryID") >
    WHERE categories. CategoryID = < cfqueryparam CFSQLType = "CF_SQL_INTEGER" value = "#URL. "CategoryID #" / >
    AND categories. CategoryID = Projects.CategoryID
    ORDER BY Projects.Name
    < cfelse >
    ORDER BY Categories.Name
    < / cfif >
    < / cfquery >
    < cfset rowsPerPage = 6 >
    < name = "cfparam URL.startRow' default = '1' type 'number' = >"
    < cfset totalRows = getProjects.recordCount >
    < cfset EndRowOptional = min (URL.startRow + rowsPerPage - 1, totalRows) >
    < cfset startRowNext = EndRowOptional + 1 >
    < cfset startRowBack = URL.startRow - rowsPerPage >
    < / cflock >
    <! - end project file code - >
    <!-this code runs the success to update your #record #->
    < isDefined ("URL.ID") cfif >
    < name cfquery = "zlnbbXX" datasource = "" #APPLICATION.dataSource # "LignesMax ="1">"
    SELECT Projects.Name AS PName, Projects.ProjectID AS ID, Projects.CategoryID
    WHERE ProjectID = #URL.ID #.
    < / cfquery >
    < / cfif >
    <! - complete code - >
    < head >
    < / head >
    < body >
    <!--> code for success update record
    < cfif isDefined "(URL. RecordID") >
    < cfoutput query = "zlnbbXX" >
    < font color = "# 990000" face = "Verdana, Arial, Helvetica, sans-serif" size = "2" > < b > updates have been applied successfully to: < /b > < br > < u > #PName # < /u > < / police > < br > < / cfoutput > < / cfif >
    <!--> end success
    <!-records and next / prev nav-->
    < cfoutput >
    Display of < b > #URL.startRow # < /b > < b > #endRow # < /b > < b > #totalRows # < /b > Folders < / make >
    < cfset urlVars = "" > "".
    < cfif startRowBack GT 0 >
    < cfset urlVars = ' StartRowOptional = #startRowBack #">".
    < / cfif >
    < structKeyExists cfif (url, "categoryID") >
    < cfset urlVars = urlVars & "categoryID = #categoryID #" > ".
    < / cfif >
    < a href = "" #CGI.script_name #? #urlVars # "class ="nav"> < Previous Records < /a >"

    < cfset urlVars = "" >
    < cfif startRowNext lte totalRows >
    < cfset urlVars = ' StartRowOptional = #startRowNext #">".
    < / cfif >
    < structKeyExists cfif (url, "categoryID") >
    < cfset urlVars = urlVars & "categoryID = #categoryID #" > ".
    < / cfif >
    < a href = "" #CGI.script_name #? #urlVars # "class ="nav"> next > < /a >"
    < / cfoutput >
    <!-end next / prev code-->
    <!-edit-> documents
    (< cfloop query = "getProjects" StartRowOptional = "" #URL.startRow # "EndRowOptional =" #endRow #"> < cfset class = iif (getProjects.currentRow mod 2 eq 0,)" "DataUn'", "' DataB'") >
    < cfoutput >
    #PName #.
    #CName #.
    < name of the form = "myform" action = "Action.cfm" method = "post" > "
    < input type = "hidden" name = "ID" value = "#ID #" >
    < input type = "submit"... More code here >
    < / cfoutput >
    < / cfloop >


    This query does a few things.
    1. If you go directly to this page, it shows all the projects title so you can next / previous through records and change the recording you want.
    2. I'm doing so that if you come from another page that modifies all categories for this section, it will only bring up projects in this category. He has done this, but when you next / prev through it, it shows all the records.
    3. Once you add or update a record, where you are returned to this page, he tells you: "your updates were successful for the project #title #

    I've commented the code, I know there are some questions here and I need help their knowledge.

    CFmonger

    In the query "getProjects.

    Missing comma between, Projects.CategoryID Categories.Name AS CName, (no comma after CategoryID)
    The AND condition in the query is redundant, this is done in the join condition.
    For problem 2 without seeing the actual url, I can't help. But I would say that the catergoyid is not there

    There is no from clause in the query 'zlnbbXX'

    Ken

  • for the 3rd party plug-ins access problem in CS4 Extended, (need help!)

    I downloaded recently, successfully, in my new copy of PhotoShop CS4 Extended 11.0 version. I then updated the program to version 11.0.1. I was (and am still), using my Photoshop Elements 7.0 and have been very successful download and access to my OnOne Software plug-in, Genuine Fractals 6.0 and FocalPoint 2.0 as well as some filters from NIK Software.

    So I was excited to start using CS4 Extended and the first thing I did after the download and update was to load my FocalPoint 2. plugin. Now, I had spent literally 20 hours in total over a period of 2 consecutive days trying every variation I could think to place the Plugin, (one of them), in the program of CS4 so that I can access and open them at will. But I can't do them appears in the section "Controller" in the drop-down list of menu files. They also do NOT appear under "Plug-ins" in the drop-down Help Menu.

    As I said earlier, I have no problem with their use in my Photoshop Elements 7 and I just got a reply from Support Adobe technique that said that these Plugins will certainly work in CS4 Extended. But they also felt that the problem must be addressed by the manufacturers of Pugin. I'll try to contact them as well, but I don't expect much because this view is inconsistent with the fact that these same Plugins work fine on the PSE 7.

    I have an AMD Phenom X 4 2.0 GHz with 8 GB of Ram and an ATI Radeon 4600 all in my desktop HP Pavilion p6230f PC. My operating system is Windows 7.0 Edition Home Premium 64-bit.

    I won't bore anyone with the details of what I've tried so far because someone out there perhaps had the same problem and knows what to do. So if there are people out there who can help, I'd be very happy. Rich56

    If plugins do not appear in the 64-bit application, they are not written probably for 64 bit.

    The 32-bit application (which is installed with the 64-bit application) to access these plugins.

    And check with the manufacturer of plugin for updates.

  • I have a problem with the numbers. Help, please!

    I have a problem with the numbers. I am trying to create a formula that can add a cell only when another cell with a pop-up menu returns on a specific pop.  I can't ignore the cell if it is not on specific pop upward.

    assuming the cell with pop's cell A1

    and if the context menu contains items:

    YES

    NO.

    MAYBE

    and the value you want to add in cell A2

    You can add the value in cell A2 when the context menu is 'YES' like this

    = if(A1="YES", A2, "") +.

    where is the expression that adds other cells if you want

    could be another cell

    = If (A1 = "YES", A2, "") + B2

    or a range of cells

    = If (A1 = "YES", A2, "") + sum (B2, D2, G2:H5)

  • Problem with my BB9700, need to format blackBerry Smartphones.

    Problem with my BB9700, Internet browser icon had disappeared and the internet does not work... Instant Messaging is also not working.

    Pls suggest a solution to it.

    I think it should be formatted... pls guide the process

    Concerning

    Shafat

    Welcome to the forum, Shafat.

    This is rather peculiar.

    On your home screen, press the menu button and click on "show all icons.

    Also did you have fun with your service or maybe someone has made books.

    If the show that all the icons method does not work, consult the service books. Access the options on the screen and type "in-home service"... .service books will display on your screen and see if something is a miss.

    Or just registering on host routing table in the menu options... This will re - send service books. It is said once out of sent message to save options. Then do a battery pull.

  • Reference Dell r710 12core 32 GB super slow with sql and need help exch2010

    Hi all and thanks in advance.

    I have a new r710 which has a great for a few months then it has slowly degraded until now, it's an analysis on all the vm, I can't tell which one is it slows down because all the performance counters show a lot of place in all categories. I've been doing the reconnection to the datastore2 and datastore1, then I get a restored connection. I moved the Exchange 2010 vm to the datastore3 that does not have errors, but it is still slow. I wonder if I should move all the vm off the other two data stores and delete, and rescan the esxi for storage and back as data 1 and 2 stores. I have esxi 4.0 not improved update2. and there an esxi license and there 6 installation of drives western digital black 1 TB in raid1 3 - then I have every configuration of raid as a logical drive which is then turned into a data store.

    I don't know if the downturn is the hardware or a virtual machine is pulling them down - I'll start out them one by one to test tonight, but the advice or opinions are welcome.

    I don't know what your storage looks like initially but I would recommend HAVE TO go with update 2 - we had all sorts of problems with particular storage when you use storage VSA as the left hand.  Update 2 provided some great improvements to the vmkernel regarding VMFS.

    You can also publish newspapers vmkernel of any of the host in question and we can take a loo at it.

    Seriously, update your esx/esxi servers is always a good practice when you have weird problems.

    See you soon,.

    Chad King

    VCP-410. Server +.

    Twitter: http://twitter.com/cwjking

    If you find this or any other answer useful please consider awarding points marking the answer correct or useful

  • Problem with IE showing - please help!

    I really need help to try to understand why http://www.spyglasshill.com/webcam/default.htm display correctly in Internet Explorer.  It validates fine, but it's horrible in THE.

    I would REALLY appreciate the help.

    Thank you.

    We are talking about IE 9?

    The second

  • How to uninstall the runtime? (Need help urgent!)

    Can someone please help with this incredibly frustrating problem:

    I need a very important executable VI to run on my laptop. But it takes 2010 Run time engine.

    I downloaded this and it will not install because it says that a newer version of Run time is already installed. For the life of me

    I can't find this 'new' version anywhere on my laptop. I had installed LabVIEW before 2011 and I completely uninstalled.

    How the hell can I delete something that apparently does not exist? Is there something that I am missing.

    Emergency assistance is much appreciated.

    Try the MSI breath running.

    You can find it here

Maybe you are looking for