java - How do you Specify a target directory for a txt file to be passed in -


Enter the code here I'm trying to specify a directory for a txt.file That which is being made when the jar file is played, is there any way to specify in the console as an argument where I want to make that TXT file:

The main Argument is:

  public static zero main (string [] args) {// TODO automatically generated method Stub C: \ Users \ 802591720 \ document \ mystuff \ Programs \ JavaCode \ xmlSchema \ ManageBillingCreditAndDebit.20130219.xsd // string filename = "ManageBillingCreditAndDebit.20130219.xsd"; // string source = "c: \ user \ 607817544 \ as1 \"; String path 1 = args [0]; String filename = args [1]; TagDef tag def; String [] operation; {Operation = listOperationsUnique ("C: \\ User \\ 607817544 \\ as1 \\ ManageBillingCreditAndDebit.20130219.wsdl"); System.out.println ("Operation:" + operations.length); For (Int i = 0; I & lt; Operation. Lamper; I ++) {System.out.println ("Operation:" + Operation [i]); }} Hold (FileNotFoundException E) {// TODO auto generated blocking block e.printStackTrace (); } Grip (SAXException E) {// TODO Automatic generated block e.printStackTrace (); } Grip (IOException E) {// TODO Auto-Generated Catch Block e.printStackTrace (); } Hold (parser configuration exception e) {// Todo auto-generated catch block e.printStackTrace (); } {TagDef = refheader (path 1, filename); Println ("=============================================== ================== "); System.out.println ("Tag Description"); Println (tagDef); Println ("=============================================== ================== "); } Grip (Exception E) {// TODO Auto generated blocking block e.printStackTrace (); }   

}}

And this is the file's writing:

  System.out.println (""); Fh.openFile ("hello.txt"); fh.writeLine (""); fh.closeFile ();   

How do I go about specifying where to create that file in the console console?

Div class = "post -text "itemprop =" text ">

I suggest using the swing text field to open when you click on the jar, and after entering the path in the text field, submit the action that should be text Take data from the field and make further arguments.

So in this way the UI is a really good way to enter the path ..

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -