| Author |
Difference in behaviour of a class from executable jar and main method
|
anees ahamed
Ranch Hand
Joined: Feb 19, 2008
Posts: 31
|
|
Hi, I am attaching a java source here. I have a single question in connection with this class. As you can see in the main method of this class, I give a username and password as credentials. When I execute this program from the main method I get correct output. ie; 'usrname','pwd' combination gives its corresponding output and 'usrname1','pwd1' give its corresponding output. But, when I access this class from the application(executable jar), 'usrname','pwd' gives its corresponding output and after that if I give 'usrname1','pwd1' combination, it give the output corresponding to 'usrname','pwd' Here is my simple Java class. I really wonder how it behaves differenly when used independently and when used from an executable jar. Please provide some help in this regard. Anees [ November 11, 2008: Message edited by: anees ahamed ]
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
Hi there, Can you show us the output of the running program? (I see you have System.out statements there). Also I don't see you validating that the arguments you pass in are really what you expect, it looks like you pass the args[] directly to a PHP call?
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
 |
|
|
subject: Difference in behaviour of a class from executable jar and main method
|
|
|