Author Topic: How to Compile?  (Read 4484 times)

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
How to Compile?
« on: February 05, 2015, 07:51:28 pm »
I created a file manifest.txt in src/gcb

Code: [Select]
Manifest-Version: 2.0
Class-Path: . lib/bcpkix-jdk15on-148.jar lib/bcprov-jdk15on-148.jar lib/commons-collections-3.2.1.jar lib/commons-configuration-1.9.jar lib/commons-lang-2.6.jar lib/commons-logging-1.1.2.jar lib/mysql-connector-java-5.1.24-bin.jar
Main-Class: Main.class

no main manifest attribute, in gcb.jar

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #1 on: February 07, 2015, 06:34:40 pm »
help help help!!!!!!!!!!!


Code: [Select]
/src/gcb$ jar cvfm gcb.jar manifest.txt *.class
added manifest
adding: CommandInputThread.class(in = 1478) (out= 856)(deflated 42%)
adding: ConnectWorkerPool.class(in = 1990) (out= 1134)(deflated 43%)
adding: ConnectWorkerPool$ConnectJob.class(in = 505) (out= 320)(deflated 36%)
adding: ConnectWorkerPool$ConnectWorker.class(in = 1860) (out= 1069)(deflated 42%)
adding: Constants.class(in = 609) (out= 390)(deflated 35%)
adding: GarenaEncrypt.class(in = 9958) (out= 5218)(deflated 47%)
adding: GarenaInterface.class(in = 45710) (out= 21448)(deflated 53%)
adding: GarenaInterface$CleanTask.class(in = 460) (out= 303)(deflated 34%)
adding: GarenaInterface$ExperienceTask.class(in = 728) (out= 492)(deflated 32%)
adding: GarenaInterface$HelloTask.class(in = 661) (out= 445)(deflated 32%)
adding: GarenaInterface$PlayTask.class(in = 678) (out= 458)(deflated 32%)
adding: GarenaInterface$ReconnectTask.class(in = 1338) (out= 787)(deflated 41%)
adding: GarenaInterface$RetransmitTask.class(in = 951) (out= 601)(deflated 36%)
adding: GarenaListener.class(in = 384) (out= 232)(deflated 39%)
adding: GarenaReconnect.class(in = 1624) (out= 769)(deflated 52%)
adding: GarenaReconnectThread.class(in = 1368) (out= 803)(deflated 41%)
adding: GarenaTCP.class(in = 17311) (out= 8966)(deflated 48%)
adding: GarenaTCPPacket.class(in = 844) (out= 546)(deflated 35%)
adding: GarenaThread.class(in = 1836) (out= 1075)(deflated 41%)
adding: GCBConfig.class(in = 1490) (out= 808)(deflated 45%)
adding: GCBRcon.class(in = 3170) (out= 1803)(deflated 43%)
adding: GCBRcon$ExitTask.class(in = 1060) (out= 689)(deflated 35%)
adding: GCBRcon$RconHandler.class(in = 3755) (out= 2139)(deflated 43%)
adding: GCBReverseHost.class(in = 5647) (out= 2970)(deflated 47%)
adding: GChatBot.class(in = 59309) (out= 24061)(deflated 59%)
adding: Main.class(in = 10815) (out= 5867)(deflated 45%)
adding: Main$StatusTask.class(in = 2400) (out= 1396)(deflated 41%)
adding: MemberInfo.class(in = 776) (out= 485)(deflated 37%)
adding: ReverseServer.class(in = 1744) (out= 1014)(deflated 41%)
adding: RoomInfo.class(in = 234) (out= 185)(deflated 20%)
adding: UserInfo.class(in = 376) (out= 265)(deflated 29%)
adding: WC3GameIdentifier.class(in = 1116) (out= 689)(deflated 38%)
adding: WC3Interface.class(in = 12443) (out= 6462)(deflated 48%)
/root/src/gcb$ java -jar gcb.jar
no main manifest attribute, in gcb.jar

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #2 on: February 07, 2015, 06:39:11 pm »
Code: [Select]
/root/gcb-gcb1.0.1/src$ java -classpath .:../bin/lib/* gcb.Main
gcb 1.0.1
Exception in thread "main" java.lang.NullPointerException
        at gcb.Main.init(Main.java:97)
        at gcb.Main.main(Main.java:449)

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #3 on: February 07, 2015, 06:42:09 pm »
Nothing that other versions of the files?

Quote
Manifest-Version: 1.0
Class-Path: . lib/bcprov-jdk15-146.jar lib/commons-collections-3.2.1.jar lib/commons-configuration-1.9.jar lib/commons-lang-2.5.jar lib/commons-logging-1.1.1.jar lib/mysql-connector-java-5.1.13-bin.jar
Main-Class: gcb.Main

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #4 on: February 07, 2015, 07:02:00 pm »

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: How to Compile?
« Reply #5 on: February 08, 2015, 01:55:17 pm »
Code: [Select]
/root/gcb-gcb1.0.1/src$ java -classpath .:../bin/lib/* gcb.Main
gcb 1.0.1
Exception in thread "main" java.lang.NullPointerException
        at gcb.Main.init(Main.java:97)
        at gcb.Main.main(Main.java:449)
It sounds like you have successfully run the modified version that you have, but it has a bug that is causing crash? You should post Main.java.

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #6 on: February 08, 2015, 06:30:45 pm »
I did not change, this is the standard version GCB.

Code: [Select]
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gcb;

import gcb.bot.ChatThread;
import gcb.bot.SQLThread;
import gcb.plugin.PluginManager;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.management.ManagementFactory;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;

/**
 *
 * @author wizardus
 */
public class Main {
public static String VERSION = "gcb 1.0.1";
public static boolean DEBUG;
public static final String DATE_FORMAT = "yyyy-MM-dd";
public static Timer TIMER;
public static Random RANDOM;

static boolean log;
static boolean logCommands;

/*
* logLevel determines what messages will be printed/discarded
* it uses a binary flag system, flags can be added to produce desired result:
*  1 (2^0) - uncategorized system messages (should be enabled)
*  2 (2^1) - uncategorized error messages (should be enabled)
*  4 (2^2) - logging-related notifications
*  8 (2^3) - startup-related messages (can be disabled, since errors will be logged under 2^1)
*  16 (2^4) - unimportant system messages
*  32 (2^5) - uncategorized room messages (should be enabled)
*  64 (2^6) - uncategorized room messages (should be enabled)
*  128 (2^7) - unimportant room messages (includes many room connection messages)
*  256 (2^8) - room messages that come from the Garena server
*  512 (2^9) - room messages that come from other players
*  1024 (2^10) - debug room messages
*  2048 (2^11) - debug system messages
*  4096 (2^12) - TCP debug messages (should be disabled except for debugging)
* WARNING: in the source code, println method uses the x in 2^x to identify the different logging levels,
*  while in configuration you should add the 1, 2, 4, 8, etc. values
*/
static int logLevel;

boolean botDisable;
boolean reverse;
long lastLog; //when the log file(s) were created
static int newLogInterval; //ms interval between creating new log file(s)

static PrintWriter log_out;
static PrintWriter log_cmd_out;

Map<Integer, GChatBot> bots;

PluginManager plugins;
Map<Integer, GarenaInterface> garenaConnections;
WC3Interface wc3i;
ChatThread chatthread;
SQLThread sqlthread;
GarenaReconnect reconnect;
GCBRcon rcon;

ConnectWorkerPool connectPool;

//determine what will be loaded, what won't be loaded
boolean loadBot;
boolean loadPlugins;
boolean loadWC3;
boolean loadPL;
boolean loadSQL;
boolean loadChat;
boolean loadRcon;

public void init(String[] args) {
System.out.println(VERSION);
GCBConfig.load(args);

//determine what to load based on gcb_reverse and gcb_bot
loadBot = GCBConfig.configuration.getBoolean("gcb_bot", false);
loadRcon = GCBConfig.configuration.getBoolean("gcb_rcon", false);
botDisable = GCBConfig.configuration.getBoolean("gcb_bot_disable", true);
reverse = GCBConfig.configuration.getBoolean("gcb_reverse", false);

log = GCBConfig.configuration.getBoolean("gcb_log", false);
logCommands = GCBConfig.configuration.getBoolean("gcb_log_commands", false);
newLogInterval = GCBConfig.configuration.getInt("gcb_log_new_file", 86400000);
logLevel = GCBConfig.configuration.getInt("gcb_loglevel", 1023);

//first load all the defaults
loadPlugins = true;
loadWC3 = true;
loadPL = true;
loadSQL = false;
loadChat = false;

if(loadBot) {
loadSQL = true;
loadChat = true;
}

if(loadBot && botDisable) {
loadWC3 = false;
loadPL = false;
}

if(reverse) {
loadWC3 = false; //or else we'll broadcast our own packets
}

lastLog = System.currentTimeMillis();

bots = new HashMap<Integer, GChatBot>();
garenaConnections = new HashMap<Integer, GarenaInterface>();

TIMER.schedule(new StatusTask(), 10000, GCBConfig.configuration.getInt("gcb_status", 60) * 1000);
}

public void initPlugins() {
if(loadPlugins) {
plugins = new PluginManager();
}
}

public void loadPlugins() {
if(loadPlugins) {
plugins.setGarena(garenaConnections, wc3i, sqlthread, chatthread);
plugins.initPlugins();
plugins.loadPlugins();
}
}

//garena is null when first starting
public boolean initGarenaAll(boolean restart) {
if(connectPool == null) {
connectPool = new ConnectWorkerPool(this);
}

if(loadWC3 && !restart) {
//setup wc3 broadcast reader
wc3i = new WC3Interface(garenaConnections);

if(!wc3i.init()) {
return false;
}
}

//connect to garena
if(!restart) {
reconnect = new GarenaReconnect(this);

//initiate each connetion
for(int i = 1; i < 65536; i++) {
if(GCBConfig.configuration.containsKey("garena" + i + "_roomid") ||
GCBConfig.configuration.containsKey("garena" + i + "_roomname")) {
GarenaInterface garena = new GarenaInterface(plugins, i);
garena.registerListener(reconnect);

synchronized(garenaConnections) {
garenaConnections.put(i, garena);
}

connectPool.push(0, garena);
}
}
}

//wait for all connection jobs to finish
connectPool.waitFor();

if(loadChat && !restart) {
chatthread = new ChatThread(garenaConnections);
chatthread.start();
}

if(loadWC3 && !restart) {
//start receiving and broadcasting wc3 packets
GarenaThread wc3_thread = new GarenaThread(null, wc3i, GarenaThread.WC3_BROADCAST);
wc3_thread.start();
}

if(loadRcon && !restart) {
try {
rcon = new GCBRcon(this);
} catch(IOException ioe) {
println(1, "[Main] Error: failed to load rcon server: " + ioe.getLocalizedMessage());
}
}

//make sure we get correct external ip/port; do on restart in case they changed
lookup();

return true;
}

public void initRoomAll() {
synchronized(garenaConnections) {
Iterator<GarenaInterface> it = garenaConnections.values().iterator();

while(it.hasNext()) {
GarenaInterface garena = it.next();
connectPool.push(1, garena);
}
}

//wait for connection jobs to finish, then close the worker pool
connectPool.waitFor();
connectPool.close();
}

public boolean initGarena(GarenaInterface garena, boolean restart) {
garena.clear();
if(!garena.init()) return false;

if(loadWC3) {
garena.setWC3Interface(wc3i);
}

if(!restart && !initPeer(garena, restart)) return false;

//authenticate with login server
if(!garena.sendGSPSessionInit()) return false;
if(!garena.readGSPSessionInitReply()) return false;
if(!garena.sendGSPSessionHello()) return false;
if(!garena.readGSPSessionHelloReply()) return false;
if(!garena.sendGSPSessionLogin()) return false;
if(!garena.readGSPSessionLoginReply()) return false;

if(!restart) {
GarenaThread gsp_thread = new GarenaThread(garena, null, GarenaThread.GSP_LOOP);
gsp_thread.start();
}

if(restart) {
//make sure we get correct external ip/port; do on restart in case they changed
//if this is initial load, this will be done elsewhere
lookup();
}

return true;
}

public boolean initPeer(GarenaInterface garena, boolean restart) {
if(!garena.initPeer()) return false;

if(loadPL && !restart) {
//startup GP2PP system
GarenaThread pl = new GarenaThread(garena, wc3i, GarenaThread.PEER_LOOP);
pl.start();
}

return true;
}

public void lookup() {
synchronized(garenaConnections) {
if(loadPL && !garenaConnections.isEmpty()) {
Iterator<GarenaInterface> it = garenaConnections.values().iterator();

while(it.hasNext()) {
GarenaInterface garena = it.next();

//lookup
garena.sendPeerLookup();

Main.println(0, "[Main] Waiting for lookup response on connection " + garena.id + "...");

int counter = 0; //resend lookup every second

while(garena.iExternal == null) {
try {
Thread.sleep(100);
} catch(InterruptedException e) {}

counter++;
if(counter % 10 == 0) {
Main.println(0, "[Main] Resending lookup on connection " + garena.id);
garena.sendPeerLookup();
}
}

Main.println(0, "[Main] Received lookup response!");
}
}
}
}

//returns whether init succeeded; restart=true indicates this isn't the first time we're calling
public boolean initRoom(GarenaInterface garena, boolean restart) {
//connect to room
if(!garena.initRoom()) return false;
if(!garena.sendGCRPMeJoin()) return false;

if(!restart) {
GarenaThread gcrp_thread = new GarenaThread(garena, wc3i, GarenaThread.GCRP_LOOP);
gcrp_thread.start();
}

// we ought to say we're starting the game; we'll do later too
garena.startPlaying();

return true;
}

public void initBot() {
if(loadBot) {
synchronized(garenaConnections) {
Iterator<Integer> garenaIds = garenaConnections.keySet().iterator();

while(garenaIds.hasNext()) {
int garenaId = garenaIds.next();

GarenaInterface garena = garenaConnections.get(garenaId);
GChatBot bot = new GChatBot(this);
bot.init();

bot.garena = garena;
bot.plugins = plugins;
bot.sqlthread = sqlthread;
bot.chatthread = chatthread;

garena.registerListener(bot);
bots.put(garenaId, bot);
}
}
}

if(loadSQL) {
//initiate mysql thread
sqlthread = new SQLThread(bots);
sqlthread.init();
sqlthread.start();
}

if(loadBot) {
synchronized(bots) {
Iterator<GChatBot> it = bots.values().iterator();

while(it.hasNext()) {
it.next().sqlthread = sqlthread;
}
}
}

}

public void newLogLoop() {
if(newLogInterval != 0) {
while(true) {
if(System.currentTimeMillis() - lastLog > newLogInterval) {
String currentDate = date();

if(log_out != null) {
println(2, "[Main] Closing old log file and creating new log file");
log_out.close();
File log_directory = new File("log/");
if(!log_directory.exists()) {
log_directory.mkdir();
}

File log_target = new File(log_directory, currentDate + ".log");

try {
log_out = new PrintWriter(new FileWriter(log_target, true), true);
} catch(IOException e) {
if(DEBUG) {
e.printStackTrace();
}
println(2, "[Main] Failed to change log file date: " + e.getLocalizedMessage());
}
}

if(logCommands && log_cmd_out != null) {
log_cmd_out.close();
File log_cmd_directory = new File("cmd_log/");
if(!log_cmd_directory.exists()) {
log_cmd_directory.mkdir();
}

File log_cmd_target = new File(log_cmd_directory, currentDate + ".log");

try {
log_cmd_out = new PrintWriter(new FileWriter(log_cmd_target, true), true);
} catch(IOException e) {
if(DEBUG) {
e.printStackTrace();
}
println(2, "[Main] Failed to change cmd log file date: " + e.getLocalizedMessage());
}
}
lastLog = System.currentTimeMillis();
}
try {
Thread.sleep(10000);
} catch(InterruptedException e) {
println(2, "[Main] New day loop sleep interrupted");
}
}
}
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
/* Use this to decrypt Garena packets
try {
GarenaEncrypt encrypt = new GarenaEncrypt();
encrypt.initRSA();

byte[] data = readWS(args[0]);
byte[] plain = encrypt.rsaDecryptPrivate(data);

byte[] key = new byte[32];
byte[] init_vector = new byte[16];
System.arraycopy(plain, 0, key, 0, 32);
System.arraycopy(plain, 32, init_vector, 0, 16);
encrypt.initAES(key, init_vector);

data = readWS(args[1]);
byte[] out = encrypt.aesDecrypt(data);

Main.println(encrypt.hexEncode(out));
} catch (Exception e) {
e.printStackTrace();
}
System.exit(0);*/

Main.TIMER = new Timer();
Main.RANDOM = new Random();
Main main = new Main();
main.init(args);

//init log
if(log) {
if(newLogInterval != 0) {
File log_directory = new File("log/");
if(!log_directory.exists()) {
log_directory.mkdir();
}

File log_target = new File(log_directory, date() + ".log");

log_out = new PrintWriter(new FileWriter(log_target, true), true);
}
}
if(logCommands) {
if(newLogInterval != 0) {
File log_cmd_directory = new File("cmd_log/");
if(!log_cmd_directory.exists()) {
log_cmd_directory.mkdir();
}

File log_cmd_target = new File(log_cmd_directory, date() + ".log");

log_cmd_out = new PrintWriter(new FileWriter(log_cmd_target, true), true);
} else {
log_cmd_out = new PrintWriter(new FileWriter("gcb_cmd.log", true), true);
}
}

DEBUG = GCBConfig.configuration.getBoolean("gcb_debug", false);

main.initPlugins();
if(!main.initGarenaAll(false)) {
System.exit(-1);
return;
}

main.initRoomAll();

main.initBot();
main.loadPlugins();

main.newLogLoop();
}

public static synchronized void println(int level, String str) {
//don't output this message if we're not at the correct log level
//note that here, level is the base (2^level is the flag value)
if((logLevel & (1 << level)) == 0) {
return;
}

Date date = new Date();
String dateString = DateFormat.getDateTimeInstance().format(date);

System.out.println(str);

if(log_out == null && newLogInterval == 0) {
try {
log_out = new PrintWriter(new FileWriter("gcb.log", true), true);
} catch(IOException ioe) {
System.err.println("Unable to print to file: " + ioe.getLocalizedMessage());
ioe.printStackTrace();
return;
}
}

if(log_out != null) {
log_out.println("[" + dateString + "] " + str);

if(newLogInterval == 0) {
log_out.close();
log_out = null;
}
}
}

public static void cmdprintln(String str) {
Date date = new Date();
String dateString = DateFormat.getDateTimeInstance().format(date);

if(log_cmd_out != null) {
log_cmd_out.println("[" + dateString + "] " + str);
}
}

public static String date() {
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
return sdf.format(cal.getTime());
}

//hexadecimal string to byte array
public static byte[] readWS(String s) {
int len = s.length();

byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) {
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
+ Character.digit(s.charAt(i+1), 16));
}

return data;
}

class StatusTask extends TimerTask {
public void run() {
int numTCPConnections = 0;

int mostPopularId = 0;
int maxTCPConnections = 0;

int rooms = 0;
int users = 0;

synchronized(garenaConnections) {
Iterator<GarenaInterface> it = garenaConnections.values().iterator();

while(it.hasNext()) {
GarenaInterface garena = it.next();
int connected = garena.numConnected();
numTCPConnections += connected;

if(connected > maxTCPConnections) {
maxTCPConnections = connected;
mostPopularId = garena.id;
}

rooms++;
users += garena.numRoomUsers();
}
}

int memory = (int) (Runtime.getRuntime().totalMemory() / 1024);
int threads = ManagementFactory.getThreadMXBean().getThreadCount();

int uptime = (int) (ManagementFactory.getRuntimeMXBean().getUptime() / 1000);

int upDays = uptime / 86400;
int upHours = (uptime % 86400) / 3600;
int upMinutes = (uptime % 3600) / 60;
int upSeconds = uptime % 60;

String uptimeString = "";
if(upDays != 0) uptimeString += upDays + "d";
if(uptime >= 3600) uptimeString += upHours + "h";
if(uptime >= 60) uptimeString += upMinutes + "m";
uptimeString += upSeconds + "s";

String statusString = String.format(
"[STATUS] connected: %d (max: %d/%d); mem: %d KB; threads: %d; rooms/users: %d/%d; up: %s",
numTCPConnections,
mostPopularId,
maxTCPConnections,
memory,
threads,
rooms,
users,
uptimeString);

Main.println(0, statusString);
}
}
}

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: How to Compile?
« Reply #7 on: February 08, 2015, 10:19:10 pm »
That looks like old version, it may have bug. Or maybe you are missing the configuration file.

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #8 on: February 08, 2015, 10:54:03 pm »
1. I downloaded the GCB
2. I unpacked GCB
3. I moved to the directory /gcb-master/src
4. I run the command:

Code: [Select]
javac -classpath .:../bin/lib/* gcb/Main.java
5. I run the command:

Code: [Select]
java -classpath .:../bin/lib/* gcb.Main
Error:

Code: [Select]
gcb 1.0.2-dev
Exception in thread "main" java.lang.NullPointerException
        at gcb.Main.init(Main.java:98)
        at gcb.Main.main(Main.java:471)


« Last Edit: February 09, 2015, 08:54:39 pm by Artyom91 »

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: How to Compile?
« Reply #9 on: February 09, 2015, 12:26:51 pm »
Ok, try newest commit. The problem anyway is that you're missing the configuration file.

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #10 on: February 09, 2015, 09:13:05 pm »
Code: [Select]
[GInterface 2] Initializing peer socket...      at gcb.GarenaInterface.sendGSPSessionInit(GarenaInterface.java:478)

        at gcb.Main.initGarena(Main.java:246)
        at gcb.ConnectWorkerPool$ConnectWorker.run(ConnectWorkerPool.java:100)
java.lang.NullPointerException
        at gcb.GarenaInterface.sendGSPSessionInit(GarenaInterface.java:478)
[GInterface 2] Autoset peerport=3389    at gcb.Main.initGarena(Main.java:246)

        at gcb.ConnectWorkerPool$ConnectWorker.run(ConnectWorkerPool.java:100)
[GInterface 2] Sending GSP session init...
[GInterface 2] Encryption error in sendGSPSessionInit: null
Exception in thread "Thread-3" java.lang.NullPointerException
        at gcb.GarenaInterface.sendGSPSessionInit(GarenaInterface.java:478)
        at gcb.Main.initGarena(Main.java:246)
        at gcb.ConnectWorkerPool$ConnectWorker.run(ConnectWorkerPool.java:100)
[GInterface 5] Using local port: 45032
[GInterface 5] Initializing peer socket...
[GInterface 5] Autoset peerport=2099
[GInterface 5] Sending GSP session init...
[GInterface 5] Encryption error in sendGSPSessionInit: null
Exception in thread "Thread-6" java.lang.NullPointerException
        at gcb.GarenaInterface.sendGSPSessionInit(GarenaInterface.java:478)
        at gcb.Main.initGarena(Main.java:246)
        at gcb.ConnectWorkerPool$ConnectWorker.run(ConnectWorkerPool.java:100)
[GInterface 7] Using local port: 56797
[GInterface 7] Initializing peer socket...
[GInterface 7] Autoset peerport=6453
[GInterface 7] Sending GSP session init...
[GInterface 7] Encryption error in sendGSPSessionInit: null
Exception in thread "Thread-8" java.lang.NullPointerException
        at gcb.GarenaInterface.sendGSPSessionInit(GarenaInterface.java:478)
        at gcb.Main.initGarena(Main.java:246)
        at gcb.ConnectWorkerPool$ConnectWorker.run(ConnectWorkerPool.java:100)
[GInterface 8] Using local port: 34185
[GInterface 8] Initializing peer socket...
[GInterface 8] Autoset peerport=6293
[GInterface 8] Sending GSP session init...
[GInterface 8] Encryption error in sendGSPSessionInit: null
Exception in thread "Thread-9" java.lang.NullPointerException
        at gcb.GarenaInterface.sendGSPSessionInit(GarenaInterface.java:478)
        at gcb.Main.initGarena(Main.java:246)
        at gcb.ConnectWorkerPool$ConnectWorker.run(ConnectWorkerPool.java:100)
[GInterface 4] Using local port: 53202
[GInterface 4] Initializing peer socket...
[GInterface 4] Autoset peerport=5652
[GInterface 4] Sending GSP session init...
[GInterface 4] Encryption error in sendGSPSessionInit: null
Exception in thread "Thread-5" java.lang.NullPointerException
        at gcb.GarenaInterface.sendGSPSessionInit(GarenaInterface.java:478)
        at gcb.Main.initGarena(Main.java:246)
        at gcb.ConnectWorkerPool$ConnectWorker.run(ConnectWorkerPool.java:100)
[STATUS] connected: 0; mem: 494080 KB; threads: 23; rooms/users: 8/0; up: 10s
[STATUS TCP] r%: NaN; rx b/p: NaN; tx b/p: NaN; pps: 0,0

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: How to Compile?
« Reply #11 on: February 11, 2015, 04:22:56 pm »
It seems like your crypt field in GarenaInterface is null for whatever reason.

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #12 on: February 12, 2015, 01:55:52 am »
Compile me with a slight modification.

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #13 on: March 01, 2015, 07:11:41 pm »
Hello. Compile me please with these changes https://github.com/uakfdotb/gcb/issues/28#issuecomment-72589902

Artyom91

  • Advanced Member
  • ****
  • Posts: 257
  • Karma: +2/-43
    • View Profile
Re: How to Compile?
« Reply #14 on: April 13, 2015, 06:47:23 am »
I am run command:
Code: [Select]
java -classpath .:../bin/lib/* gcb.Main
all is well.

How do I do now file gcb.jar?