nagsen kamble

+ Follow
since Jan 25, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nagsen kamble


Instead from command prompt, I am trying to execute java commands like 'javac', 'java' using java program. I have tried Runtime.getRuntime().exec() but it only executes the DOS commands like 'del'. samples those i tried are:

with taking commands as String[],

commands[0] = "cmd";
commands[1] = "javac C:\\";

commands[0] = "cmd";
commands[1] = "javac";
commands[2] = "C:\\";

commands[0] = "cmd";
commands[1] = "set";
commands[2] = "path=C:\\Program Files\\IBM\\WebSphere Studio\\Application Developer IE\\v5.1\\runtimes\\base_v5\\java\\bin";
commands[3] = "javac C:\\";

But none of above is error/exception occurs but nothing happen. Just command prompt comes and disappears but no other action is happening....only DOS command such as following 'del' is working:

commands[0] = "cmd";
commands[1] = "del";
commands[2] = "C:\\";

The lines used to execute are:

Runtime r= Runtime.getRuntime();
Process p=null;
}catch(Exception e)
System.out.println("Exception is:- "+e.getMessage());

Could you please tell me what is the way to execute java commands using java programming language?

My ultimate intention is to execute java commands (jar - xvf and other commands) to jar and unjar the files using java program instead command prompt.
9 years ago
Hey Ulf..thanks for comment...
wel..I found the EJB API source within glassfish installation files but after getting it I realized that there are only Interfaces all over the I come to know that its of no use with having EJB API source because all those Interfaces any way could be studied using EJB API docs.

Wel..thanks for evryone participated..
Thanks you Paul for the reply.

Oh wel..
I am using IBM Websphere 6.1 for our EJB application.

So, do you mean its not possible to have EJB API source code openly on internet in form of .zip/.tar/.jar file just like as we get source for other APIs such as servlet, portlet or even java API source bundled in JDK.

JBOSS is openly avilable on internet for download. does it contain EJB API source.

hey Paul ..I am just curious to have EJB source code for reading and studying it...nothing any other purposes.

Where can i get the full source code of EJB API 2.1 and/or 3.0 on internet?
I searched a lot but didn't find .zip or .tar file of source code.