[SOLVED] java is not recognised as an internal or external command error

Aug 16, 2019
11
0
20
1
So I tried running a Minecraft server (1.7.10 Modpack server), I hosted it a few months ago no issues, friend did too but his internet is slower so we moved to mine. I formatted my PC, all good until I tried hosting. Gives me the error: "Java is not recognized as an internal or external command, operable program or batch file." My port forwarding is all good, considering I've had no broadband changes and server worked prior np, Java had troubles installing, when I did it installed 32bit, so I proceeded to use the Windows 64bit offline installer and I could run Minecraft, other games, and no problems (each time I made sure only one java version existed using the program uninstaller only). But server doesn't work, gives above error. When I use the command prompt to find my java version using, "java -version" it gives the same error. I looked up videos solving this problem but they do nothing whatsoever.

I have a windows 10 64bit operating system, If you'd like any other information system based tell me.
Please help ma bois.
 
Aug 16, 2019
11
0
20
1
Managed to successfully fix it!
So like most other videos on youtube it was the right place just not the right cmd or whatnot.
Here is the link to what solved my issue, as i thought it was an incorrect (rather non-existent) environmental variable, I suppose this is what lead to me struggling with installing java when i formatted my PC 2 weeks prior.

https://stackoverflow.com/questions/15796855/java-is-not-recognized-as-an-internal-or-external-command

Specifically for my case it was adding both of these,
View: https://imgur.com/a/HAWO1Qk

Although I do believe it was just the top one that made it work.
For whatever reason, these just didn't come when I installed windows 10 Pro.
 

QwerkyPengwen

Dignified
Herald
go here and download and install 32 bit offline.
After it's done, install 64 bit offline as well.

then both versions should be installed and usable by any program that wants to use either 32 or 64 bit depending on how it was programmed.

This is what I've always done personally to ensure full compatibility with Minecraft and any other programs that rely on Java, such as running the server client.

https://www.java.com/en/download/manual.jsp
 
Aug 16, 2019
11
0
20
1
I don't know much about servers, so sorry in advance. The executable is a "windows batch file", not a jar file type? Also when you say correct command line do you mean if I write correct command to launch the server? If so then I don't need to run any cmmnds I just need to open the file and it just starts booting the server.
 

QwerkyPengwen

Dignified
Herald
Ok..... So all you have is a .bat file?
No .jar file?

If you are trying to run a server from a folder that was already created and zipped up and sent to you by your friend, make sure you unzip it.

Can you please describe to me if you have a folder with anything for a server in it already or not?

Or if all you literally have is just a .bat file and noting else.
 
Aug 16, 2019
11
0
20
1
There are other files in there. Only one I could launch is the bat as the others are just notepad/folders/SH(notepad)/and 3 zipped files which i think are meant to remain zipped. and no jar. The folder is as was last time when it worked.

Just want to mention that I cant even check java version using a command, which I assume is a problem outside of the server?

Oh and it wasnt sent by friend, i downloaded it, twice to make sure it didnt have a stroke whilst being downloaded. Would you like me to link this to you?
 

QwerkyPengwen

Dignified
Herald
that's great and all, but I'm pretty sure I asked you to tell me the name before posting a link in the off chance that whatever site you link isn't safe and is not allowed to be posted here in the forums for security reasons.
Because if the link you just posted is to a site that is unsafe, then you can end up causing harm to other people's systems if they decide to randomly click on the link.

This is why I specifically said to tell me what the name was and I would then decide if it is safe to post a link.

Should never post links without first getting confirmation that the link is safe here in the forums.

Here's my quote verbatim.

Where exactly did you download this package from? Tell me the name of the site first so I can decide if it's safe to link
But lucky for you I can't see anything bad about that site so you're OK this time, but keep that in mind for the future.

Now back to your issue.

After you do the first run of the server using bat file, your folder should look like this after the long startup process that runs in the command prompt and after pressing any key to continue.



you need to go into the EULA.txt file and change the value from "false" to "true" and save the changes.

Then run it again.

If you don't see all the files that I have in my folder in yours then you may not have a complete download and I would suggest you try downloading it again.
 
Aug 16, 2019
11
0
20
1
Managed to successfully fix it!
So like most other videos on youtube it was the right place just not the right cmd or whatnot.
Here is the link to what solved my issue, as i thought it was an incorrect (rather non-existent) environmental variable, I suppose this is what lead to me struggling with installing java when i formatted my PC 2 weeks prior.

https://stackoverflow.com/questions/15796855/java-is-not-recognized-as-an-internal-or-external-command

Specifically for my case it was adding both of these,
View: https://imgur.com/a/HAWO1Qk

Although I do believe it was just the top one that made it work.
For whatever reason, these just didn't come when I installed windows 10 Pro.
 

QwerkyPengwen

Dignified
Herald
That's interesting.
Also, i guess the another reason things looked weird for you is because you have installed WinRAR. I suggest using 7-Zip instead. Much better.
Those .jar files were being recognized as WinRAR files because WinRAR associates those files with itself. Your folder looked fine, you didn't have all the files I had because a few of those files are created after the first run and then more are created once you accept the EULA and run it again.
 

ASK THE COMMUNITY

TRENDING THREADS