Results 1 to 6 of 6
  1. #1
    valery is offline Member
    Join Date
    Jul 2007
    Posts
    32
    Rep Power
    0

    Default Error while setting up enviroment for this application

    I have a java program that needs to execute a C program during its operation. I have used the following line of code in my program:

    Java Code:
    Process p = Runtime.getRuntime().exec("SRTPUT");

    It compiles fine but when i run the program it returns to me this error:

    Java Code:
    16 bit MS-DOS Subsystem
    C:\WINDOES\system32\ntvdm.exe
    Error while setting up environment for this application. Choose 'Close' to terminate the application

    what's the problem?

    thanks

  2. #2
    brianhks is offline Senior Member
    Join Date
    Jul 2007
    Posts
    135
    Rep Power
    0

    Default

    Try something simple does this work?
    Java Code:
    Process p = Runtime.getRuntime().exec("notepad");
    p.waitFor();

  3. #3
    valery is offline Member
    Join Date
    Jul 2007
    Posts
    32
    Rep Power
    0

    Default

    it worked, but why do I have to add this line? what does it mean?
    thanks brianhks

  4. #4
    brianhks is offline Senior Member
    Join Date
    Jul 2007
    Posts
    135
    Rep Power
    0

    Default

    So does your application work if you add p.waitFor()?

    p.waitFor tells java to wait until the process has finished before exiting.

  5. #5
    Steqal is offline Member
    Join Date
    Aug 2009
    Posts
    1
    Rep Power
    0

    Default Same problem

    Hello guys,

    I have the same problem executing an java application. I didn't compiled this application. Is there any chance to fix it?

    btw: I am using Windows Vista Premium - on XP the applications works fine.

    It is an web application that executes these files:

    FreeCommander - Inhalt des Ordners: C:\Users\b001rhan\dc_fw\IAPJRE-1_4_2_09 26.08.2009 12:02

    Datum Uhrzeit Attr. Bytes Dateiname
    ---------- -------- ------ ---------------- --------
    C:\Users\b001rhan\dc_fw\IAPJRE-1_4_2_09
    21.04.2009 13:03:09 -D---- bin
    21.04.2009 13:03:09 A----- 1.126 CHANGES
    21.04.2009 13:03:09 A----- 4.519 COPYRIGHT
    21.04.2009 13:03:19 A----- 243 iapjre-1_4_2_09-deployment.xml
    21.04.2009 13:02:55 A----- 16.995.395 j2re-1_4_2_09-windows-i586-i-iap.jar
    21.04.2009 13:03:10 -D---- javaws
    21.04.2009 13:03:18 -D---- lib
    21.04.2009 13:03:16 A----- 14.625 LICENSE
    21.04.2009 13:03:16 A----- 25.641 LICENSE.rtf
    21.04.2009 13:03:16 A----- 96.318 LICENSE_de.rtf
    21.04.2009 13:03:16 A----- 33.512 LICENSE_es.rtf
    21.04.2009 13:03:16 A----- 50.533 LICENSE_fr.rtf
    21.04.2009 13:03:16 A----- 62.114 LICENSE_it.rtf
    21.04.2009 13:03:16 A----- 50.115 LICENSE_ja.rtf
    21.04.2009 13:03:16 A----- 305.403 LICENSE_ko.rtf
    21.04.2009 13:03:16 A----- 71.880 LICENSE_sv.rtf
    21.04.2009 13:03:16 A----- 33.149 LICENSE_zh_CN.rtf
    21.04.2009 13:03:16 A----- 32.341 LICENSE_zh_TW.rtf
    21.04.2009 13:03:08 -D---- META-INF
    21.04.2009 13:03:16 A----- 11.755 README.txt
    21.04.2009 13:03:16 A----- 10.367 THIRDPARTYLICENSEREADME.txt
    21.04.2009 13:03:16 A----- 998 Welcome.html
    -------------------
    17.800.034 18 Dateien

    Summe C:\Users\b001rhan\dc_fw\IAPJRE-1_4_2_09
    Ordner = 1
    Dateien = 18
    Bytes = 17.800.034

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

Similar Threads

  1. Setting the DSN
    By tim in forum JDBC
    Replies: 1
    Last Post: 02-14-2008, 10:55 PM
  2. Help with setting up Java
    By itmasterw in forum New To Java
    Replies: 6
    Last Post: 01-19-2008, 12:04 AM
  3. Help with setting up please
    By BlitzA in forum New To Java
    Replies: 6
    Last Post: 12-29-2007, 01:54 PM
  4. Replies: 1
    Last Post: 08-07-2007, 07:45 AM
  5. Help with setting number as even or odd
    By fegiflu in forum New To Java
    Replies: 8
    Last Post: 07-24-2007, 07:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •