java - Is it possible to hardcode constructor arguments? -


before using;

public static void main(string args[])  {    try     {        orb orb = orb.init(args, null);    } } 

and having parameter argument

-orbinitialport 1050 

i want remove main section of code , have class being created inside class, possible hardcode these arguments? or have pass data new class class needs it?

sure, mean static initializer method (for corba). can do

string[] newargs = {"-orbinitialport", "1050"};  orb orb = orb.init(newargs, null); 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -