Computing.Net > Forums > Programming > Setting Classpath with Perl

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Setting Classpath with Perl

Reply to Message Icon

Name: smouchawrab
Date: December 26, 2005 at 03:47:46 Pacific
OS: XP Professional
CPU/Ram: Pentium
Comment:

Hello,
I'd like to set a java classpath from a perl script. I tried to use the system function to do so by writing:
"set CLASSPATH=C:\\eclipse\\workspace\\Test;\n";
but the classpath did not changed and the java file could not be executed in a statement written later.

Same problem when I want to change directory from perl; I tried to use system function to change directory as in:
system "cd C:\\Logs";
But again it didn't work.

Any suggestions to fix this issue.
Thanks.

Sincerely.



Sponsored Link
Ads by Google

Response Number 1
Name: ghostdog
Date: December 26, 2005 at 05:53:38 Pacific
Reply:

Just an example.

my $dirtochange = q(c:\logs);

#set classpath.
$ENV["CLASSPATH"] = q(c:\eclipse\workspace\Test);
chdir($dirtochange);

..
#do stuff
...



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Setting Classpath with Perl

Set Extentions with a Batchfile www.computing.net/answers/programming/set-extentions-with-a-batchfile/11788.html

Telnet with Perl www.computing.net/answers/programming/telnet-with-perl/14407.html

Total Newcomer to Perl www.computing.net/answers/programming/total-newcomer-to-perl/3912.html