setting a CLASSPATH in the script - classpath

I have a script in which I want to set the CLASSPATH
as
/dun/d2ddm0/bea/weblogic91/server/lib/jxl.jar:/dun/d2ddm0/bea/user_projects/domains/RMGemDev3023/server/lib/weblogic.jar:/dun/d2ddm0/bea/user_projects/domains/RMGemDev3023/server/lib/parser.jar:/dun/d2ddm0/bea/user_projects/domains/RMGemDev3023/server/lib/jconn2.jar:.
When I declared in the shell script and then did the export CLASSPATH .My script is not working .Could you please tell how can I set the CLASSPATH (with the above value) in the script so that my script could recognize it. I use tcsh shell.

In tcsh you use setenv instead of export (which is a bash-ism)
So, you should try:
setenv CLASSPATH /dun/d2ddm0/bea/weblogic91/server/lib/jxl.jar:/dun/d2ddm0/bea/user_projects/domains/RMGemDev3023/server/lib/weblogic.jar:/dun/d2ddm0/bea/user_projects/domains/RMGemDev3023/server/lib/parser.jar:/dun/d2ddm0/bea/user_projects/domains/RMGemDev3023/server/lib/jconn2.jar:.
Good luck.

Related

How do I specify the java version to use with the Ammonite Scala shell on Windows?

I am working on an enterprise system where I can't control my system Path environment variable, and the system path points to a version of Java that is currently broken. I have another version of Java installed, and I would like to use that to run the Ammonite shell. Is this possible?
My hacky solution was to rename ammonite from amm.bat to amm-default.bat and create a new batch file called amm.bat that just adds my desired jre to the front of the session Path:
#echo off
set Path=C:\Users\bohlli\.jdks\corretto-1.8.0_292\bin;%Path%
amm_default.bat
I tried changing the path in the ammonite batch script itself, but every time I tried, something broke.

How to change perl default executable file path in windows?

Now I'm using Padre IDE. Since I am using that, It uses different perl.exe file to run the code.
But by default perl.exe path is set to C:\Perl\bin\perl.exe. I want to change this path to IDE path. How to change this ?
This path is save in environment variable PATH (Advanced System setting->Advanced->Environment Variables).
The search path is stored in the PATH environment variable. The path to the IDE version is either missing or comes after 'C:\Perl\bin' in the list.
At the command line, you can view the setting with this command:
echo %PATH%
If it's just missing, this command will add the one you want to the front of the list:
setx PATH "Path\To\IDE\Perl;%PATH%" /m
Actually, that should work in any case - nothing should break because of a duplicated entry in the list.

How do I read a Linux environment variable into install4j

My application sets CLASSPATH in a shell script named shrc that sets up the environment to run java commands. Is there an easy way to pass the CLASSPATH used in an installed application to install4j so I can use it in an action? The working solution I have uses "Run executable or batch file" to run a script that does this:
. ./shrc
${APPHOME}/jre/bin/java -cp ${CLASSPATH} ...etc...
I do this within an add-on installer, so the shrc already exists, but I need to run some of the existing java code to configure the patches.
It seems to me there must be a better way to do this that would work on Windows also. Any help is appreciated.
To read environment variables, use
System.getenv("CLASSPATH")
If you would like to use it as an install4j installer variable, add a "Set a variable" action with the above line as the script.

ttf2ufm: command not found

I'm trying to install a font for use with TCPDF. To do so, I need to run the included command line utility ttf2ufm. (Included with TCPDF in fonts/utils/ttf2ufm) When I run it though, I get the error -bash: ttf2ufm: command not found. I'm probably just overlooking something simple, but I've searched and can't find what I'm missing here.
Should mention I'm using Debian Lenny.
Perhaps you do not know how commands are executed in bash.
If the program is not in the path, you need to specify the path to get it to run.
If you are in the right directory.
.../fonts/utils/ $ ./ttf2ufm ....
Note the ./ in front of it, that gives the file a path, in the present working directory, or the full path will work, or any other relative path. Just using ttf2ufm on its own will not, as the current directory is not usually part of the executable path.
Additionally, the program will need its executable bit set.

XAMPP - Change #INC path to direct to Activeperl 5.12.2 LIB

I currently have XAMPP installed at C:\xampp. I currently have Activeperl installed at C:\Perl64.
How can I get my XAMPP server to utilize the library in activeperl instead of the built in library in xampp when executing perl scripts?
set your PERL5LIB environment variable to point into the ActivePerl lib directory.
I don't have the exact incantation for you. I switched from ActivePerl to Strawberry Perl this summer right after YAPC::NA.
If you have cgi/fastcgi application, it is good to point to your AP installation with shebang at the script top:
#!C:/Perl64/bin/perl.exe
The libraries will go along.
It might get more complicated if you have perl built into Apache with mod_perl, though.
Add environment variable PERL5LIB -> your lib path in user variables.Follow the below steps:
Right click on my computer and go to property
Click advanced system settings
Click Environment variables
In system variables click new
In variable name type PERL5LIB
In variable value type path to lib folder
Or run following for windows in command prompt:
set PERL5LIB=c:\code\lib
Or run following for Linux:
export PERL5LIB=/home/code/lib
Now open apache2\conf\httpd.conf in Notepad++ and do following changes
Add Perl library folder paths anywhere in the file.
SetEnv PERL5LIB C:/code/lib;C:/usr/site/lib;C:/usr/lib
save the config and restart the apache service.
Set the environment variable in httpd.conf. Like described in this post. Settings take effect after restarting Apache. I put this line:
SetEnv PERL5LIB=C:\Strawberry\perl\lib;C:\Strawberry\perl\site\lib
Worked great with Strawberry Perl.