Thread: Auto client updater issues?

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Auto client updater issues? 
    Extreme Donator

    Join Date
    Jul 2014
    Posts
    414
    Thanks given
    46
    Thanks received
    8
    Rep Power
    15
    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?
    Reply With Quote  
     

  2. #2  
    BoomScape #1
    BoomScape's Avatar
    Join Date
    May 2013
    Posts
    2,422
    Thanks given
    289
    Thanks received
    234
    Rep Power
    48
    Quote Originally Posted by Projecteco View Post
    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
    Attached image
    Reply With Quote  
     

  3. #3  
    Donator


    Join Date
    Jul 2014
    Posts
    509
    Thanks given
    90
    Thanks received
    87
    Rep Power
    503
    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.
    Reply With Quote  
     

  4. #4  
    Extreme Donator

    Join Date
    Jul 2014
    Posts
    414
    Thanks given
    46
    Thanks received
    8
    Rep Power
    15
    Quote Originally Posted by BoomScape View Post
    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
    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:

    Code:
    if(isWindows(os))
    	        	Runtime.getRuntime().exec("cmd /c java -jar " + saveDirectory + getClientName(true));
    it's trying to run with the environmental variables set I assume as doing 'java' in CMD on my main doesn't work.
    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?
    Reply With Quote  
     

  5. #5  
    Perplexity owner

    Join Date
    Feb 2011
    Posts
    171
    Thanks given
    32
    Thanks received
    15
    Rep Power
    0
    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
    Reply With Quote  
     

  6. #6  
    Extreme Donator

    Join Date
    Jul 2014
    Posts
    414
    Thanks given
    46
    Thanks received
    8
    Rep Power
    15
    Quote Originally Posted by Perplexity View Post
    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
    Haven't had any of those issues yet, though I am still having the issue above with what I think is environmental variables.
    Reply With Quote  
     

  7. #7  
    08-13, SpawnScape Owner

    jet kai's Avatar
    Join Date
    Dec 2009
    Age
    28
    Posts
    870
    Thanks given
    630
    Thanks received
    957
    Rep Power
    5000
    In the dropbox URL, does it end with dl=1 or dl=0?
    Reply With Quote  
     

  8. #8  
    Extreme Donator

    Join Date
    Jul 2014
    Posts
    414
    Thanks given
    46
    Thanks received
    8
    Rep Power
    15
    Quote Originally Posted by jet kai View Post
    In the dropbox URL, does it end with dl=1 or dl=0?
    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:

    Code:
    cmd /c Java -jar
    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.
    Reply With Quote  
     

  9. #9  
    08-13, SpawnScape Owner

    jet kai's Avatar
    Join Date
    Dec 2009
    Age
    28
    Posts
    870
    Thanks given
    630
    Thanks received
    957
    Rep Power
    5000
    Quote Originally Posted by Projecteco View Post
    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:

    Code:
    cmd /c Java -jar
    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.
    What error are you getting when the jar is being opened on the PC? It might be that you're compiling with a later version of Java that your PC doesn't have. Most have JDK 1.8 now adays.
    Reply With Quote  
     

  10. #10  
    Extreme Donator

    Join Date
    Jul 2014
    Posts
    414
    Thanks given
    46
    Thanks received
    8
    Rep Power
    15
    Quote Originally Posted by jet kai View Post
    What error are you getting when the jar is being opened on the PC? It might be that you're compiling with a later version of Java that your PC doesn't have. Most have JDK 1.8 now adays.
    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:

    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));
    I don't have my path set for Java and the code is trying to launch the Client JAR by just doing 'Java -jar'.
    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:

    Code:
    Runtime.getRuntime().exec("cmd /c java -jar " + saveDirectory + getClientName(true));
    To:

    Code:
    Runtime.getRuntime().exec("java -jar " + saveDirectory + getClientName(true));
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Auto Client Updater
    By Ashley in forum Help
    Replies: 9
    Last Post: 08-16-2013, 02:08 PM
  2. Auto Client Updater
    By Christian_ in forum Help
    Replies: 0
    Last Post: 07-12-2013, 07:22 PM
  3. Auto Client Updater
    By Christian_ in forum Help
    Replies: 4
    Last Post: 07-12-2013, 07:18 PM
  4. Replies: 18
    Last Post: 06-09-2013, 10:28 PM
  5. Auto Client Updater
    By silabgarza in forum Help
    Replies: 12
    Last Post: 03-11-2011, 12:43 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •