I actually came up with an interesting way to make everything work. I first created a file called jdk122.desktop in /usr/share/apps/konsole. Here is the file. ********************************************* [Desktop Entry] Type=KonsoleApplication Name=jdk122 Name[et]=JDK 1.2.2 Comment=JDK 1.2.2 Exec=bash --init-file /usr/java/jdk122.sh *********************************************
I then edited my script file to look like this... ********************************************* #!/bin/bash # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Set Java Enviroment JAVA_HOME=/usr/java/jdk122 export JAVA_HOME CLASSPATH=. export CLASSPATH JDK_HOME=$JAVA_HOME export JDK_HOME JES_INSTALL_DIR=/home/kevin/java/jes2.0 export JES_INSTALL_DIR JES_JAVA_HOME=$JAVA_HOME export JES_JAVA_HOME # Set Path PATH=$JAVA_HOME/bin:$PATH export PATH ********************************************* Now when I open a konsole session I just click file and select my jdk 1.2.2 enviroment and it sets up a window perfectly. I can do this with all my java enviroments and easily navigate betwwen them! I love linux! Yes it was a pain in the ass to do but now that it is set up it's the easiest way I have seen to work with multiple sessions. Just thought you guys would like to know how I did it. If you have any surther suggestions please let me know. Thanks, Kevin ----- Original Message ----- From: "dfox" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 05, 2002 3:55 PM Subject: Re: [expert] path variable > > now back to the original problem that I am having. When I run this script > > in a konsole it splits into a seperate window, runs it and then closes. How > > OK I saved your sample script to play with it. Sure enough, if I do > something like 'konsole -e script.sh' it opens up a new instance of > konsole and then quickly closes the window and exits. As it seems, the > script itself just is going to terminate as soon as the environment is > set up. You'll need something that will run after the environment is > set up, or you might want to start a new konsole and then do 'source > script.sh' which reads in the correct environment and then leaves you > at a prompt where you can run the java script. > > At least if I do 'source script.sh' the environment variables are > set to what is desired, and they'll be different for the bash running in > that konsole, compared with a bash running in a different console. > > > > > ---------------------------------------------------------------------------- ---- > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com >
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com