How to set paths for Linux, been trying it wont work
hey guys i have a centOS on my vps and i cant figure out how to set the paths...well more specifically it wont work when i do...im trying to run a runescape private server and i got no-ip set up on the vps, i got my server over, but i just need help executing the server.sh cause i get the error java is not recognized...ive set up jdk and jre and put paths to both of them...the paths i put are
root/Desktop/jre1.6.0_24/bin root/Desktop/jdk1.6.0_24/bin and it still doesnt work, and heres the even weirder thing, it worked once..but only once...after that it continues to not work (i didnt log off the vps or anything, i just tried it a second time a few minutes later and i got the error again...any please anyone help =D |
Couple things...
1. Why did you install JDK and JRE to the root desktop? It seems like maybe you only downloaded the source and untar'd it. If you installed java via the package manager, java should be installed in /usr/bin/java. If so, then you would be good to go as /usr/bin is likely in your $PATH. - Question 1. How did you install Java? 2. While there is really nothing "wrong" with having a folder on your desktop in root's path, it's not normal at all and would be extremely confusing to most linux users. If you are getting something like Code:
bash: java: command not found - Question 2. What is the output of the following command: Code:
echo $PATH |
yes thats the error im getting and what i did was i went to sun.com (or whatever the java site is..dont remember for sure) and downloaded both jre and jdk then i untared it and yea... i didnt know there was a another way or a better way, im new to linux and so im used to things on my desktop but either way i can just delete the current jdk/jre and then if you would mind telling me the proper way to install? also the output for echo $PATH is
/usr/local/sbin:/usr/local/bin:/sbin/:/bin:/usr/sbin:/usr/bin:/root/bin thats weird cause i could have sworn i set my paths o.o...whats the command to set paths? thanks for reply |
Ok. If that is your error than you just downloaded the source (or maybe binaries) from Sun but they are not installed. Instead, I would recommend going down an easier route.
1. Install OpenJDK (as root) Code:
yum install java |
woot it worked! thanks!!!!!
but now i have a couple problems/questions ok so when i run it it runs but i get an error just saying error starting Infestus-x (server name) and im guessing the reason is because i didnt make the .sh correctly from the .bat so is it possible that i could post what i have in my .bat and you can figure out what the equivilent should be for the .sh? if so thanks, heres whats in the .bat Code:
@echo off |
Again, I am not familiar with your specific game.
That is an absolutely ridiculous batch script. It runs one command. Is your server in jar format? If so, do something like: Code:
java -Xms512m -Xmx512m -Xss64k -XX:NewSize=128m -XX:MaxNewSize=128m -jar server_file.jar nogui Code:
screen Code:
screen -r |
ok but now i have a question..how do you check processes that are currently running, and how do you end them if you wanted?
also i got this error Code:
Exception in thread "main" java.awt.HeadlessException: |
All times are GMT -5. The time now is 06:50 AM. |