Question:
Terminal error on a mac: "-bash: java: command not found"?
Anonymous
2011-08-01 21:46:43 UTC
I'm trying to add ram to my minecraft server and when i typed in
"java -Xmx1024M -Xms1024M -jar minecraft_server.jar" to terminal I got the error above. I tried giving the command minus java and then i got the error "-bash: -Xmx: command not found"
Three answers:
anonymous
2011-08-01 22:04:07 UTC
Hi,



That error message is basically saying it cannot find java.



I'll assume you installed JRE at a minimum, but the question is where to.



To verify that do the following:



1. Log in to root.



2. Type this in and press enter:



    find / -name java -print



Once you know the location you need to set the PATH.



For example if this was location:



  /home/John/j2re1.4.2_05/bin/java



If you were using bin/bash you'd need to add this to your ~/.bashrc



PATH=$PATH:/home/John/j2re1.4.2_05/bin



export PATH



And if you are using /bin/csh (or /bin/tcsh), then add this to your ~/.cshrc



setenv PATH "${PATH}:/home/John/j2re1.4.2_05/bin



Log out and log back in again.



Note!!! If you are not sure what shell you are in then use the "finger" command. For example:



  finger John



Regards,



Javalad
Toad
2011-08-01 22:27:42 UTC
"Java" is saying that, assuming you have Java installed, your Mac does not know where it is. The Environment PATH is a list of folder locations it will look in before it tells you that it is not found.
anonymous
2016-10-16 17:17:52 UTC
ok so curiously such as you typed : cd: /domicile/somebody/own computing gadget the suitable way i think is: cd domicile/somebody/own computing gadget it particularly is assuming that house is a subdirectory of the itemizing you're already in. in case you prefer to pass up one itemizing, you form: cd .. So shall we are saying you're interior the itemizing "and so on" it particularly is interior the basis folder, and "domicile" is interior the basis folder too. To get to the own computing gadget you may form: cd ../domicile/somebody/own computing gadget The ".." takes you back one folder to the basis folder, and then something takes you to the own computing gadget. wish this helps And NN - Linux maximum surely does not stink! this is sooo lots extra desirable than domicile windows on such lots of ranges. this is unfastened, open source, and lots extra maintain. Even Mac is barely partly open source, and is not any longer unfastened and not as maintain Edit : and yeah this is case delicate, so capitalization does remember


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...