!!

Register new account or login on the forum!

To have a full access of the forum please create a new account! Click here or login with your account Click here.

collapse

Support us!

Support membergroup

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Topics

* Who's Online

  • Dot Guests: 321
  • Dot Spiders: 0
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Author Topic: Development workflow (hot deploy)  (Read 31186 times)

0 Members and 5 Guests are viewing this topic.

Offline ruke

  • *
  • Posts: 2
  • Karma: +0/-0
  • L2jFrozen Newbie
Development workflow (hot deploy)
« on: October 24, 2017, 04:17:12 PM »
Note: I wrote this guide for l2jserver, but it should work the same for Frozen. Let me know if you run into issues.

Hi, I just recently started working on L2J and while I was implementing a few custom features in the server I found the development workflow quite awful since I had to make quite a lot of steps to actually see my changes: change the code -> compile -> update files -> shutdown server -> start server -> login again -> see the changes in game.

So, I wanted a change, I only wanted to follow these steps: change code -> compile -> see changes in game. And luckily I was able to accomplish it.

What do you need?
- A working server
- The sources of the l2jserver/frozen (obviously)

Steps

1 - In your source folder, you need the gameserver/config and gameserver/data folders from YOUR WORKING SERVER. You can do this by copying the folders or create a symbolic link so any changes you made to those folders are reflected without having to copy/paste again.



2 - Download DCEVM (light) for Java 8u144 (build 2)

3 - Download HotswapAgent

4 - Download JDK 8u144

5 - Install JDK 8

6 - Open a command line with administrator permissions:



7 - In your command line, go to the folder where you downloaded DCEVM (light) for Java 8u144 (build 2) and run it:

Code: [Select]
$ cd path/to/your/DCEVM (light) for Java 8u144 (build 2)
$ java -jar DCEVM-8u144-installer.jar

8 - Once the application opens, select your JDK 8 and click Install DCEVM as altjvm:



Perfect, almost done!

9 - Open your IDE, and go to the Run configurations



10 - Complete with the following:

Name: GameServer Hotswap

Main class: net.sf.l2j.gameserver.GameServer (if you cannot find it, try searching for gameServer.GamesServer)

VM Options: -XXaltjvm=dcevm -javaagent:PATH\TO\hotswap-agent.jar

JRE: Make sure you have selected JDK 1.8.0.144



11 - Go to your gameServer.GameServer class, and make sure the logs line are commented:



12 - Start your loginServer as usual.

13 - Go to your IDE, and run GameServer Hotswap (from step 10)

14 - Your server should be up, try login with a character.

15 - If you succeed, perfect, now the exciting part, let's make a tiny change. Go to java/net/sf/l2j/gameserver/clientpackets/EnterWorld.java class and add this line to runImpl method, in the line 108:

Code: [Select]
activeChar.sendMessage("Hello from HOTDEPLOY!");
16 - Save the file, and rebuild the project:



You should have a message that a class was updated.
Great, our change is already on, go to your server, login with a character and:



Did you notice? no downtime!

Hope it helps. Happy to help if anyone cannot do it.

Have a good day.

Offline ReynalDev

  • *
  • *
  • Posts: 206
  • Karma: +0/-0
  • Gender: Male
  • Freelancer
    • ReynalDev
Re: Development workflow (hot deploy)
« Reply #1 on: October 24, 2017, 07:51:06 PM »
Wow!! Nice guide but this only work when you are in development because in a real server (Production) doesn't have any sense install all those programs.  ;D

Offline ruke

  • *
  • Posts: 2
  • Karma: +0/-0
  • L2jFrozen Newbie
Re: Development workflow (hot deploy)
« Reply #2 on: October 25, 2017, 12:54:36 AM »
Right, this is only for development ^^

Offline ReynalDev

  • *
  • *
  • Posts: 206
  • Karma: +0/-0
  • Gender: Male
  • Freelancer
    • ReynalDev
Re: Development workflow (hot deploy)
« Reply #3 on: October 25, 2017, 01:07:36 AM »
Right, this is only for development ^^

Thanks for share!  ;)

Offline Nefer

  • *
  • Posts: 275
  • Karma: +0/-0
  • Gender: Male
  • Electric & Electronic engineer
    • Interlude c6 project
Re: Development workflow (hot deploy)
« Reply #4 on: October 25, 2017, 09:13:27 AM »
Nice work, i always accept guide from our community.  ;)

 


* l2jfrozen shoutbox

Refresh History
  • Please don't use the shoutbox for question, create new topic for it!
  • reptylius1: alguien sabe como liberar sub de OL en L2JFrozen
    September 06, 2026, 12:05:05 AM
  • gerry9619: join my test server [link]
    June 20, 2026, 02:32:42 PM
  • gerry9619: any people out there that are building on this source?
    June 20, 2026, 11:22:10 AM
  • emanuel13041991: buenos dias estoy intentando compilar el svn y me pide cuenta y contraseña del svn alguien me dice como arreglar eso
    June 14, 2026, 05:29:45 PM
  • MarceloW: Hi, does anyone have the fix for private store sell (1132)?
    April 20, 2026, 04:28:25 PM
  • awwDenis: @Nefer come back dude ...
    April 13, 2026, 11:39:25 PM
  • awwDenis: Nefer are you back ? pls say yes!!!
    April 13, 2026, 10:45:23 PM
  • streetgamer: Hello Folks!
    February 22, 2026, 04:35:52 PM
  • perrodelakalle: Hi Peolple. I want to create my own local server. I did in the pass but today I dont know what to do well. I want yo find the best information here
    January 24, 2026, 07:03:54 PM
  • Nefer: Did a little forum cleanup :))
    January 21, 2026, 08:42:51 AM
  • AgusBarone: [link] Ahi esta el compilado y el source se tiene que importar desde el svn y se compila con eclipse... hasta ahi llega mi conocimiento xd
    October 19, 2025, 02:58:10 AM
  • habock: no tengo el core, solo el datapack ya finaalizado, necesitaria los archivos necesarios para copiar y pegar
    June 11, 2025, 07:29:44 AM
  • habock: Hola, gente hermosa, necesito una super ayuda uso rev 1132 quiero quitar todas las restricciones de sub, como overlord-warsmith y elfos blancos y oscuros
    June 11, 2025, 07:22:20 AM
  • Awwdenis94: Good old days.
    June 08, 2025, 12:41:41 AM
  • walter: inicie 1 topic,pueden verlo???
    April 03, 2025, 01:46:44 AM
  • walter: buenas
    April 03, 2025, 01:46:14 AM
  • djelias: When the source will be able for use?>
    March 17, 2025, 06:47:22 PM
  • dakayoshin: Hello everyone, I would like to know how the frozen v2 project is going. I would also like to acquire access to the project.
    March 10, 2025, 10:46:36 PM
  • djelias: Cool
    March 09, 2025, 08:29:13 PM
  • Awwdenis94: Let’s make L2JFrozen Great Again!!!
    February 26, 2025, 10:35:10 PM