java - Cannot open already existing notepad file using ProcessBuilder class? -


i know open application notepad following command enough

processbuilder proc=new processbuilder("notepad.exe"); , executing

proc.start(); notepad open`s untitled file.

but read using processbuilder can open particular file in notepad following command processbuilder proc=new processbuilder("notepad.exe","sample");

proc.start(); executing

if sample.txt notepad file doesnt exist in system, notepad open , shows message window asking "sample.txt doesnt exist, want create?". condition fine me.

but before executing proc.start(); if create sample.txt file , save in desktop. , upon executing proc.start(); shouldnt file named sample open in notepad , show me content. rather still asking me "do want create sample.txt". why if had created same file before execution ?


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -