Jump to content

Starting Forge Server


boston333410

Recommended Posts

I am trying to run a forge server by allocating more ram, but I can't get the server to start. I get this error: "Error: Unable to access jarfile forge-1.12.2-14.23.5.2838-universal.jar" [See Attachment]. I have tried the following:

- Running with multiple combos of RAM.

- Running it with Java Version: JavaSetup8u22

-Running it with Java Version: jdk-7u80-windows-x64

-Changing out " forge-1.12.2-14.23.5.2838-universal.jar" for "minecraft_server.1.12.2.jar" just to try and it still get the same error

 

There is no error log generated for the server in the log files. Not sure if it'd be somewhere else

 

What I'm running:

OS: Windows 10 Pro 64bit

Ram: 16gb

 

Start.bat text:

"C:\Program Files (x86)\Java\jre1.8.0_221\bin\javaw.exe" -Xms3G -Xmx2G -jar forge-1.12.2-14.23.5.2838-universal.jar

 

*Only way I can get get the server to start is to start  with Path name, using either Java 8 or Java 7

 

 

 

Capture.PNG

Link to comment
Share on other sites

As long as your Start.bat is in the same folder as the Forge jar you won't need to

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

CMD doesn't search your entire computer when you type things.

 

It checks the folder it's running in, AKA the working directory (which can be changed using the cd or Change Directory command), and the PATH system variable (This is an advanced feature you shouldn't manually mess with unless you know what you're doing).

 

When you run a bat file it's really just a file that starts CMD, automatically changes the working directory to wherever the bat file is located, then runs the commands in the bat file one after the other.

 

Because you opened CMD and attempted to run Forge without telling CMD to change it's working directory it's looking for Forge in system32, which is not where it is and where it should never be.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

You don't add a cd command to the batch file.

 

Main thing is in the context of the bat file it should already be in the right place, but starting cmd manually it won't start in the right place.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

So my start.bat code is right, but it's looking in the wrong place for the forge server launcher? I don't get what I'm doing wrong, if anything.... Guess I'm just going to cut back on the mods that I want to run on the server if I can't get it to work with more RAM. Thanks for the help.

Link to comment
Share on other sites

Are you starting your server with the bat or are you typing in CMD manually?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

I'm trying to start the server with a .bat file. I want to run my forge server with mods when I tried it yesterday with all the mods I wanted it stopped working because it ran out of memory, or at least I think that's what happened. So now I'm trying to get a simple server running with more memory allocated for it before I try adding the mods again. So I'm trying a proof of concept, which isn't working. I don't know of another way to run a forge MC server with more RAM. This is the only way I've seen. Not sure what other details I can add to help solve my issue.

Link to comment
Share on other sites

This is where my start.bat file is. The server is stored on my 2nd HDD on my computer.... So I don't know why it's there. I thought it needed to be in the same folder as the server. This is the file path: F:\Program Files (x86)\MC Forge Server

Capture.PNG

Edited by boston333410
Link to comment
Share on other sites

Sorry. The reason I'm using javaw.exe is because that's what I thought I had to do. I don't know the difference between the .exe's in the folder. This is the video I found to help me: youtube.com/watch?v=3W8Di4I2usE. In the video description, I found the code that I used and it was using javaw.exe. Why I'm using is because the internet told me too. I have no clue.

 

I changed my start.bat file to " "C:\Program Files (x86)\Java\jre1.8.0_221\bin\java.exe" -Xms3G -Xmx2G -jar forge-1.12.2-14.23.5.2838-universal.jar " and now it just crashes. It doesn't stay open.

 

Edited by boston333410
Link to comment
Share on other sites

There are a couple of things you're doing wrong.

But first some information:

Spoiler

 

Your batch is structurally correct, though, the default way is [ java -jar (jarfile.jar) ].

The PATH variable contains information about the locations of certain executables. For example, it contains the location of java.exe. This is why you only need to type java (and can execute java from any directory). If you type java, it will search the locations defined in PATH for whatever is called java.exe to run it. In this case, it will search for "C:/Program Files (x86)/Common Files/Oracle/Java/javapath/java.exe" or use the one in ProgramData at the same location.
Java's path variable entry is added to path upon installation.
Your method is not wrong, it's just odd. (and yes, if you want to be correct, you should use java, not javaw.
(Also, yes, you can use the one in the "bin" directory as well.)

 

 

What you're doing wrong:

1. You need to use the 64 bit edition Java. Otherwise you're going to be limited to 2GB RAM allocation.

2. You have multiple Java installations and one of them is very outdated. The other is 32 bit. I'll advise to uninstall all your java installations. (remove the folders if possible. You can use the Java Uninstaller Tool for this ), and then.

3. Install the latest Java 8 64 bit edition on your pc.
4. Xms is the minimum allocation. If you want to assign max 3GB memory, you need to set that to Xmx. Xms should not be bigger than Xmx.
5. In order for the batch to work, you need to specify where the command promp terminal opens the batch. Currently it looks in System32 for the jar you're trying to run, because that is from where you opened the batch, according to the command prompt terminal screen.
The batch will only open in the folder where you placed it if you simply execute it. If you use the Right Click menu and do Run As Admin, it will go to System32 by default.

Spoiler

The best way if you really want to run it as admin is to set the property of the batch to be run as admin by default, but this shouldn't be nessecary.

Another way to fix the issue is by -jar "c:/quoting/the/location/of/the/jarfile.jar"

6. You can prevent CMD from immediately closing after attempting to run all defined tasks with a command. I'll give a few options in this list.

Spoiler

pause (this will make it wait till a key is pressed to continue)

timeout /t (seconds)

sleep (seconds)

there are more options you could choose from

 

What your batch should look like, if things would go well (with your options I mean, and at its bare minimum):

Spoiler

java -Xmx3G -Xms2G -jar forge-1.12.2-14.23.5.2838-universal.jar 

(You will need 64 bit java first though)
Also pause (or the other things I mentioned at 6) should be put below this in the same file (on a new line).

Edited by Ruchia
typo
Link to comment
Share on other sites

@diesieben07

I launch the start.bat file by just clicking on it in the folder and it just crashes. Which from my research is all I thought I had to do. I was running it as  "Run As Admin" thinking that'd work, but it clearly does not.

 

NOTE: I've installed the proper 64bit version of Java now: jre-8u221-windows-x64.exe. So the path name will be a bit different.

 

Not sure what you mean by running it from the command line, so below are a few things I've tried based on my knowledge and guessing.

1.) Copying and pasting the whole line of code into the cmd.... Result: "Error: Could not find or load main java class.... (I haven't seen this error before so it's new for me) See Capture

 

2.) Changing directory.... Same error, capture 2

 

3.) Removing "C:\Program Files\Java\jre1.8.0_221\bin\java.exe" from the beginning... Result: Now it worked! Capture 3. ALSO, I got the same result by just clicking on the start.bat from the folder.

 

The only reason I added the path "C:\Program Files\Java\jre1.8.0_221\bin\java.exe" is because I thought that's what I had to do. I saw it in the description of this video: youtube.com/watch?v=3W8Di4I2usE&t=2s.

 

 

 

 

 

 

Capture.PNG

Capture 2.PNG

Capture 3.PNG

 

Edited by boston333410
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.