Thread: New To Eclipse Help Run Source

Results 1 to 3 of 3
  1. #1 New To Eclipse Help Run Source 
    Registered Member
    Join Date
    Jan 2017
    Posts
    2
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hey, I recently downloaded the vencillio source to do some work, and i just recently downloaded eclipse i can run the server perfectly fine through the file but when i try run on eclipse through java application then select server, i get this error message? would appreciate some help thanks!

    Jan 02, 2017 5:42:09 AM com.vencillio.Server main
    INFO: Development mode: Online.
    Jan 02, 2017 5:42:09 AM com.vencillio.Server main
    INFO: Staff mode: Online.
    Jan 02, 2017 5:42:09 AM com.vencillio.core.GameThread startup
    INFO: Launching Vencillio..
    java.lang.NullPointerException
    at com.vencillio.core.util.LineCounter.listRecursive( LineCounter.java:39)
    at com.vencillio.core.util.LineCounter.run(LineCounte r.java:51)
    at com.vencillio.core.GameThread.startup(GameThread.j ava:64)
    at com.vencillio.core.GameThread.init(GameThread.java :34)
    at com.vencillio.Server.main(Server.java:104)
    Reply With Quote  
     

  2. #2  
    Forum Moderator


    Join Date
    Dec 2016
    Posts
    312
    Thanks given
    166
    Thanks received
    177
    Rep Power
    1089
    Please post the class Server.java on here so we could help you out, otherwise, feel free to PM me on skype. I'd be more than happy to help you out with this!
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2017
    Posts
    2
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Thanks im downloading skype now but this is the server.java.

    package com.vencillio;

    import java.lang.management.ManagementFactory;
    import java.lang.management.RuntimeMXBean;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.TimeZone;
    import java.util.logging.Logger;

    import com.vencillio.core.GameThread;
    import com.vencillio.core.network.mysql.HiscoreUpdater;
    import com.vencillio.core.network.mysql.MembershipRewards ;
    import com.vencillio.core.network.mysql.VoteUpdater;
    import com.vencillio.core.util.logger.PlayerLogger;
    import com.vencillio.rs2.content.clanchat.ClanManager;
    import com.vencillio.rs2.content.io.PlayerSave;
    import com.vencillio.rs2.entity.World;
    import com.vencillio.rs2.entity.player.Player;


    /**
    * Initializes the server
    *
    * @author Michael Sasse
    *
    */
    public class Server {

    /**
    * The logger for printing information.
    */
    private static Logger logger = Logger.getLogger(Server.class.getSimpleName());

    /**
    * Handles the clan chat.
    */
    public static ClanManager clanManager = new ClanManager();

    /**
    * Gets the Vencillio time
    */
    public static String vencillioTime() {
    return new SimpleDateFormat("HH:mm aa").format(new Date());
    }

    /**
    * Gets the server date
    */
    public static String vencillioDate() {
    return new SimpleDateFormat("EEEE MMM dd yyyy ").format(new Date());
    }

    /**
    * Gets the server uptime
    *
    * @return
    */
    public static String getUptime() {
    RuntimeMXBean mx = ManagementFactory.getRuntimeMXBean();
    DateFormat df = new SimpleDateFormat("DD 'D', HH 'H', mm 'M'");
    df.setTimeZone(TimeZone.getTimeZone("GMT+0"));
    return "" + df.format(new Date(mx.getUptime()));
    }

    /**
    * The main method of the server that initializes everything
    *
    * @param args
    * The startup arguments
    */
    public static void main(String[] args) {
    if (args != null && args.length > 0) {
    VencillioConstants.DEV_MODE = Boolean.valueOf(args[0]);
    }

    logger.info("Development mode: " + (VencillioConstants.DEV_MODE ? "Online" : "Offline") + ".");
    logger.info("Staff mode: " + (VencillioConstants.STAFF_ONLY ? "Online" : "Offline") + ".");

    if (!VencillioConstants.DEV_MODE) {
    try {
    MembershipRewards.prepare();
    HiscoreUpdater.prepare();
    VoteUpdater.prepare();
    } catch (Exception ex) {
    ex.printStackTrace();
    }

    Runtime.getRuntime().addShutdownHook(new Thread(() -> {
    for (Player players : World.getPlayers()) {
    if (players != null && players.isActive()) {
    PlayerSave.save(players);
    }
    }

    MembershipRewards.shutdown();
    HiscoreUpdater.shutdown();
    VoteUpdater.shutdown();

    PlayerLogger.SHUTDOWN_LOGGER.log("Logs", String.format("Server shutdown with %s online.", World.getActivePlayers()));
    }));
    }

    GameThread.init();
    }
    }
    Reply With Quote  
     


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. New to eclipse
    By Riddler in forum Help
    Replies: 5
    Last Post: 04-28-2013, 10:36 PM
  2. New to VPS[HELP]
    By Mr Terror in forum Hosting
    Replies: 4
    Last Post: 04-15-2013, 10:09 PM
  3. New To Eclipse, Need Help
    By Slawth Baws in forum Help
    Replies: 5
    Last Post: 08-21-2012, 10:08 AM
  4. New to this [help]
    By Death Pkz in forum Help
    Replies: 1
    Last Post: 12-27-2010, 12:35 PM
  5. New to Servers, help!
    By pur3 0wns79 in forum Downloads
    Replies: 2
    Last Post: 12-28-2007, 08:29 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •