using perl script to compile java
From: David (david_jerus_1969_at_voila.fr)
Date: 02/29/04
- Previous message: Arifi Koseoglu: "EOL Anchor under Windows"
- Next in thread: Tad McClellan: "Re: using perl script to compile java"
- Reply: Tad McClellan: "Re: using perl script to compile java"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Feb 2004 06:12:52 -0800
Hi everybody,
I'm trying to do a small perl sript to compile a basic java code.
This is what I've done so far. the name of Java code is "hello.java",
and the name of the perl script is "compile". This is how I run it
:compile Hello.java
There are 2 steps, the first one is to create the hello.class which is
normally done, by writing javac hello.java.
the script is :
'javac $argv[0]';
The second step is to do java hello, using the Hello.class created,
and this what I did in my script to do that :
opendir (DH, "."); # open the local directory
foreach $file (@list) {
if ($file =~ /class$/) {
$trouve = $file;
last;} # search the Hello. class.
}
@test = split(/.class/,$trouve,2); # separate Hello from Hello.class
and run it
'java $test[0]'; #this line of code is supposed to do the step 2 but
it doesn't work.
any idea is welcomed.
Cheers;
David
- Previous message: Arifi Koseoglu: "EOL Anchor under Windows"
- Next in thread: Tad McClellan: "Re: using perl script to compile java"
- Reply: Tad McClellan: "Re: using perl script to compile java"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|