linux_trojan Posted December 19, 2005 Report Share Posted December 19, 2005 I have java installed, but I dont have it configure. I would like to configure it globally for all applications. In the past,that has involved setting some $PATH in .rcbash or .profile. Recently I saw something on the internet about java.sh. Its confusing. Is there some quick and easy way to do this? [moved from Software by spinynorman] Quote Link to comment Share on other sites More sharing options...
jboy Posted December 19, 2005 Report Share Posted December 19, 2005 No need to change $PATH. Just make a symbolic link to the java executable in /usr/bin (which is already in $PATH). As the root user, execute the following command in a terminal: ln -s /usr/java/jre1.5.0_04/bin/java /usr/bin/java Note that the jre1.5.0_04 in the command above may be different for you - the latest version is 06, I believe. Use the correct directory reference based on your install. Quote Link to comment Share on other sites More sharing options...
linux_trojan Posted December 19, 2005 Author Report Share Posted December 19, 2005 I guess this command is not completely global, coz java doesnt work in Firefox. I have to do another sym link to the mozilla plugin folders? Back around 2002, I remember you could just do a $PATH configuration in .rcbash and bingo that was it. Java worked everywhere. Are the good ole days over? Quote Link to comment Share on other sites More sharing options...
scarecrow Posted December 19, 2005 Report Share Posted December 19, 2005 Firefox uses a plugin ( namely libjavaplugin.oji.so ) and not a java binary. But you are right - the above method isn't 'global", some things like Java web start won't work, unless of course you softlink all java binaries to a system path, which does not make much sense. The best method is indeed setting the java binaries path, either to say ~.bash_profile (for single user system), or for global application to some other startup script ( /etc/rc.sysinit or /etc/rc.local or...). Quote Link to comment Share on other sites More sharing options...
linux_trojan Posted December 19, 2005 Author Report Share Posted December 19, 2005 single user mode would be good, actually that is the method to which I was referring. I remember the file .profile was one to edit. These days I cant find .profile or .bashrc. Even if I could, the way to set the path is probably diferent too. If there is a way to set it for single user I would be interested in knowing. Quote Link to comment Share on other sites More sharing options...
scarecrow Posted December 20, 2005 Report Share Posted December 20, 2005 .bash_profile is at your user's directory (hidden). Quote Link to comment Share on other sites More sharing options...
linux_trojan Posted December 20, 2005 Author Report Share Posted December 20, 2005 In Mandriva 2006, there is no .bash_profile. All I see is .bash_history. Even if there were, how would the $PATH look? Quote Link to comment Share on other sites More sharing options...
Crashdamage Posted December 21, 2005 Report Share Posted December 21, 2005 Not sure why you have no ~/.bash_profile or ~/.bashrc, but I don't know of any reason you couldn't create them. On my much-modified 10.1 box my ~/.bash_profile is like this: # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi export BASH_ENV=$HOME/.bashrc ...which as you can see aims to ~/.bashrc, which looks like this: # .bashrc PATH=/bin:/usr/bin:/usr/X11R6/bin:/usr/ucb:/usr/games:/usr/local/bin: # Source global definitions if [ -r /etc/bashrc ]; then . /etc/bashrc fi export NNTPSERVER=news-server.kc.rr.com Does that help you out a little? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.