Splatt has asked for the wisdom of the Perl Monks concerning the following question:
c:\Files\
My souce resides in:
c:\Files\splatt\src\
The hitch is that the class files are compiled to a different directory than the one the script resides in. For example:
$MakeGistMain = "javac $java_opt $class_dir splatt\\src\\.java"; system ($MakeGistMain);
compiles to $class_dir. When it's time to create the jar I need to chage to the directory that contains the class files and jar them up:
$cd_class_dir = "cd $class_dir"; system($cd_class_dir); system("jar -cvf splatt.jar splatt");
What this does is create a jar file containing the .java files, not the .class files, suggesting that the cd isn't actually executed properly. Is there something I'm not doing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I change directories from within a script?
by Hot Pastrami (Monk) on Dec 14, 2000 at 01:51 UTC | |
by Splatt (Initiate) on Dec 14, 2000 at 01:52 UTC | |
by Fastolfe (Vicar) on Dec 14, 2000 at 03:43 UTC |