Venkat veramasu

Greenhorn
+ Follow
since Aug 08, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Venkat veramasu

Hi Rob,

Thanks for your reply. But the encrypted password comes from calling another function which sends the encryptedpassword.

Thanks,
Venkat
12 years ago
Hi Gurus,

I know its a basic question. but i dont how it is handled in java.

I have a program that handles 5 String[] args. The input args are going to be

ipaddress time username encryptedpassword role.

10.0.0.0 1306149242287 Admin Tf]Mbp9}`n,$H'Ld0\"Vh|% AdminUser

note that the encrypted password contains " (Double Quotes). Becuase of this the Java main method takes `Tf]Mbp9}`n,$H'Ld0\"Vh|% AdminUser` as a single argument. So if i try to handle args[4] then i get ArrayOutofBoundException

Here is the sample code



When i run this program
C:>java com.xyz.dm.TestArgs 10.0.0.0 1306149242287 Admin Tf]Mbp9}`n,$H'Ld0\"Vh|% Admin
Lenth5
Arument is ==10.0.0.0
Arument is ==1306149242287
Arument is ==Admin
Arument is ==Tf]Mbp9}`n,$H'Ld0"Vh|%
Arument is ==Admin



But if i run the same class through ProcessBuilder and passing these exact argument, im getting the java.lang.ArrayIndexOutOfBoundsException: 4

Here is the code:




Here is the output

In ======== Lenth4
Argument is ==10.78.0.0
Argument is ==1306149242287
Argument is ==Admin
Argument is ==Tf]Mbp9}`n,$H'Ld0Vh|% Admin

Is it a valid behavior ? To have a workaround im passing the encrypted password as the final argument. But if i have the encrypted password in the middle i will have this exception.

Could someone clarify this behaviour

Thanks,
Venkat
12 years ago
Hi,
Im migrating my application to java 1.6 from 1.4. there are certain apis already Deprecated in 1.5. So my basic question is what will happen if i continue to use those APIs. Becoz i m seeing the code still in JDK but is marked as @Deprecated.

Thanks in Advance,
Venkataraman
14 years ago
Hi Gurus,

I'm new to EJB. i would like to study EJB. Do i need to start from EJB 2 or i can directly study EJB3.0. Because it seems EJB 3.0 simplifies most of the things which are not in 2.
Please advice

Thanks,
Venkat