Java SDK installation - Newbie needs help!
Hi, I'm totally new to Linux, and I want to be able to program in Java on my machine.
I dowloaded the sdk bin file from sun.com, extracted it and clicked on the rpm file. It seems the the sdk is now installed (since I can go to the directory), but the java and javac commands are not recognized. Anyone see the obvious mistake I'm making? Thanks! |
Hi there,
and welcome to LQ. I don't know what exactly the RPM does during the installation. But the binaries only put the actual SDK in your filesystem, but don't come with any startup scripts. If you search here, you'll find several answers to that question. In brief you'll need to put the path's to hte binaries in either the system wide configuration files (/etc/profile, or creating /etc/profile.d/java.sh - I prefer the second technique since it will still work if you install an upgrade of your linux) or in your users ~/.bash_rc or ~/.bash_login. HIH Cheers, Tink |
It is most likely that the directory where java and javac are located is not in your path. To see your path, try 'echo $PATH'.
You can add this directory to your path, or create a symlink (man ln) of java and javac to a directory that is already in your path (eg. /bin). Good luck! |
All times are GMT -5. The time now is 02:12 PM. |