perlmoon has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
In shell(ksh) it runs fine works create tickets
#!/usr/bin/ksh export CLASSPATH="/usr/work/ticket/ETicketClient.jar:." PATH=$PATH:"/usr/work/ticket/" test="This is new title" result=`java ETicket.ETicketClient -i Ticket -n p_name -t "$test"` echo $result;
But in Perl its fails
#!/usr/bin/perl -w $ENV{CLASSPATH}="/usr/work/ticket/ETicketClient.jar:."; $ENV{PATH}.=":/usr/work/ticket/" $test="This is perl ticket"; my $result =qx/java ETicket.ETicketClient -i TICKET -n p_name -t "$test"/; print $result;
Gives me Error
Exception in thread "main" java.lang.NoClassDefFoundError: ETicket/ETicketClient Quotes are required for API to recognize options.
I have put \ before quotes but no luck. Tried using safe pipes but same
problem.
Also when i use this line in script
my $result =qx/java ETicket.ETicketClient -i TICKET -n p_name -t title_name/;
Then it runs fine. But is i put this line
my $result =qx/java ETicket.ETicketClient -i TICKET -n p_name -t "title name"/;
Same error is coming.
OS AIX 5.1 Perl 5.6.0 .
Can anyone help me.
Thanks
Sanjay
20051018 Janitored by Corion: Added formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem using Backtick having quotes
by Nkuvu (Priest) on Oct 18, 2005 at 20:08 UTC | |
|
Re: Problem using Backtick having quotes
by fizbin (Chaplain) on Oct 19, 2005 at 13:14 UTC | |
|
Re: Problem using Backtick having quotes
by davidrw (Prior) on Oct 18, 2005 at 18:33 UTC | |
by runrig (Abbot) on Oct 18, 2005 at 18:39 UTC | |
|
Re: Problem using Backtick having quotes
by graff (Chancellor) on Oct 19, 2005 at 03:34 UTC | |
|
Re: Problem using Backtick having quotes
by perlmoon (Initiate) on Oct 18, 2005 at 19:20 UTC |