Start bat для сервера minecraft не работает

Minecraft Forums

This thread was marked as Locked by webrosc .

.bat file doesn’t work?

    li» data-page-inline=»False» data-scroll-inline=»False»>

  • Tree Puncher
  • Join Date: 11/3/2013
  • Posts: 11
  • Member Details

I’m trying to create my own multiplayer server to play with my friends, and it seems like all the steps work except for one. You should know I’m running on Windows 8.

So i completed all of the steps flawlessly until i got to the part where you need to make a .bat, or batch file. i created a text document in notepad and entered java -Xms512M -Xmx1G -jar minecraft_server.jar just like the tutorial page says to. Then i save it as run.bat and select the Save as type: A ll files option. It then appears in the server folder, and when i tell it to open it should run the server right? well when i tell it to open it simply shows the cmd prompt box for a fraction of a second, closes it, then nothing else happens. If i just tell the server to start by opening the minecraft_server.1.7. it starts fine, and i can join the server using my IP address in any way i like, but it tells my friends they cannot connect. I have gone through the Path: environmental variables process and believe that is correct, so what am i doing wrong? I believe the problem is with the batch file, since it should start the server, but instead does absolutely nothing.

  • Kitty Admin
  • Join Date: 11/26/2010
  • Posts: 21,330
  • Minecraft: webrosc
  • Member Details

you need to rename the minecraft_server.1.7.2.jar to minecraft_server.jar, or change the file in the bat so they match

also if you add a new line with the word
it will keep the window open untill you press a key so you can read the error

  • Tree Puncher
  • Join Date: 11/3/2013
  • Posts: 11
  • Member Details

  • Redstone Miner
  • Location: Here->
  • Join Date: 5/22/2013
  • Posts: 507
  • Minecraft: QuantumCayo
  • Member Details

Save as «start_server.command»

1GB = 1024
2GB = 2048
3GB = 3072
4GB = 4096
12GB=12288

The maximum amount of RAM you will be able to allocate for your 32bit Java is 1024M (1GB)

  • Tree Puncher
  • Join Date: 11/3/2013
  • Posts: 11
  • Member Details

you need to rename the minecraft_server.1.7.2.jar to minecraft_server.jar, or change the file in the bat so they match

also if you add a new line with the word
it will keep the window open untill you press a key so you can read the error

  • Tree Puncher
  • Join Date: 11/3/2013
  • Posts: 11
  • Member Details

Save as «start_server.command»

1GB = 1024
2GB = 2048
3GB = 3072
4GB = 4096
12GB=12288

The maximum amount of RAM you will be able to allocate for your 32bit Java is 1024M (1GB)

I tried using
java — Xms2048 — Xmx2048M — exe Minecraft_Server . exe — o true
PAUSE
but i got the same error message suggesting my Java is out of date.

  • Kitty Admin
  • Join Date: 11/26/2010
  • Posts: 21,330
  • Minecraft: webrosc
  • Member Details

  • Redstone Miner
  • Location: Here->
  • Join Date: 5/22/2013
  • Posts: 507
  • Minecraft: QuantumCayo
  • Member Details

Then update Java.

If that doesn’t work. Look here

  • Tree Puncher
  • Join Date: 11/3/2013
  • Posts: 11
  • Member Details

Im fairly sure it’s 32 bit, but don’t know how to check. Can you tell me what to do incase of either 32 or 64? I’m willing to try as many ways as possible.

  • Void Walker
  • Location: Don’t matter where u from; it’s
  • Join Date: 9/16/2011
  • Posts: 1,670
  • Member Details

that error message » ‘java’ is not recognized as an internal or external command, operable program or batch file.»
means you have not set your path value correctly

Читайте также:  Управление курсором с клавиатуры не работает

and in your batchfile code quoted above, you are missing the unit of measure(M) off the end of your -Xms switch

to determine 64/32 you can type on the command line:
If it’s not a 64-bit version, you’ll get a message that looks like:

«This Java instance does not support a 64-bit JVM. Please install the desired version.»

  • Tree Puncher
  • Join Date: 11/3/2013
  • Posts: 11
  • Member Details

that error message » ‘java’ is not recognized as an internal or external command, operable program or batch file.»
means you have not set your path value correctly

and in your batchfile code quoted above, you are missing the unit of measure(M) off the end of your -Xms switch

to determine 64/32 you can type on the command line:
If it’s not a 64-bit version, you’ll get a message that looks like:

«This Java instance does not support a 64-bit JVM. Please install the desired version.»

Thanks to some poor instructions on the internet (figures), i erased the path value already existing before inserting ;»c:\Program Files\Java\jre7\bin» onto the end. I tried looking up the default path value online for Windows 8, but it seems like everyone says something different, and the one i put in clearly didnt work. Do you know what i can do?

  • 404: Member Not Found
  • Join Date: 1/31/2013
  • Posts: 1,055
  • Minecraft: stunseed
  • Member Details

to set a PATH for windows 8 its the same as setting a path for windows 7. here are the steps to be able to get your java to work.
1. open control panel
2. click system and security
3. system
4 look on the left hand side and youll see an option for advanced system settings and youll see a window open looking like this

5. if the above procedure doesnt work or cant find it then try this. press your windows key + R that will open up a run box
6. type control sysdm.cpl
press enter
7. click on enviroment variables and another window will open looking like this

7. in that window scorll down a bit till you see a variable called PATH .. all caps if one doesnt exist youll have to make one
8. verify java instalation by locating your java install folder if found you should end up with something like this

9. click ok three time i think it is so it saves. then to check open a command promtp and type

you will see that java is now working.

the earth first! we can strip mine the rest of the universe after. click the up arrow if i helped.

  • Void Walker
  • Location: Don’t matter where u from; it’s
  • Join Date: 9/16/2011
  • Posts: 1,670
  • Member Details

reinstall windows and all your apps, or track down their relevant path variables and add them one by one?

srry, perhaps im misunderstanding the current issue

  • 404: Member Not Found
  • Join Date: 1/31/2013
  • Posts: 1,055
  • Minecraft: stunseed
  • Member Details

the earth first! we can strip mine the rest of the universe after. click the up arrow if i helped.

  • Void Walker
  • Location: Don’t matter where u from; it’s
  • Join Date: 9/16/2011
  • Posts: 1,670
  • Member Details

in my ‘path variable, it contains the paths for many many different applications. theres nvidia entries, windows entries, java etc etc.

the issue that the muffinman seemed to have was that all of these paths were overwritten when he replaced them just with the java path.

im just wondering how your solution replaces all of the missing entries.

  • 404: Member Not Found
  • Join Date: 1/31/2013
  • Posts: 1,055
  • Minecraft: stunseed
  • Member Details

in my ‘path variable, it contains the paths for many many different applications. theres nvidia entries, windows entries, java etc etc.

the issue that the muffinman seemed to have was that all of these paths were overwritten when he replaced them just with the java path.

im just wondering how your solution replaces all of the missing entries.

Читайте также:  Почему может не работать тонометр от сети

the earth first! we can strip mine the rest of the universe after. click the up arrow if i helped.

  • Tree Puncher
  • Join Date: 11/3/2013
  • Posts: 11
  • Member Details

to set a PATH for windows 8 its the same as setting a path for windows 7. here are the steps to be able to get your java to work.
1. open control panel
2. click system and security
3. system
4 look on the left hand side and youll see an option for advanced system settings and youll see a window open looking like this

5. if the above procedure doesnt work or cant find it then try this. press your windows key + R that will open up a run box
6. type control sysdm.cpl
press enter
7. click on enviroment variables and another window will open looking like this

7. in that window scorll down a bit till you see a variable called PATH .. all caps if one doesnt exist youll have to make one
8. verify java instalation by locating your java install folder if found you should end up with something like this

9. click ok three time i think it is so it saves. then to check open a command promtp and type

you will see that java is now working.

I tried both of those path variables and checked them with the command prompt, neither worked. Both gave me the ‘java’ is not recognized as an internal or external command, operable program or batch file. message.
Also, Survivzor, i would prefer not to have to do a full system restore or re-install windows, i would like to use a different method.

Источник

Как создать сервер майнкрафт с модами и Forge

В этой инструкции я расскажу как создать и запустить простой сервер майнкрафт вместе с модами для игры со своими друзьями используя хамачи или общую сеть и даже интернет.

В данной статье я буду использовать официальный сервер майнкрафт на который будет произведена установка Forge, установлены моды и вы сможете играть с друзьями в сборки.

Создадим сервер:

Скачайте установщик Minecraft forge необходимой версии, exe или jar, не важно.

Запустите скачанный файл, в данном окне выберите Install server, а ниже укажите произвольную папку в которой будет ваш сервер, нажмите Ok.
Установочник сам все скачает, необходим интернет.

Перейдите в папку которую указали, там вы увидите примерно это:

Установка нужной версии Java для сервера

Сервер Forge требует для работы JDK (Java Development Kit), джава для разработчиков, все версии фордж_сервера до minecraft 1.17 требуют наличия JDK 8, версия minecraft 1.17+ требует установки JDK 16.

Если хотите сервер, а не игру по сети, вам придется выполнить этот квест.

Где скачать:

    Все версии майнкрафт до 1.17 требуется JDK 8 — скачать можно здесь
  • Для майнкрафт 1.17 и новее требуется — JDK 16 — скачать можно здесь
  • Скачайте (не забудьте узнать 32bit или 64bit ваша Windows) и установите, запомните адреса расположения исполнительного файла Java, они нам понадобятся:
    В случае JDK 8 установленной по ссылке выше это C:\Program Files\OpenJDK\jdk-8.0.262.10-hotspot\bin\java.exe
    В случае JDK 16 установленной по ссылке выше это C:\Program Files\Java\jdk-16.0.2\bin\java.exe

    Создание файла start.bat для запуска сервера:

    Выполнять данный пункт только для версий 1.5.2-1.16.5.

    Создайте в папке сервера текстовый документ, поместите внутрь такую строчку:

    Здесь вы должны иметь правильное название файла сервера, в данном случае forge-1.12.2-14.23.5.2855.jar, если вы переименовали, либо у вас другая версия майнкрафт или форджа, измените название на ваше.

    Прочие параметры:

    • «C:\Program Files\OpenJDK\jdk-8.0.262.10-hotspot\bin\java.exe» — адрес до нужной версии Java которую вы установили на предыдущем шаге, в данном случае JDK 8
    • Xmx1024M — значение указывающее максимальное количество мегабайт оперативной памяти доступное серверу.
    • Xms1024M — значение указывает значение оперативной памяти которое сервер займет сразу на старте сервера, даже если ему не нужно.
    • nogui — Важным моментом является параметр nogui, он отключает окно сервера которое показывает игроков и график нагрузки на сервер, да, это окно может быть удобным, но лично у меня оно очень сильно нагружает процессор при работе сервера, НАСТОЯТЕЛЬНО рекомендую отключать GUI сервера.
    Читайте также:  Как настроит acv сабвуфер

    Сохраните файл, переименуйте его например в start и замените расширение .txt на .bat

    Если у вас нет возможности изменить .txt при переименовании, то включите эту опцию в системе: инструкция

    Правка run.bat (только для minecraft 1.17 и более новых)

    Если у тебя версия до 1.17, то ты выполнял пункт выше, этот можешь пропустить, если версия новее, то наверное все точно так же.

    На версии 1.17+ автор чуть изменил процесс, немного его упростил, потому после окончания работы установщика форджа вы увидите примерно такое содержимое папки сервера которую вы указали:

    Здесь уже есть run.bat для запуска из под Windows и run.sh для запуска из под Linux, но не торопитесь запускать.

    Открываем файл user_jvm_args.txt, удаляем # у последней строчки, значение -Xmx4G задает максимальное количество оперативной памяти серверу, тут оно 4 гигабайта, можете указать в гигабайта (G) или мегабайта (M), сохраняем, закрываем.

    Открываем текстовым редактором файл run.bat заменяем Java на «C:\Program Files\Java\jdk-16.0.1\bin\java.exe» (с кавычками) это ваш адрес до установленной Java JDK 16, сохраняем и запускаем файл run.bat

    Первая попытка запуска сервера:

    Откройте файл eula.txt, внутри измените eula=false на eula=true

    Если вдруг файлы не появились и eula.txt нету, всего скорее вы установили не ту Java, либо не верно указали адрес, либо допустили другие ошибки, что бы лучше понять что за ошибка, добавьте в start.bat pause на новой строчке, с этим консоль не закроется и там будет какая-то ошибка или информация которую можно погуглить

    Вторая попытка запуска сервера:

    Снова открывайте файл start.bat (run.bat) и у вас должно открыться окно сервера с графиком и списком игроков (если в start.bat нет параметра nogui) или черная консоль сервера, сервер загрузится и создаст карту, но не торопитесь запускать игру и подключаться, сервер не настроен и моды не установлены.


    Настройка сервера:

    Перейдем к базовой настройке, закройте окно сервера если оно открыто.

    1) Откройте файл server.properties текстовым редактором в нем есть основные настройки сервера.

    2) Если у вас пиратка, то что бы вас пускало на сервер найдите параметр online-mode=true и измените его на online-mode=false

    3) Укажите IP своего сервера в параметре server-ip=
    Вы можете указать IP своего пк в интернете (не забывайте открыть порты), IP в хамачи, локальный адрес пк если ваши игроки находятся в одной сети ( подключены к одному вайфай или проводом)
    Инструкция как настроить хамачи.
    Инструкция как играть по сети

    4) Значение — max-players=20 указывает максимальное количество игроков, все прочие настройки вы легко найдете поискав в гугле.

    5) В файле еще очень много настроек, многие понятны без перевода, другие понятны если перевести переводчиком, а так же вы можете использовать эту вики.

    Как установить моды:

    Моды устанавливаются подобно обычному майнкрафту, вы помещаете мод и зависимости (ядра, библиотеки) в папку mods вашего выключенного сервера, хотя есть несколько правил.

    Правила сервера с модами:

    • У сервера и у всех игроков должна быть одинаковая версия minecraft forge.
    • У сервера и у всех игроков должны быть одинаковые моды, притом вплоть до версии самого мода. (исключение только клиентские моды, миникарты, JEI итд)
    • Некоторые моды не поддерживает работу в онлайне вообще, просто крашат сервер ошибками, автор не реализовал это или допустил ошибок.
    • Если вы изменяете настройки мода в конфиг файле, то эти изменения должны быть у всех игроков и на сервере тоже. Т.е у конфиги сервера и конфиги игроков должны быть одинаковые.
    • Нет необходимости устанавливать клиентские моды на сервер, моды JEI, damage indicators, миникарты итд, то, что работает у конкретного игрока и не взаимодействует с другими игроками.

    Если все хорошо, вы можете подключиться к серверу и увидеть на нем моды.

    Если ваш сервер не запускается, то читайте файл лога в папке logs, там может быть написан проблемный мод и причину сбоя.

    Работа с сервером:

    На вики вы найдете основные команды для консоли, установить точку спавна, установить время, погоду, телепортация, получить ОП, изменить режим игры игрока, убить, кикнуть, забанить итд.

    Источник

    Оцените статью