Think it's based of a upload date, which iirc DropBox doesn't hold on a file request
Check something like this
https://www.rune-server.ee/runescape...g-dropbox.html
|
Recently implemented Foxtrot's Auto Client Updater, found here: https://www.rune-server.ee/runescape...thought-_.html
However I don't know if it's because I'm using DropBox or doing something wrong. But when I upload a new .jar to my DropBox, it never pushes or prompts for an update even if the size is different. Maybe it needs to be uploaded to a host?
Think it's based of a upload date, which iirc DropBox doesn't hold on a file request
Check something like this
https://www.rune-server.ee/runescape...g-dropbox.html
It has to be the same url if that makes sense and it goes by the date. Anytime you upload the jar file to dropbox it's going to assign it a different URL. You really should put the jar on your web host and use the link from there, once you make a client or cache update, reupload the new jar to the same location on the website and it will work.
Thanks, everything seems to be working however I did notice one thing.
It runs on my VPS fine (opens and everything). But when I tried it on my main PC, it downloads the JAR but it doesn't open it after.
After reviewing the code, I noticed this:
it's trying to run with the environmental variables set I assume as doing 'java' in CMD on my main doesn't work.Code:if(isWindows(os)) Runtime.getRuntime().exec("cmd /c java -jar " + saveDirectory + getClientName(true));
That being said, I know how to set environmental variables but are they set by default in every PC that installs Java now a days?
What do I do when I want to start this server up for public and people can't run it due to not having paths set?
I feel like I remember that the launcher also had a few other problems you might need to look into once you fix them issues, like crashing client for some people if the launcher is left open after client loads and been playing for a little while?
I was too much of a noob back when it released to work out the problem, was probably something simple though
There's no URL now, I switched to the method Boomscape mentioned above which uses an API key.
Everything works, but like I said I think it's a Java Environmental Variables issue as it works on my VPS but not on my main PC. And when I checked the code, I saw it's trying to execute by doing:
It's not specifying any Java path and it gives me a reason to think it's relying on the environmental variables. But my concern was does every PC have them set by default now? I know how to set them myself, but I'm worried for other people who download my Client in the future.Code:cmd /c Java -jar
Not getting an error, it just doesn't open FROM THE LAUNCHER on the PC.
It opens fine when opening the .jar directly.
And I'm POSITIVE that it's this:
I don't have my path set for Java and the code is trying to launch the Client JAR by just doing 'Java -jar'.Code:private void startClient() { //TODO pretty unsure of anything but windows, so hopefully the other two execution parameters are correct? try { pbar.setString("Starting " + getClientName(false) + "..."); String os = System.getProperty("os.name").toLowerCase(); if(isWindows(os)) Runtime.getRuntime().exec("cmd /c java -jar " + saveDirectory + getClientName(true)); else if(isUnix(os)) Runtime.getRuntime().exec(new String[] { "/bin/bash", "-c", "java", "-jar", (saveDirectory + getClientName(true)) }); else Runtime.getRuntime().exec("java -jar " + saveDirectory + getClientName(true));
My fear is in the FUTURE not everyone may have their Java Path set in environmental variables, so it won't launch.
Fixed. I literally just switched:
To:Code:Runtime.getRuntime().exec("cmd /c java -jar " + saveDirectory + getClientName(true));
Code:Runtime.getRuntime().exec("java -jar " + saveDirectory + getClientName(true));
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |