java - Sending command line arguments from Eclipse -
this question has answer here:
public static void main(string[] args) throws filenotfoundexception, svgformatexception { svg svg = new svg("test.svg"); //so file called test.svg can called upon portablepixmap ppm = new portablepixmap(500, 500); //select size of pixmap(canvas) svg.drawpixmap(ppm); //draw on ppm ppm.writetofile("out.ppm"); //save file out.ppm file
this code wrote, need these values command line input because if hard code this, user cannot select values want use. can please me how these values command line input?
click little arrow next run
button , select run configurations -> (x) = arguments
tab , below program arguments:
text box click variables
button , have @ it.
the next time run program, dialog box prompt arguments.
now, within program, can handle these arguments parsing string[] args
parameter of main method.
Comments
Post a Comment