gudii9
asked on
arguments to jar
Hi,
i have a class like below
i want to make a jar and pass arguments to it. How to pass arguments to jari may have other classes coming there
please advise
i have a class like below
public class JarClass {
public static void main(String[] args) {
// TODO Auto-generated method stub
String arg1 = args[0];
String arg2 = args[1];
String result= arg1+arg2;
System.out.println("result is"+result);
}
}
i want to make a jar and pass arguments to it. How to pass arguments to jari may have other classes coming there
please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
how to set in both places. please advise
I don't know - i don't use that IDE
ASKER
while exporting need to select main class then worked
ASKER
no main manifest attribute, in TestJar.jar
when i exported as jar in eclipise and gave above command getting above error. please advise