Jump to content

Question

Firstly, I have the cache in the right place. It unzips fine.
I have the ip's in the right place. Then let me connect from my computer to my vps which runs my server.

My problem is. When I run it through the client folder, it connects fine.
But when I jar i (correctly) and run it through that. It fails me and says connection error - retying in 5...4... etc

[IMG]http://i.gyazo.com/076b672a92d6b17d50717406c496d009.gif[/IMG]

[IMG]http://i.gyazo.com/85d05b801854b32dc334d5179788db76.gif[/IMG]

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0
Your jar can't find the cache.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Time']Your jar can't find the cache.[/QUOTE]

Then how do I make it find the cache?

Share this post


Link to post
Share on other sites
  • 0
Autocachedownloader for one

Share this post


Link to post
Share on other sites
  • 0
[quote name='Time']Autocachedownloader for one[/QUOTE]

Like I said at the top, the autocache downloader is set up perfectly. It's all working fine, except when it's jarred, it no longer runs.

Share this post


Link to post
Share on other sites
  • 0
I'm just telling you what it looks like man. The client attempts to get the cache, and times out when it can't locate it.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Time']I'm just telling you what it looks like man. The client attempts to get the cache, and times out when it can't locate it.[/QUOTE]

I don't mean to sound rude, but I told you that information at the top. I came here for a solution, not for someone to tell me something I already know.

Share this post


Link to post
Share on other sites
  • 0
Put the jar in the same location the run.bat is in and run it again. If that works, fine, [MENTION=3149]Time[/MENTION] was right. If not, run your jar with a windows prompt so you see the output of the jar.

In order to run it in a windows prompt, create a new file in the same location as the jar called "debug.bat". The content of that file should be:
[code]@echo off
java -jar thenameofyourjar.jar
pause
[/code]

Notes:
This will only work if you have your environment set up right. Normally this is done by the installer but some people succeed in breaking it. Replace "thenameofyourjar" with the name of your jar and then run the .bat file.

When having errors one must explore every direction. Also the ones you think it's not. Especially if you need help.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Arix']Put the jar in the same location the run.bat is in and run it again. If that works, fine, [MENTION=3149]Time[/MENTION] was right. If not, run your jar with a windows prompt so you see the output of the jar.

In order to run it in a windows prompt, create a new file in the same location as the jar called "debug.bat". The content of that file should be:
[code]@echo off
java -jar thenameofyourjar.jar
pause
[/code]

Notes:
This will only work if you have your environment set up right. Normally this is done by the installer but some people succeed in breaking it. Replace "thenameofyourjar" with the name of your jar and then run the .bat file.

When having errors one must explore every direction. Also the ones you think it's not. Especially if you need help.[/QUOTE]

It says couldnt find properties.ini
Here is the code for it
[CODE]public static boolean loadProperties() {

try (FileInputStream in = new FileInputStream("./data/properties.ini")) {
props.load(in);

name = props.getProperty("name");
host = props.getProperty("host");
website = props.getProperty("website");
download = props.getProperty("download");
try {
port = Integer.parseInt(props.getProperty("port"));
} catch (NumberFormatException e) {
System.out.println("Properties: Integer expected as port.");
}

} catch (FileNotFoundException e) {
System.out.println("Couldn't find the file properties.ini");
return false;
} catch (IOException e) {
System.out.println("Failed to read properties.ini");
return false;
}
System.out.println("Properties have been loaded.");
return true;
}[/CODE]

Share this post


Link to post
Share on other sites
  • 0
In the same folder as your .jar you need a folder "data" with properties.ini in it.

Share this post


Link to post
Share on other sites

×