Jump to content

How to jar client


Recommended Posts

Well, honestly it's not hard at all and it's pretty fast to do it, all you need is Eclipse (I'm not sure if any other integrated development environments have this option).

Requirements:

  • Eclipse IDE
  • The client that you would like to jar



Index/Table of contents:

  1. Downloading Eclipse IDE
  2. Creating the executable jar file



This is a really good method to use for creating an executable jar file, it's a lot faster than using a jar maker or creator. I've been using this since I've found out that Eclipse had a jar creator and it hasn't given me any problems since. Anyways lets begin.

1. Downloading Eclipse
Downloading Eclipse can not only help you create a jar file but it can also be helpful when programming, helping with errors, organization and more. Although for this tutorial we'll solely be focusing on just creating an executable jar file. We can start off by heading to the Eclipse websites download section. You can quickly access this website by simply click here. Once there scroll a tad bit down until you locate this:
687474703a2f2f692e696d6775722e636f6d2f63

If you would like to read more about what Eclipse IDE is click the main title context of the tab (Eclipse IDE for Java EE Developers). Anyways let's get back on track, start by clicking either bit that applies to your computer specifications. Once you click that click the link that is next to the down-wards arrow icon, it should look like this.
 

Click here to view the original image of 922x610px.


687474703a2f2f692e696d6775722e636f6d2f53

In the image I would click [United States] ibiblio (http). Although for you it might be different. Once you click that, the download will start automatically. Run through the setup and load Eclipse up.

2. Creating the executable jar file
Once you have Eclipse installed and running, and you also have your client inside of Eclipse then you are ready for this step. Start off by right clicking your clients folder and a dialogue box should pop up similar to this:
 

Click here to view the original image of 922x666px.


687474703a2f2f692e696d6775722e636f6d2f74

Hit the text "Export..." and you will then notice that another dialogue box will pop up similar to this one:
687474703a2f2f692e696d6775722e636f6d2f57

Now that you have this opened extend the "Java" folder/tab and then hit "JAR file" once you hit that another dialogue box should pop up similar to this:
687474703a2f2f692e696d6775722e636f6d2f64



For your "JAR file" box hit the "Browse..." button and set your export path and JAR file name to what you want. In this demonstration I set it to my dekstop and the name of the JAR file will be "Client". You can confirm your settings by making sure it looks similar to this:
687474703a2f2f692e696d6775722e636f6d2f61

Hit "Next >" and then "Next >" again and you should end up with a window like this:
687474703a2f2f692e696d6775722e636f6d2f4a

From here you should/can set various options for this demonstration you will need to set the Main class by hitting the "Browse..." button and locating your clients main launcher. For mine it is named Loader. So mine looks like this:
687474703a2f2f692e696d6775722e636f6d2f4f

Yours can be different depending on your main class's name. Once that's done hit "Finish" and wait for the jarring process to complete. You can now close it and open your JAR file. It should work, if it doesn't visit the FAQ section at the bottom of this tutorial. Well that's it for now have a great day mates.

FAQ:
It doesn't load/It gets stuck at 0%?

  • Make sure that you have set the clients IP to the specific IP address that you want your players and or you to connect from/to. Also check the port ID.



When I click it, it doesn't load anything?

  • Make sure that you have set the correct "Main class" for it to be loaded from.

credits chaz from rune-server

When making updates to my client do I always have to create a new JAR file for others to see the updates?

  • It honestly depends. Although in most cases yes, you do.
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...