Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How to compile source with libs path and duplicate jar

Joined
Apr 16, 2007
Messages
441
Reaction score
204
create a .bat file and name it anything you want i created my file at "D:\BDEmu\Server\src\main\java" you must create this file at the root folder of the source files so it can compile them.

you must also change the paths of the code below to point to where your libs path are.

also copy gameserver.jar and make a duplicate but name it gameserver2.jar

inside the text file add this code:
Code:
   @[I][B][URL="http://forum.ragezone.com/members/2000220543.html"]rem[/URL][/B][/I] Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME="D:\BDEmu\Server\gameserver\bin"

set CLASSPATH=D:\BDEmu\Server\gameserver\lib\gameserver2.jar;D:\BDEmu\Server\gameserver\lib\tools.jar;D:\BDEmu\Server\gameserver\lib\bcprov-ext-jdk16-1.46.jar;D:\BDEmu\Server\gameserver\lib\thymeleaf-3.0.0.RELEASE.jar;D:\BDEmu\Server\gameserver\lib\nekohtml-1.9.22.jar;D:\BDEmu\Server\gameserver\lib\spark-core-2.6.0.jar;D:\BDEmu\Server\gameserver\lib\commons-codec-1.10.jar;D:\BDEmu\Server\gameserver\lib\lzma-java-1.3.jar;D:\BDEmu\Server\gameserver\lib\JDA-3.0.0_194.jar;D:\BDEmu\Server\gameserver\lib\lombok-1.16.16.jar;D:\BDEmu\Server\gameserver\lib\commons.jar;D:\BDEmu\Server\gameserver\lib\ognl-3.1.3.jar;D:\BDEmu\Server\gameserver\lib\javassist-3.20.0-GA.jar;D:\BDEmu\Server\gameserver\lib\attoparser-2.0.0.RELEASE.jar;D:\BDEmu\Server\gameserver\lib\unbescape-1.1.3.RELEASE.jar;D:\BDEmu\Server\gameserver\lib\slf4j-api-1.7.21.jar;D:\BDEmu\Server\gameserver\lib\xercesImpl-2.11.0.jar;D:\BDEmu\Server\gameserver\lib\jetty-server-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\jetty-webapp-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\websocket-server-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\websocket-servlet-9.4.4.v20170414.jar;D:\BDEmu\Server\gameserver\lib\commons-lang3-3.5.jar;D:\BDEmu\Server\gameserver\lib\commons-collections4-4.1.jar;D:\BDEmu\Server\gameserver\lib\json-20140107.jar;D:\BDEmu\Server\gameserver\lib\trove4j-3.0.3.jar;D:\BDEmu\Server\gameserver\lib\jna-4.2.2.jar;D:\BDEmu\Server\gameserver\lib\nv-websocket-client-2.0.jar;D:\BDEmu\Server\gameserver\lib\unirest-java-1.4.9.jar;D:\BDEmu\Server\gameserver\lib\sqlite-jdbc-3.16.1.jar;D:\BDEmu\Server\gameserver\lib\ws-commons-util-1.0.2.jar;D:\BDEmu\Server\gameserver\lib\commons-io-2.5.jar;D:\BDEmu\Server\gameserver\lib\commons-httpclient-3.1.jar;D:\BDEmu\Server\gameserver\lib\log4j-core-2.6.2.jar;D:\BDEmu\Server\gameserver\lib\log4j-slf4j-impl-2.6.2.jar;D:\BDEmu\Server\gameserver\lib\disruptor-3.3.6.jar;D:\BDEmu\Server\gameserver\lib\slf4j-ext-1.7.25.jar;D:\BDEmu\Server\gameserver\lib\gson-2.8.0.jar;D:\BDEmu\Server\gameserver\lib\mongo-java-driver-2.14.3.jar;D:\BDEmu\Server\gameserver\lib\ecj-4.6.1.jar;D:\BDEmu\Server\gameserver\lib\stringer-annotations-1.0.3.jar;D:\BDEmu\Server\gameserver\lib\jackson-core-2.9.0.pr3.jar;D:\BDEmu\Server\gameserver\lib\jackson-annotations-2.9.0.pr3.jar;D:\BDEmu\Server\gameserver\lib\jackson-databind-2.9.0.pr3.jar;D:\BDEmu\Server\gameserver\lib\classindex-3.4.jar;D:\BDEmu\Server\gameserver\lib\xml-apis-1.4.01.jar;D:\BDEmu\Server\gameserver\lib\javax.servlet-api-3.1.0.jar;D:\BDEmu\Server\gameserver\lib\jetty-http-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\jetty-io-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\jetty-xml-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\jetty-servlet-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\websocket-common-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\websocket-client-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\httpclient-4.5.2.jar;D:\BDEmu\Server\gameserver\lib\httpasyncclient-4.1.2.jar;D:\BDEmu\Server\gameserver\lib\httpmime-4.5.2.jar;D:\BDEmu\Server\gameserver\lib\junit-4.12.jar;D:\BDEmu\Server\gameserver\lib\log4j-api-2.6.2.jar;D:\BDEmu\Server\gameserver\lib\jetty-util-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\jetty-security-9.3.14.v20161028.jar;D:\BDEmu\Server\gameserver\lib\httpcore-4.4.5.jar;D:\BDEmu\Server\gameserver\lib\httpcore-nio-4.4.5.jar;D:\BDEmu\Server\gameserver\lib\hamcrest-core-1.3.jar;D:\BDEmu\Server\gameserver\lib\commons-logging-1.2.jar;D:\BDEmu\Server\gameserver\lib\websocket-api-9.4.4.v20170414.jar;D:\BDEmu\Server\gameserver\lib\netty-all-4.1.12.Final.jar;D:\BDEmu\Server\gameserver\lib\commons-math3-3.6.1.jar >> log.txt

for /r %%a in (*.java) do ( "C:\Program Files\Java\jdk1.8.0_112\bin\javac" "%%a" )


compile.PNG - How to compile source with libs path and duplicate jar - RaGEZONE Forums

make sure the javac part of the code points to where you installed your javac.


once you have created this file just run it to compile everything in your source folder to .class file everytime you modify the source and want to update the server files you must compile to .class first before you can import to Eclipse Neon to create a .jar file

Download Eclipse Neon or the other available version from:


install and import source into Eclipse and export to .jar files must be compiled to .class first before you export or else it will not run.

compile2.PNG - How to compile source with libs path and duplicate jar - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Experienced Elementalist
Joined
Jun 17, 2014
Messages
273
Reaction score
33
*total noob*

What is this for ? When would we have to use such a script ?

Thanks !
 
Joined
Apr 16, 2007
Messages
441
Reaction score
204
*total noob*

What is this for ? When would we have to use such a script ?

Thanks !

The current server files is an emulator which has bugs and isn't perfect, but included with the files is the source code for the server files so we can modify and change existing code for the better and in order to compile the files once the change has been made you would have to follow the steps in this guide.
 
Joined
Apr 16, 2007
Messages
441
Reaction score
204
Ty for help @Aznkidd235

I've this error when I'm trying to compile, is that normal?

most likely the .bat can't find the libs double check the paths, then open mainserver.java check where startup and gameserverRMI and the other .java dependencies are located. in order to compile correctly all the files needs to be in the correct paths.
 
Joined
Apr 16, 2007
Messages
441
Reaction score
204
and the source code of Loginserver?
use CFR decompiler to decompile the source of login.jar located in the loginserver/libs/ folder if the files are .java just edit compile to .class and compile through Eclipse or which program you prefer.

edit:
sry made a mistake located at loginserver/libs/

honestly tho login server only handles login game server is where bugs and fixing is required.

@FredZem

i uploaded the login source here:
http://forum.ragezone.com/f1000/release-bdo-login-server-source-1143207/


just follow this compile guide to compile it.
 
Last edited:
Junior Spellweaver
Joined
May 18, 2014
Messages
151
Reaction score
57
I'm not sure if it's ok but I just rename gameserver2.jar (in bat) to gameserver.jar.
 
Newbie Spellweaver
Joined
Nov 25, 2009
Messages
34
Reaction score
8
Renamed the gameserver2.jar to gameserver.jar at the bat, works!
Okay that bat took awhile running creating class. maybe my pc is bad lol.

So I've downloaded eclipse java oxygen, import the com folder as shown below.
kzgIl3jm - How to compile source with libs path and duplicate jar - RaGEZONE Forums

and then export.

Should I export is as Java - Jar files and then finish like this below?
axh7yCe - How to compile source with libs path and duplicate jar - RaGEZONE Forums


Oh! and after that where should I put the jar file?
 

Attachments

You must be registered for see attachments list
Joined
Apr 16, 2007
Messages
441
Reaction score
204
my bad guys i renamed my gameserver.jar to gameserver2.jar so that i didn't replace the original.

i updated the first post.
 
Last edited:
Skilled Illusionist
Joined
Dec 4, 2013
Messages
353
Reaction score
56
@Aznkidd235 I cannot compile ai/conditions folder, any help about this? I think is for this import but I'm not sure that what i can do for fix "import com.eclipsesource.json.JsonObject;"

 
Joined
Apr 16, 2007
Messages
441
Reaction score
204
@Aznkidd235 I cannot compile ai/conditions folder, any help about this? I think is for this import but I'm not sure that what i can do for fix "import com.eclipsesource.json.JsonObject;"

delete it if u checked those files they are 0kb with nothing inside them when u delete them close project and re-open to refresh it.
 
Back
Top