How to execute java program from perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to execute java program from perl
# 1  
Old 08-10-2008
How to execute java program from perl

hello all
how can i run the java command that can eccept N numbers of args for example :
java -cp .;foo.jar myApp 1 "ww"
or
java -cp .;foo.jar myApp 1 2 3 "ww"
or
java -cp .;foo.jar myApp "args1" "args2" "args3"

Thanks

Last edited by umen; 08-10-2008 at 02:42 AM..
# 2  
Old 08-10-2008
look into perls system() function if all you need to do is run the external application but not get any data back from it. If you need it to return data to the perl program look into qx//.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

PERL: In a perl-scripttTrying to execute another perl-script that SETS SOME VARIABLES !

I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open()) I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies

2. Shell Programming and Scripting

how to execute a program present on another server using SFTP in perl

Hi, I want to execute a program which is present on another server. i want to use SFTP in perl, is it possible? how ? thanks. (1 Reply)
Discussion started by: anandgodse
1 Replies

3. Shell Programming and Scripting

how to execute a unix shell script from a java program

Hi All, well , i am facing this problem.. i have tried a few sample codes but there isn't any solution . could anyone please give a sample code as of how to do this... Please see the below details...and read the details carefully. I have written some code, logic is 1)from... (4 Replies)
Discussion started by: aish11
4 Replies

4. UNIX for Dummies Questions & Answers

how to execute program without using ./ or sh

Hi, I am a complete newbie for unix. I have just installed mysql on my MAC. I was wondering every time I wanted to use mysql I had to ./mysql or sh mysql everytime on /usr/local/bin/mysql/bin. How can I execute the mysql program without using ./ or sh. I chmod +x already. And what do I have to... (3 Replies)
Discussion started by: noppanit
3 Replies

5. Programming

Not able to execute the method based on OS in JAVA

Hi, In my application,I want to find out the OS name and based on OS I want to do some specific operations.So I write some code based on it in JAVA but I am able to get the OS name but Not able to use the method specific to OS.I write a simple code to check it and found that it is not going to... (1 Reply)
Discussion started by: smartgupta
1 Replies

6. Solaris

how to execute java in specified time- urgent

Hi, 1. I want to execute a set of java files(a small appln) at specified time interval in solaris. that java uses documentum DFC calls. 2. How can i do this? from thread i chked ppl suggest to do cron, and so.. pls provide me a details steps hence i am new to solaris.. Any... (1 Reply)
Discussion started by: radhnki
1 Replies

7. UNIX for Dummies Questions & Answers

Script to open program and send/execute command in program

Hi, i want to write a script that executes a program (exec?) . this program then requires a filename as input. how do i give it this input in the script so the program will be complete run and close by the script. e.g. exec prog.exe program then asks for filename "enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies

8. Shell Programming and Scripting

how to execute this program?

Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 32768 16016 52% 2271 14% / /dev/hd2 4587520 1889420 59% 37791 4% /usr /dev/hd9var 65536 12032 82% 518 4% /var /dev/hd3 819200 637832 ... (1 Reply)
Discussion started by: sathyaac
1 Replies

9. Shell Programming and Scripting

How to invoke a perl script from java program

Hi: I need to invoke a perl script from a java applet program in UNIX operating system.. Can you please suggest me!!! (4 Replies)
Discussion started by: grajesh_955
4 Replies

10. Shell Programming and Scripting

execute command unix with java:possible or not?

hi everybody, i have a small unix script and i want to use it with java, so how can i executte unix command with java (if it is possible): in fact i want to use some values returned by this script with java swings. is it possible (of course everything is possible) but how can i do? thank you in... (4 Replies)
Discussion started by: mips
4 Replies
Login or Register to Ask a Question