I have downloaded logica smpp siimulator source code. In the source code, it contains directory /com/logica/smscsim/*.java. I try to modify the code in Simulator.java in smscsim folder. So I modify the code and compile with command
javac -cp "lib/*:." Simulator.java
A class Simulator.class was successfully build. But when I try to run the code with the command
java -cp "lib/*:." Simulator
I got error java.lang.NoClassDefFoundError: Simulator (wrong name: com/logica/smscsim/Simulator)
Maybe it has something to do with the package. I successfully compile with old package with command java -cp "lib/*:." com.logica.smscsim.Simulator, but the problem is I need to modify the Simulator.java. I dont want to use the old com.logica.smscsim.Simulator. How do I use the newly created class for Simulator.java? Here's some code of Simulator.java that I successfully compiled, but fail to run:
public class Simulator
static final String copyright =
"Copyright (c) 1996-2001 Logica Mobile Networks Limited\n"+
"This product includes software developed by Logica by whom copyright\n"+
"and know-how are retained, all rights reserved.\n";
* Name of file with user (client) authentication information.
static String usersFileName = "users.txt";
* Directory for creating of debug and event files.
static final String dbgDir = "./";
* The debug object.
static Debug debug = new FileDebug(dbgDir,"sim.dbg");
* The event object.
static Event event = new FileEvent(dbgDir,"sim.evt");
public static final int DSIM = 16;
public static final int DSIMD = 17;
public static final int DSIMD2 = 18;
static BufferedReader keyboard =
new BufferedReader(new InputStreamReader(System.in));
* The main function of the application displays menu with available
public static void main(String args) throws IOException
Simulator menu = new Simulator();