Thread: Project exile java issue with vps

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Project exile java issue with vps 
    Registered Member
    Join Date
    Jun 2012
    Posts
    92
    Thanks given
    14
    Thanks received
    1
    Rep Power
    11
    When i run my projext exile source a separate java applet opens up when i hit run

    This causes the source to not be able to run on a vps.

    Any idea how to get rid of this little java thing?

    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2012
    Posts
    92
    Thanks given
    14
    Thanks received
    1
    Rep Power
    11
    bump
    Reply With Quote  
     

  3. #3  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    show your server.java
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2012
    Posts
    92
    Thanks given
    14
    Thanks received
    1
    Rep Power
    11
    Server.java
    Code:
    package server;
    
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.text.DecimalFormat;
    
    import org.apache.mina.common.IoAcceptor;
    import org.apache.mina.transport.socket.nio.SocketAcceptor;
    import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
    
    import server.event.EventManager;
    import server.model.npcs.NPCHandler;
    import server.model.npcs.NPCDrops;
    import server.model.players.PlayerHandler;
    import server.model.players.Player;
    import server.model.players.Client;
    import server.model.players.PlayerSave;
    import server.model.minigames.*;
    import server.net.ConnectionHandler;
    import server.net.ConnectionThrottleFilter;
    import server.util.ShutDownHook;
    import server.util.SimpleTimer;
    import server.util.log.Logger;
    import server.event.Event; 
    import server.event.EventContainer;
    import server.world.ItemHandler;
    import server.world.ObjectHandler;
    import server.world.ObjectManager;
    import server.world.ShopHandler;
    import server.world.map.VirtualWorld;
    import server.world.ClanChatHandler;
    import server.world.WorldMap;
    import server.world.WalkingHandler;
    
    /**
     * Server.java
     *
     * @author Sanity
     * @author Graham
     * @author Blake
     * @author Ryan Lmctruck30
     *
     */
    
    public class Server {
    	
    	
    	public static boolean sleeping;
    	public static int cycleRate;
    	public static boolean UpdateServer = false;
    	public static long lastMassSave = System.currentTimeMillis();
    	private static IoAcceptor acceptor;
    	private static ConnectionHandler connectionHandler;
    	private static ConnectionThrottleFilter throttleFilter;
    	private static SimpleTimer engineTimer, debugTimer;
    	private static long cycleTime, cycles, totalCycleTime, sleepTime;
    	private static DecimalFormat debugPercentFormat;
    	public static boolean shutdownServer = false;		
    	public static boolean shutdownClientHandler;			
    	public static int serverlistenerPort; 
    	public static ItemHandler itemHandler = new ItemHandler();
    	public static PlayerHandler playerHandler = new PlayerHandler();
    	public static NPCHandler npcHandler = new NPCHandler();
    	public static ShopHandler shopHandler = new ShopHandler();
    	public static ObjectHandler objectHandler = new ObjectHandler();
    	public static ObjectManager objectManager = new ObjectManager();
    	public static CastleWars castleWars = new CastleWars();
    	public static FightPits fightPits = new FightPits();
    	public static PestControl pestControl = new PestControl();
    	public static NPCDrops npcDrops = new NPCDrops();
    	public static ClanChatHandler clanChat = new ClanChatHandler();
    	public static FightCaves fightCaves = new FightCaves();
    	//public static WorldMap worldMap = new WorldMap();
    	public static long[] TIMES = new long[5];
    	//private static final WorkerThread engine = new WorkerThread();
    	
    	static {
    		if(!Config.SERVER_DEBUG) {
    			serverlistenerPort = 43594;
    		} else {
    			serverlistenerPort = 43594;
    		}
    		cycleRate = 575;
    		shutdownServer = false;
    		engineTimer = new SimpleTimer();
    		debugTimer = new SimpleTimer();
    		sleepTime = 0;
    		debugPercentFormat = new DecimalFormat("0.0#%");
    	}
    	//height,absX,absY,toAbsX,toAbsY,type
        /*public static final boolean checkPos(int height,int absX,int absY,int toAbsX,int toAbsY,int type)
        {
            return I.I(height,absX,absY,toAbsX,toAbsY,type);
        }*/
    	public static void main(java.lang.String args[]) throws NullPointerException, IOException {
    	java.awt.Frame frame = new java.awt.Frame();
    		frame.addWindowListener(new java.awt.event.WindowAdapter() {
    			public void windowClosing(java.awt.event.WindowEvent e) {
    				System.out.println("Saving all players.");
    				synchronized (this) {
    					for(Player p : PlayerHandler.players) {
    						if(p == null)
    							continue;						
    						PlayerSave.saveGame((Client)p);
    						lastMassSave = System.currentTimeMillis();
    					}
    					System.exit(0);
    				}
    			}
    		});
    		frame.setVisible(true);
    try {
    	WalkingHandler.getSingleton().initialize();
    } catch(Exception ex) {
    	ex.printStackTrace();
    }
    		
    		/**
    		 * Starting Up Server
    		 */
    		System.setOut(new Logger(System.out));
    		System.setErr(new Logger(System.err));
    		System.out.println("Launching Project-Exile...");
    		//MadTurnipConnection md = new MadTurnipConnection();
    	      //md.start();
    		
    		/**
    		 * World Map Loader
    		 */
    		//if(!Config.SERVER_DEBUG)
    			//VirtualWorld.init();
    		//WorldMap.loadWorldMap();	
    		 if(Config.CLIPPED_FIREMAKING) {
    			WorldMap.loadWorldMap();	//LOADS WORLD MAP
    			VirtualWorld.init();		//LOADS CLIPS
    			System.exit(0);			//LOADED BOTH, SO STOP LOADING.
    		}
    		/**
    		 * Script Loader
    		 */
    		//ScriptManager.loadScripts();
    		
    		/**
    		 * Accepting Connections
    		 */
    		acceptor = new SocketAcceptor();
    		connectionHandler = new ConnectionHandler();
    		
    		SocketAcceptorConfig sac = new SocketAcceptorConfig();
    		sac.getSessionConfig().setTcpNoDelay(false);
    		sac.setReuseAddress(true);
    		sac.setBacklog(100);
    		
    		throttleFilter = new ConnectionThrottleFilter(Config.CONNECTION_DELAY);
    		sac.getFilterChain().addFirst("throttleFilter", throttleFilter);
    		acceptor.bind(new InetSocketAddress(serverlistenerPort), connectionHandler, sac);
    
    		/**
    		 * Initialise Handlers
    		 */
    		//VoteForCash.createConnection();
    		EventManager.initialize();
    		Connection.initialize();
    		//HiscoresHandler.connect();
    		//PlayerSaving.initialize();
    		//MysqlManager.createConnection();
    
    		
    		/**
    		 * Clipped Following (NPC)
    		 */
    		try {
    		 WalkingHandler.getSingleton().initialize();
    		} catch(Exception ex) {
    		ex.printStackTrace();
    		}
    		/**
    		 * Server Successfully Loaded 
    		 */
    		System.out.println("Server listening on port: " + serverlistenerPort);
    		/**
    		 * Main Server Tick
    		 */
    		try {
    			while (!Server.shutdownServer) {
    				if (sleepTime > 0)
    					Thread.sleep(sleepTime);
    				engineTimer.reset();
    				itemHandler.process();
    				playerHandler.process();	
    	                        npcHandler.process();
    				shopHandler.process();
    				objectManager.process();
    				fightPits.process();
    				pestControl.process();
    				cycleTime = engineTimer.elapsed();
    				if(cycleTime < 575)
    					sleepTime = cycleRate - cycleTime;
    				else
    					sleepTime = 0;
    				totalCycleTime += cycleTime;
    				cycles++;
    				debug();
    				if(Config.SERVER_DEBUG) //i see.... i used wrong symbol lol LOL !
    					//System.out.println(cycleTime+"--"+sleepTime);
    			if (System.currentTimeMillis() - lastMassSave > 10000) {
    					for(Player p : PlayerHandler.players) {
    						if(p == null)
    							continue;						
    						PlayerSave.saveGame((Client)p);
    						System.out.println("Saved game for " + p.playerName + ".");
    						lastMassSave = System.currentTimeMillis();
    					}
    				
    				}
    			}
    		} catch (Exception ex) {
    			ex.printStackTrace();
    			System.out.println("A fatal exception has been thrown!");
    			for(Player p : PlayerHandler.players) {
    				if(p == null)
    					continue;				
    				PlayerSave.saveGame((Client)p);
    				System.out.println("Saved game for " + p.playerName + ".");
    			}
    		}			
    		acceptor = null;
    		connectionHandler = null;
    		sac = null;
    		System.exit(0);
    	}
    	
    	public static void processAllPackets() {
    		synchronized (playerHandler) {
    			for (int j = 0; j < playerHandler.players.length; j++) {
    				if (playerHandler.players[j] != null) {
    					while(playerHandler.players[j].processQueuedPackets());			
    				}	
    			}
    		}
    	}
    	
    	public static boolean playerExecuted = false;
    	private static void debug() {
    		if (debugTimer.elapsed() > 360*1000 || playerExecuted) {
    			long averageCycleTime = totalCycleTime / cycles;
    			System.out.println("Average Cycle Time: " + averageCycleTime + "ms");
    			double engineLoad = ((double) averageCycleTime / (double) cycleRate);
    			System.out.println("Players online: " + PlayerHandler.playerCount+ ", engine load: "+ debugPercentFormat.format(engineLoad));
    			totalCycleTime = 0;
    			cycles = 0;
    			System.gc();
    			System.runFinalization();
    			debugTimer.reset();
    			playerExecuted = false;
    		}
    	}
    	
    	public static long getSleepTimer() {
    		return sleepTime;
    	}
    	
    }
    Reply With Quote  
     

  5. #5  
    Registered Member
    Xynth's Avatar
    Join Date
    May 2009
    Posts
    2,222
    Thanks given
    226
    Thanks received
    259
    Rep Power
    1155
    Code:
    package server;
    
    import java.io.IOException;
    import java.net.InetSocketAddress;
    import java.text.DecimalFormat;
    
    import org.apache.mina.common.IoAcceptor;
    import org.apache.mina.transport.socket.nio.SocketAcceptor;
    import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
    
    import server.event.EventManager;
    import server.model.npcs.NPCHandler;
    import server.model.npcs.NPCDrops;
    import server.model.players.PlayerHandler;
    import server.model.players.Player;
    import server.model.players.Client;
    import server.model.players.PlayerSave;
    import server.model.minigames.*;
    import server.net.ConnectionHandler;
    import server.net.ConnectionThrottleFilter;
    import server.util.ShutDownHook;
    import server.util.SimpleTimer;
    import server.util.log.Logger;
    import server.event.Event; 
    import server.event.EventContainer;
    import server.world.ItemHandler;
    import server.world.ObjectHandler;
    import server.world.ObjectManager;
    import server.world.ShopHandler;
    import server.world.map.VirtualWorld;
    import server.world.ClanChatHandler;
    import server.world.WorldMap;
    import server.world.WalkingHandler;
    
    /**
     * Server.java
     *
     * @author Sanity
     * @author Graham
     * @author Blake
     * @author Ryan Lmctruck30
     *
     */
    
    public class Server {
    	
    	
    	public static boolean sleeping;
    	public static int cycleRate;
    	public static boolean UpdateServer = false;
    	public static long lastMassSave = System.currentTimeMillis();
    	private static IoAcceptor acceptor;
    	private static ConnectionHandler connectionHandler;
    	private static ConnectionThrottleFilter throttleFilter;
    	private static SimpleTimer engineTimer, debugTimer;
    	private static long cycleTime, cycles, totalCycleTime, sleepTime;
    	private static DecimalFormat debugPercentFormat;
    	public static boolean shutdownServer = false;		
    	public static boolean shutdownClientHandler;			
    	public static int serverlistenerPort; 
    	public static ItemHandler itemHandler = new ItemHandler();
    	public static PlayerHandler playerHandler = new PlayerHandler();
    	public static NPCHandler npcHandler = new NPCHandler();
    	public static ShopHandler shopHandler = new ShopHandler();
    	public static ObjectHandler objectHandler = new ObjectHandler();
    	public static ObjectManager objectManager = new ObjectManager();
    	public static CastleWars castleWars = new CastleWars();
    	public static FightPits fightPits = new FightPits();
    	public static PestControl pestControl = new PestControl();
    	public static NPCDrops npcDrops = new NPCDrops();
    	public static ClanChatHandler clanChat = new ClanChatHandler();
    	public static FightCaves fightCaves = new FightCaves();
    	//public static WorldMap worldMap = new WorldMap();
    	public static long[] TIMES = new long[5];
    	//private static final WorkerThread engine = new WorkerThread();
    	
    	static {
    		if(!Config.SERVER_DEBUG) {
    			serverlistenerPort = 43594;
    		} else {
    			serverlistenerPort = 43594;
    		}
    		cycleRate = 575;
    		shutdownServer = false;
    		engineTimer = new SimpleTimer();
    		debugTimer = new SimpleTimer();
    		sleepTime = 0;
    		debugPercentFormat = new DecimalFormat("0.0#%");
    	}
    	//height,absX,absY,toAbsX,toAbsY,type
        /*public static final boolean checkPos(int height,int absX,int absY,int toAbsX,int toAbsY,int type)
        {
            return I.I(height,absX,absY,toAbsX,toAbsY,type);
        }*/
    	public static void main(java.lang.String args[]) throws NullPointerException, IOException {
    try {
    	WalkingHandler.getSingleton().initialize();
    } catch(Exception ex) {
    	ex.printStackTrace();
    }
    		
    		/**
    		 * Starting Up Server
    		 */
    		System.setOut(new Logger(System.out));
    		System.setErr(new Logger(System.err));
    		System.out.println("Launching Project-Exile...");
    		//MadTurnipConnection md = new MadTurnipConnection();
    	      //md.start();
    		
    		/**
    		 * World Map Loader
    		 */
    		//if(!Config.SERVER_DEBUG)
    			//VirtualWorld.init();
    		//WorldMap.loadWorldMap();	
    		 if(Config.CLIPPED_FIREMAKING) {
    			WorldMap.loadWorldMap();	//LOADS WORLD MAP
    			VirtualWorld.init();		//LOADS CLIPS
    			System.exit(0);			//LOADED BOTH, SO STOP LOADING.
    		}
    		/**
    		 * Script Loader
    		 */
    		//ScriptManager.loadScripts();
    		
    		/**
    		 * Accepting Connections
    		 */
    		acceptor = new SocketAcceptor();
    		connectionHandler = new ConnectionHandler();
    		
    		SocketAcceptorConfig sac = new SocketAcceptorConfig();
    		sac.getSessionConfig().setTcpNoDelay(false);
    		sac.setReuseAddress(true);
    		sac.setBacklog(100);
    		
    		throttleFilter = new ConnectionThrottleFilter(Config.CONNECTION_DELAY);
    		sac.getFilterChain().addFirst("throttleFilter", throttleFilter);
    		acceptor.bind(new InetSocketAddress(serverlistenerPort), connectionHandler, sac);
    
    		/**
    		 * Initialise Handlers
    		 */
    		//VoteForCash.createConnection();
    		EventManager.initialize();
    		Connection.initialize();
    		//HiscoresHandler.connect();
    		//PlayerSaving.initialize();
    		//MysqlManager.createConnection();
    
    		
    		/**
    		 * Clipped Following (NPC)
    		 */
    		try {
    		 WalkingHandler.getSingleton().initialize();
    		} catch(Exception ex) {
    		ex.printStackTrace();
    		}
    		/**
    		 * Server Successfully Loaded 
    		 */
    		System.out.println("Server listening on port: " + serverlistenerPort);
    		/**
    		 * Main Server Tick
    		 */
    		try {
    			while (!Server.shutdownServer) {
    				if (sleepTime > 0)
    					Thread.sleep(sleepTime);
    				engineTimer.reset();
    				itemHandler.process();
    				playerHandler.process();	
    	                        npcHandler.process();
    				shopHandler.process();
    				objectManager.process();
    				fightPits.process();
    				pestControl.process();
    				cycleTime = engineTimer.elapsed();
    				if(cycleTime < 575)
    					sleepTime = cycleRate - cycleTime;
    				else
    					sleepTime = 0;
    				totalCycleTime += cycleTime;
    				cycles++;
    				debug();
    				if(Config.SERVER_DEBUG) //i see.... i used wrong symbol lol LOL !
    					//System.out.println(cycleTime+"--"+sleepTime);
    			if (System.currentTimeMillis() - lastMassSave > 10000) {
    					for(Player p : PlayerHandler.players) {
    						if(p == null)
    							continue;						
    						PlayerSave.saveGame((Client)p);
    						System.out.println("Saved game for " + p.playerName + ".");
    						lastMassSave = System.currentTimeMillis();
    					}
    				
    				}
    			}
    		} catch (Exception ex) {
    			ex.printStackTrace();
    			System.out.println("A fatal exception has been thrown!");
    			for(Player p : PlayerHandler.players) {
    				if(p == null)
    					continue;				
    				PlayerSave.saveGame((Client)p);
    				System.out.println("Saved game for " + p.playerName + ".");
    			}
    		}			
    		acceptor = null;
    		connectionHandler = null;
    		sac = null;
    		System.exit(0);
    	}
    	
    	public static void processAllPackets() {
    		synchronized (playerHandler) {
    			for (int j = 0; j < playerHandler.players.length; j++) {
    				if (playerHandler.players[j] != null) {
    					while(playerHandler.players[j].processQueuedPackets());			
    				}	
    			}
    		}
    	}
    	
    	public static boolean playerExecuted = false;
    	private static void debug() {
    		if (debugTimer.elapsed() > 360*1000 || playerExecuted) {
    			long averageCycleTime = totalCycleTime / cycles;
    			System.out.println("Average Cycle Time: " + averageCycleTime + "ms");
    			double engineLoad = ((double) averageCycleTime / (double) cycleRate);
    			System.out.println("Players online: " + PlayerHandler.playerCount+ ", engine load: "+ debugPercentFormat.format(engineLoad));
    			totalCycleTime = 0;
    			cycles = 0;
    			System.gc();
    			System.runFinalization();
    			debugTimer.reset();
    			playerExecuted = false;
    		}
    	}
    	
    	public static long getSleepTimer() {
    		return sleepTime;
    	}
    	
    }

    Try that.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jun 2012
    Posts
    92
    Thanks given
    14
    Thanks received
    1
    Rep Power
    11
    Thanks, what was it even for?
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jun 2012
    Posts
    92
    Thanks given
    14
    Thanks received
    1
    Rep Power
    11
    What was it for ?
    Reply With Quote  
     

  8. #8  
    Ignorance is always an excuse

    Mikee's Avatar
    Join Date
    Nov 2009
    Posts
    2,370
    Thanks given
    732
    Thanks received
    490
    Rep Power
    656
    Quote Originally Posted by liltwoll View Post
    What was it for ?
    Not sure what you mean by that seeing as you started this thread.

    If you're asking what he did to fix it, he just removed the frame coding.



    The day Aj repped me, my life changed forever
    Quote Originally Posted by Aj View Post
    Rep++ for you
    Reply With Quote  
     

  9. #9  
    Ignorance is always an excuse

    Mikee's Avatar
    Join Date
    Nov 2009
    Posts
    2,370
    Thanks given
    732
    Thanks received
    490
    Rep Power
    656
    Quote Originally Posted by Jack>L View Post
    I'm not trying to talk shit, but let's be honest here, why would you even bother helping this guy, He downloaded Tom's release and is already hosting it, without anything done to it gaurenteed. Hey mate just so you're aware, its filled with exploits, a few really nice hidden dupes, and has no cheat-client protection.

    one exploit I will tell you, more then half the items on that server, when you wear them and turn into a female you'll turn invisible. Infinity Hat is one of those items. You can find the 3827 other items that do so.

    Oh and I doubt you even checked mage bank spider webs.. GL with one too.
    We already know he's a noob... this thread is based on him asking for help help with a problem which can be solved by knowing basic java.



    The day Aj repped me, my life changed forever
    Quote Originally Posted by Aj View Post
    Rep++ for you
    Reply With Quote  
     

  10. #10  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,436
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    Quote Originally Posted by Jack>L View Post
    I'm not trying to talk shit, but let's be honest here, why would you even bother helping this guy, He downloaded Tom's release and is already hosting it, without anything done to it gaurenteed. Hey mate just so you're aware, its filled with exploits, a few really nice hidden dupes, and has no cheat-client protection.

    one exploit I will tell you, more then half the items on that server, when you wear them and turn into a female you'll turn invisible. Infinity Hat is one of those items. You can find the 3827 other items that do so.

    Oh and I doubt you even checked mage bank spider webs.. GL with one too.
    Fixing webs at mage bank = 2 minutes.

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    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. Replies: 2
    Last Post: 06-11-2012, 05:02 AM
  2. Replies: 2
    Last Post: 06-11-2012, 04:58 AM
  3. Project-Exile || All you could ever want!
    By Project Exile in forum Projects
    Replies: 31
    Last Post: 03-14-2012, 03:14 AM
  4. Project-Exile - Everything that you could want!
    By Raw Envy in forum Advertise
    Replies: 38
    Last Post: 12-29-2011, 08:33 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
  •