Executing a file with Java?

Hi,
I wanted to know how I could execute a file with java. Here are a couple scenarios - let's say I am developing an anti-spyware utility and I wanted to first write a batch file, and then create it in a folder, then run it when they click "Run". Then afterwards I want to shutdown their computer.
My Mindset:
- FileWriter to create the .bat and write the Batch commands.
- Execute the batch file.
- Execute the shutdown.exe file to reboot their PC.
So my simple question is, how can I execute a file?
Thanks!
-Josh

Well here is the code I have:
            try
                Runtime.getRuntime().exec("cmd.exe /c test.bat");
            catch(IOException e1)
                //NOTHING
            }Now my cmd.exe is obviously in my Windows System32 folder, and my "test.bat" file is in my C:\ root directory. So I am wondering why that wont execute. I tried a fer other things too like:
Runtime.getRuntime().exec("cmd.exe  c:\test.bat");that didn't work either, because you can't have a "\" in a string...
So how can I get this thing to execute the batch file?

Similar Messages

  • Executing batch file from Java stored procedure hang

    Dears,
    I'm using the following code to execute batch file from Java Stored procedure, which is working fine from Java IDE JDeveloper 10.1.3.4.
    public static String runFile(String drive)
    String result = "";
    String content = "echo off\n" + "vol " + drive + ": | find /i \"Serial Number is\"";
    try {
    File directory = new File(drive + ":");
    File file = File.createTempFile("bb1", ".bat", directory);
    file.deleteOnExit();
    FileWriter fw = new java.io.FileWriter(file);
    fw.write(content);
    fw.close();
    // The next line is the command causing the problem
    Process p = Runtime.getRuntime().exec("cmd.exe /c " + file.getPath());
    BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line;
    while ((line = input.readLine()) != null)
    result += line;
    input.close();
    file.delete();
    result = result.substring( result.lastIndexOf( ' ' )).trim();
    } catch (Exception e) {
    e.printStackTrace();
    result = e.getClass().getName() + " : " + e.getMessage();
    return result;
    The above code is used in getting the volume of a drive on windows, something like "80EC-C230"
    I gave the SYSTEM schema the required privilege to execute the code.
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write, execute, delete');
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC DBMS_JAVA.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    GRANT JAVAUSERPRIV TO SYSTEM;
    I have used the following to load the class in Oracle 9ir2 DB:
    loadjava -u [system/******@orcl|mailto:system/******@orcl] -v -resolve C:\Server\src\net\dev\Util.java
    CREATE FUNCTION A1(drive IN VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'net.dev.Util.a1(java.lang.String) return java.lang.String';
    variable serial1 varchar2(1000);
    call A1( 'C' ) into :serial1;
    The problem that it hangs when I execute the call to the function (I have indicated the line causing the problem in a comment in the code).
    I have seen similar problems on other forums, but no solution posted
    [http://oracle.ittoolbox.com/groups/technical-functional/oracle-jdeveloper-l/run-an-exe-file-using-oracle-database-trigger-1567662]
    I have posted this in JDeveloper forum ([t-853821]) but suggested to post for forum in DB.
    Can anyne help?

    Dear Peter,
    You are totally right, I got this as mistake copy paste. I'm just having a Java utility for running external files outside Oracle DB, this is the method runFile()
    I'm passing it the content of script and names of file to be created on the fly and executed then deleted, sorry for the mistake in creating caller function.
    The main point, how I claim that the line in code where creating external process is the problem. I have tried the code with commenting this line and it was working ok, I made this to make sure of the permission required that I need to give to the schema passing security permission problems.
    The function script is running perfect if I'm executing vbs script outside Oracle using something like "cscript //NoLogo aaa1.vbs", but when I use the command line the call just never returns to me "cmd.exe /c bb1.bat".
    where content of bb1.bat as follows:
    echo off
    vol C: | find /i "Serial Number is"
    The above batch file just get the serial number of hard drive assigned when windows formatted HD.
    Same code runs outside Oracle just fine, but inside Oracle doesn't return if I exectued the following:
    variable serial1 varchar2(1000);
    call A1( 'C' ) into :serial1;
    Never returns
    Thanks for tracing teh issue to that details ;) hope you coul help.

  • I can't open or save file with Java Web Start

    Hi,
    i can't open or save file with Java Web Start:
    import java.io.*;
    import java.util.*;
    public class MetaDataFileCreator {
    public String fileNameSpace = null;
    public String fileName = null;
    protected Properties file = null;
    public MetaDataFileCreator(String fileNameSpace, String fileName) {
    this.fileNameSpace = fileNameSpace;
    this.fileName = fileName;
    public void createMetaDataFile() {
    try {
    System.out.println("file METADATA");
    ClassLoader cl = this.getClass().getClassLoader();
    String nameFileMetaData = fileNameSpace + fileName + ".txt";
    FileOutputStream fileOS = new FileOutputStream(cl.getResource(nameFileMetaData).getFile());
    file = new Properties();
    file.setProperty("aaaaa", "aaaa");
    file.store(fileOS, "");
    fileOS.close();
    } catch (Exception e) {
    System.out.println("Error writing metadata-file: " + e);
    System.exit(1);
    e.printStackTrace();
    I have try also to open a file like this:
    ClassLoader cl = this.getClass().getClassLoader();
    file.load(cl.getResourceAsStream(nameFile));
    also like this:
    try {
    fos = (FileOpenService)ServiceManager.lookup("javax.jnlp.FileOpenService");
    fss = (FileSaveService)ServiceManager.lookup("javax.jnlp.FileSaveService");
    } catch (UnavailableServiceException e) {
    fss = null;
    fos = null;
    System.out.println("Error with JNLP");
    System.exit(1);
    if (fss != null && fos != null) {
    try {
    // get a FileContents object to work with from the
    // FileOpenService
    FileContents fc = fos.openFileDialog(null, null);
    //FileContents newfc2 = fss.saveAsFileDialog(null, null, fc);
    // get the OutputStream and write the file back out
    if (fc.canWrite()) {
    // don't append
    os = fc.getOutputStream(false);
    } catch (Exception e) {
    e.printStackTrace();
    also like this:
    File f = new File((System.getProperty("user.home")+"x.txt").toString());
    FileOutputStream fileX = new FileOutputStream(f);
    OutputX = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fileX, "UTF8")));
    OutputX.println(....
    but it doesn't work with Java Web Start.
    Can someone help me?
    How can I open or save file?
    thank you.
    Sebastiano

    Did you specify <all-permissions/> in your JNLP file? Did you sign your code? What error are you getting?

  • How to use parameter file with java

    Is it possible to use a parameter file with Java, and is there any class/method to make it easy to call and use these parameter from a text file, other than scanning the whole text file manually as we can do normally with visual basic/c++, so we can call the program with the parameter file, like java testing c:\\testing.ini

    If I understand you correctly, you may be looking for a properties file. This is basically a text file that contains pairs of strings in the form:
    parameter1=value1
    parameter2=value2
    parameter3=value3
    ...etc.
    and the values are retrieved using the java.util.Properties class - see:
    http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html
    Sample use://Call chis method once, to load the props file.
    //props file is called "demo.properties", and is
    //in a directory that is included in the classpath
        private void loadMyProperties() throws Exception
         InputStream stream = getResourceAsStream("/demo.properties");
         if(stream == null)
             throw new Exception("stream is null!");
         demoProperties = new Properties();
         demoProperties.load(stream);
         stream.close();
    // Then you can retrieve properties in your code using:
    String param3 = demoProperties.getProperty("parameter3");
    //...etc

  • Can't create log file with java.util.logging

    Hi,
    I have created a class to create a log file with java.util.logging
    This class works correctly as standalone (without jdev/weblogic)
    import java.io.IOException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.logging.*;
    public class LogDemo
         private static final Logger logger = Logger.getLogger( "Logging" );
         public static void main( String[] args ) throws IOException
             Date date = new Date();
             DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
             String dateStr = dateFormat.format(date);
             String logFileName = dateStr + "SEC" + ".log";
             Handler fh;          
             try
               fh = new FileHandler(logFileName);
               //fh.setFormatter(new XMLFormatter());
               fh.setFormatter(new SimpleFormatter());
               logger.addHandler(fh);
               logger.setLevel(Level.ALL);
               logger.log(Level.INFO, "Initialization log");
               // force a bug
               ((Object)null).toString();
             catch (IOException e)
                  logger.log( Level.WARNING, e.getMessage(), e );
             catch (Exception e)
                  logger.log( Level.WARNING, "Exception", e);
    }But when I use this class...
    import java.io.File;
    import java.io.IOException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.logging.FileHandler;
    import java.util.logging.Handler;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import java.util.logging.XMLFormatter;
    public class TraceUtils
      public static Logger logger = Logger.getLogger("log");
      public static void initLogger(String ApplicationName) {
        Date date = new Date();
        DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
        String dateStr = dateFormat.format(date);
        String logFileName = dateStr + ApplicationName + ".log";
        Handler fh;
        try
          fh = new FileHandler(logFileName);
          fh.setFormatter(new XMLFormatter());
          logger.addHandler(fh);
          logger.setLevel(Level.ALL);
          logger.log(Level.INFO, "Initialization log");
        catch (IOException e)
          System.out.println(e.getMessage());
    }and I call it in a backingBean, I have the message in console but the log file is not created.
    TraceUtils.initLogger("SEC");why?
    Thanks for your help.

    I have uncommented this line in logging.properties and it works.
    # To also add the FileHandler, use the following line instead.
    handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandlerBut I have another problem:
    jdev ignore the parameters of the FileHandler method .
    And it creates a general log file with anothers log files created each time I call the method logp.
    So I play with these parameters
    fh = new FileHandler(logFileName,true);
    fh = new FileHandler(logFileName,0,1,true);
    fh = new FileHandler(logFileName,10000000,1,true);without succes.
    I want only one log file, how to do that?

  • Problem unzipping larger files with Java

    When I extract small zip files with java it works fine. If I extract large zip files I get errors. Can anyone help me out please?
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import java.util.zip.*;
    public class  updategrabtest
         public static String filename = "";
         //public static String filesave = "";
        public static boolean DLtest = false, DBtest = false;
         // update
         public static void main(String[] args)
              System.out.println("Downloading small zip");
              download("small.zip"); // a few k
              System.out.println("Extracting small zip");
              extract("small.zip");
              System.out.println("Downloading large zip");
              download("large.zip"); // 1 meg
              System.out.println("Extracting large zip");
              extract("large.zip");
              System.out.println("Finished.");
              // update database
              boolean maindb = false; //database wasnt updated
         // download
         public static void download (String filesave)
              try
                   java.io.BufferedInputStream in = new java.io.BufferedInputStream(new
                   java.net.URL("http://saveourmacs.com/update/" + filesave).openStream());
                   java.io.FileOutputStream fos = new java.io.FileOutputStream(filesave);
                   java.io.BufferedOutputStream bout = new BufferedOutputStream(fos,1024);
                   byte data[] = new byte[1024];
                   while(in.read(data,0,1024)>=0)
                        bout.write(data);
                   bout.close();
                   in.close();
              catch (Exception e)
                   System.out.println ("Error writing to file");
                   //System.exit(-1);
         // extract
         public static void extract(String filez)
              filename = filez;
            try
                updategrab list = new updategrab( );
                list.getZipFiles();
            catch (Exception e)
                e.printStackTrace();
         // extract (part 2)
        public static void getZipFiles()
            try
                //String destinationname = ".\\temp\\";
                String destinationname = ".\\";
                byte[] buf = new byte[1024]; //1k
                ZipInputStream zipinputstream = null;
                ZipEntry zipentry;
                zipinputstream = new ZipInputStream(
                    new FileInputStream(filename));
                zipentry = zipinputstream.getNextEntry();
                   while (zipentry != null)
                    //for each entry to be extracted
                    String entryName = zipentry.getName();
                    System.out.println("entryname "+entryName);
                    int n;
                    FileOutputStream fileoutputstream;
                    File newFile = new File(entryName);
                    String directory = newFile.getParent();
                    if(directory == null)
                        if(newFile.isDirectory())
                            break;
                    fileoutputstream = new FileOutputStream(
                       destinationname+entryName);            
                    while ((n = zipinputstream.read(buf, 0, 1024)) > -1)
                        fileoutputstream.write(buf, 0, n);
                    fileoutputstream.close();
                    zipinputstream.closeEntry();
                    zipentry = zipinputstream.getNextEntry();
                }//while
                zipinputstream.close();
            catch (Exception e)
                e.printStackTrace();
    }

    In addition to the other advice, also change every instance of..
    kingryanj wrote:
              catch (Exception e)
                   System.out.println ("Error writing to file");
                   //System.exit(-1);
    ..to..
    catch (Exception e)
    e.printStackTrace();
    }I am a big fan of the stacktrace.

  • How to execute ".exe" files using java

    Hi,
      This is guruvulu,
         I have a problem in executing ".exe" files.For Example InternetExplorer.

    Hi,
    You can execute .exe files in JAVA using the following code.
    Runtime rt1 = Runtime.getRuntime();
    Process pc = rt1.exec("someexe.exe");
    you can get the output of the executed exe file in
    in = pc.getInputStream(); //this returns a InputStream
    hope this solves your problem.
    regards,
    P.Venkat

  • Is it possible to play .rm and .wma file with java?

    Hello Friends,
    Please tell me,
    how to play .rm and .wma file with java?
    Thanks,
    Harsh Modha

    As far as I know, you can not play those files.
    Here you have the complete list of supported formats. Hope this helps.
    http://java.sun.com/products/java-media/jmf/2.1.1/formats.html
    Maybe you should try to convert from wma or rm to a supported format before attempting to play it.

  • How to execute .msi files from java program

    Hi friends,
    i have written a java program which invokes and thereby execute any executable files like .exe and .bat.
    So its working fine with .exe and .bat files, but it is not working with .msi files.......can you please help me how can i execute .msi files as well??
    public class Executeexe {
         public static void main(String ar[])
              try
              Process p=null;
              Runtime rt=Runtime.getRuntime();
              p=rt.exec("D:\\mysql-essential-5.0.83-win32.msi");
              p.waitFor();
    catch(Exception e)
    }here is the program

    Make sure that the command that's being exec'd works from the cmd line.
    Then read this article and do what it says:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Then if you still are having problems explain what "...it is not working with .msi files..." really means, and provide a [SSCCE Example program|http://mindprod.com/jgloss/sscce.html]

  • PL/SQL to execute exe file with parameters from DB

    Hi all,
    I have a bit of a problem.
    I am in need to write all Logon, Logoff and Logon fail data onto the Windows Application Log. To do this I already tried various solutions but with my configuration (Oracle EE 10.2.0.4 and Windows Server 2003 R2 X64) the only possible solution (apparently) is the following.
    I create a Table with the info I need:
    CREATE TABLE logonaudittable
    event VARCHAR2(15),
    sid NUMBER,
    serial# NUMBER,
    orario DATE,
    username VARCHAR2(30),
    osuserid VARCHAR2(30),
    machinename VARCHAR2(64)
    I create a trigger for Logon Data, one for Logoff and one for Logon Fail:
    LOGON trigger.
    CREATE OR REPLACE TRIGGER logonauditing AFTER LOGON ON database
    DECLARE
    machinename VARCHAR2(64);
    osuserid VARCHAR2(30);
    v_sid NUMBER(10);
    v_serial NUMBER(10);
    CURSOR c1 IS
    SELECT sid, serial#, osuser, machine
    FROM v$session WHERE audsid = userenv('sessionid');
    BEGIN
    OPEN c1;
    FETCH c1 INTO v_sid, v_serial, osuserid, machinename;
    INSERT INTO logonaudittable VALUES ( 'LOGON', v_sid, v_serial, sysdate,
    user, osuserid, machinename );
    CLOSE c1;
    END;
    LOGOFF trigger
    CREATE OR REPLACE TRIGGER logoffauditing
    BEFORE LOGOFF ON database
    DECLARE
    machinename VARCHAR2(64);
    osuserid VARCHAR2(30);
    v_sid NUMBER(10);
    v_serial NUMBER(10);
    CURSOR c1 IS
    SELECT sid, serial#, osuser, machine
    FROM v$session WHERE audsid = userenv('sessionid');
    BEGIN
    OPEN c1;
    FETCH c1 INTO v_sid, v_serial, osuserid, machinename;
    INSERT INTO logonaudittable VALUES ( 'LOGOFF', v_sid, v_serial, sysdate,
    user, osuserid, machinename );
    CLOSE c1;
    END;
    LOGON FAIL trigger
    CREATE OR REPLACE TRIGGER logonfailauditing
    AFTER SERVERERROR ON database
    DECLARE
    machinename VARCHAR2(64);
    osuserid VARCHAR2(30);
    v_sid NUMBER(10);
    v_serial NUMBER(10);
    CURSOR c1 IS
    SELECT sid, serial#, osuser, machine
    FROM v$session WHERE audsid = userenv('sessionid');
    BEGIN
    IF (IS_SERVERERROR(1017)) THEN
    OPEN c1;
    FETCH c1 INTO v_sid, v_serial, osuserid, machinename;
    INSERT INTO logonaudittable VALUES ( 'FAILLOGON', v_sid, v_serial, sysdate,
    user, osuserid, machinename );
    CLOSE c1;
    END IF;
    END;
    The I create a trigger that starts every time something is written on the table.
    This trigger needs to start an EXE file that writes the latest data written on the table into the Windows Application Log.
    So I need a trigger that executes my WRITELOG.EXE file adding the parameters. For example:
    Execute WRITELOG.EXE event sid orario username
    So my program will write a Log in Windows with this data:
    Event: LOGON
    Sid: 2938473
    Orario: 12/12/2011 11:45:32
    Username: Scott
    And so on.
    I already have the program that does this, I need to execute the program with the right data directly from trigger or from a procedure executed by my trigger.
    Hope I've been clear and REALLY hope someone can help me!!!
    Thank you all!

    The java and PL/SQL you need to set up is in the very first response in the link. (I don't have a windows Oracle DB DBMS_JAVA to try it myself). Change the UNIX command '/usr/bin/ls' to your Windows command 'c:\yourdirectory\FILE.EXE'. Assuming you created everything and set permissions as Tom describes (later in the thread), your PL/SQL call in your trigger might look something like this:
    CREATE OR REPLACE TRIGGER logonauditing AFTER LOGON ON database
    DECLARE
    machinename VARCHAR2(64);
    osuserid VARCHAR2(30);
    v_sid NUMBER(10);
    v_serial NUMBER(10);
    CURSOR c1 IS
    SELECT sid, serial#, osuser, machine
    FROM v$session WHERE audsid = userenv('sessionid');
    BEGIN
    OPEN c1;
    FETCH c1 INTO v_sid, v_serial, osuserid, machinename;
    INSERT INTO logonaudittable VALUES ( 'LOGON', v_sid, v_serial, sysdate,
    user, osuserid, machinename );
    RUN_CMD('c:\yourdirectory\FILE.EXE LOGON '||v_sid||' '||v_serial||' '||to_char(sysdate,'MM/DD/YYYY')||' '||user||' '||osuserid||' '||machinename);
    CLOSE c1;
    END;
    Since you want to log what the trigger is writing to the table, you can call the executable with the same information you are writing, instead of writing then reading it back out again.

  • Executing a file within java

    Hey,
    I have what seems like a simple problem. I want to write code that executes a jar file. For example I want a to write a class that executes a executable jar file. I have created the jar file called 1.jar and now I want to execute it in the code of another java program Can anyone help me accomplish this with an example. I have tried using exec and its not working right here is some of my code
         public void runFile()throws Exception
              Runtime.getRuntime().exec(". 1.jar");
    it comes up with the error
    Exception in thread "main" java.io.IOException: CreateProcess: . 1.jar
    error=2
    at java.lang.Win32Process.create(Native Method)
    PLEASE HELP.
    thanks

    Your awesome thanks,
    That worked, however I have one more question for you. Will this run on machines that are just using Java runtime environment?
    basically will this work on any machine with java installed?

  • Generation of Xml file with java output

    Hi i m new to xml and java combination. I have a name value pair kind of output returning from java program. I want to generate the new xml file with the data. Could some one help me out in generating xml file with the data. Could anyone send me the java code that does this task.

    Let me know which parser are you using currently for reading xml files so that i assist you. For now, you can refer to STAX Parser API under this link
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP3.html

  • [b]The challenge is on: Creating PowerPoint Files with Java[/b]

    Hi, guys and geeks!!
    I'm new here and generally not as skilled and talented as you guys -
    that's why I am passing this challenge on to you:
    I want to create a PowerPoint presentation using Java. (My Data will be in XML and I'll have to generate slides with Flow-Charts from that data)
    1.
    I know of only one commercial Library that seems to do this very comfortably. But it costs about $5000... (http://tonicsystems.com/) - have you used it?
    2.
    I know that I could use Apache's POI (http://jakarta.apache.org/poi/), as it gives me access to the MsOLE 2 compound doc. format, but their work is most developed only for Excel and Word. so I'm not sure what kind of obstracles I'd be facing....
    3.
    And then there is JAWIN (http://jawinproject.sourceforge.net/) which would enable me to call COM-Components... How would I do that?
    Any other /better ideas?
    So, please let me know your thoughts and if you know what I could do!
    Also, please let me know how I should go about with it.....
    I'm looking forward to seeing your "muscles" (i.e. knowledge) play...!
    Cheers,
    Anna ;o)

    Hi i'm still working on my program to generate PowerPoint Files with Jawin. I'm trying to get the heght property on a row.
    For example: rows(1).height
    I can get rows. but not rows(1).
    I got a jawin Exception on :
    public int getRowHeight(int row) throws COMException
    DispatchPtr rows;
    int rowHeight;
    DispatchPtr theRows = (DispatchPtr) this.getDispatchPtr().get("Rows",new Integer(1));
    rowHeight = (Integer) theRows.get("Height");
    return rowHeight;
    Here is the stacktrace:
    org.jawin.COMException: 80020003: Member not found.
    at org.jawin.marshal.GenericStub.dispatchInvoke0(Native Method)
    at org.jawin.marshal.GenericStub.dispatchInvoke(GenericStub.java:201)
    at org.jawin.DispatchPtr.getN(DispatchPtr.java:248)
    at org.jawin.DispatchPtr.get(DispatchPtr.java:194)
    at pptpublisher.PPTTable.getRowHeight(PPTTable.java:117)
    at pptpublisher.Main.main(Main.java:51)
    Thanks for replying

  • Hiding Files with Java

    Hi all. I'm trying to hide files (in Windows) using Java. The java.io.File class doesn't seem to have any facilities for changing file attributes in Windows.
    The only solutions that occur to me are to use WScript or to use a batch file with attrib. Does anyone know a way to set files to hidden from within the JVM?
    Thanks!
    Daniel

    Use JNI to call a method written in C?

  • How to read and parse a remote XML file with Java

    Hi.
    Using J2SE v1.4.2, I'd like to read and parse a remote file:
    http://foo.com/file.xml
    Is it possible with Java? I'd be extremely grateful if someone could provide me any webpage showing a very simple code.
    Thank you very much.

    How about the following?
         import java.io.InputStream;
         import java.net.URL;
         import javax.xml.parsers.DocumentBuilder;
         import javax.xml.parsers.DocumentBuilderFactory;
         import org.w3c.dom.Document;
         public static void main(String[] args) throws Exception {
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              DocumentBuilder db = dbf.newDocumentBuilder();
              URL url = new URL("http://foo.com/file.xml");
              InputStream inputStream = url.openStream();
              Document document = db.parse(inputStream);
              inputStream.close();
         }-Blaise

Maybe you are looking for

  • Moving to full 64 bit - advice please

    Ok - Currently i am on Logic 9 - I want to consider getting Logic X. Many of my plugins are 32 bit - how the **** do I get them up to 64 bit? Thinks like Symphobia and Kontact 5. Any pointers to one simple article explaining it all. Thanks!

  • I Can't Update my iTunes on my Computer?

    It's with great disappointment that I say that my macintosh is apparently too old to recieve the new iTunes 10.7 update. Unfortunately for me,when I updated my iPhone to the new 6.0 version I wasn't aware that it requires iTunes 10.7 to sync my iPhon

  • Bandwidth usage with homesharing

    I have recently found my bandwidth being used while streaming from Macbook Pro to Apple TV whilst using Home Sharing. Watching a 1.2 GB movie streamed from iTunes to Apple TV uses 1.2 GB of bandwidth! I have reset my Apple TV but the problem continue

  • Locks file on a file server

    Under Captivate 3 (as part of the full Tech. Comm. Suite), I'm authoring Captivate presentations on a Windows XP PC, and storing archive copies of the resultant .cp and stand-alone .exe files on a file server. These server copies are never opened/edi

  • How to validate an item before the next item in block?

    I am new to forms. I want to validate order_id field if it does not exist it will alert the user whether he wants to create a new record? if it exists it should populate the form. I tried when_item_validate trigger but is not working. Can anybody hel