!!

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?

* Who's Online

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

There aren't any users online.

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

0 Members and 1 Guest 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: 207
  • 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: 207
  • 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: 276
  • 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!
  • ReDBullz0r: why cant i compile the pack through eclipse? its asking for a username and password
    February 04, 2024, 09:52:17 PM
  • warc222: Shyla Shyla hi why don't you start developing high five classic Interlude there are no such good builds
    January 12, 2024, 08:32:55 PM
  • warc222: lineage 2 classic interlude 110 protocol
    January 05, 2024, 03:27:23 AM
  • warc222: hi shilay, could you use Lineage 2 classic Interlude or another version of the game Lineage 2 essence as a basis?
    January 05, 2024, 03:26:04 AM
  • L2Saturn: Manye 30 years old want get some old times back, we not need kids in L2 :D Interlude BEST
    December 20, 2023, 09:33:56 PM
  • Shyla: Guys, sorry but life requires time I did not know when I started to work on frozen. Linwage had been my passion, but I have not such time to work on again. More, the game itself now is just for who played in the past, is not attractive for new generations, so I dont think it's good decision to restart to work on that
    December 18, 2023, 06:38:36 PM
  • warc222: aunty aunty when will the work be updated??
    December 17, 2023, 01:08:18 PM
  • warc222: oo hi shila, we will be waiting for you near your house with a pitchfork so that you can start doing the project again
    December 17, 2023, 01:07:22 PM
  • Shyla: I know that xD
    November 28, 2023, 01:31:06 PM
  • L2Saturn: is this project die? L2JFrozen reborn please fuck off all other Project Frozen was the best since years!
    November 22, 2023, 04:14:00 PM
  • markus24: sweep festiv
    July 05, 2023, 06:03:49 AM
  • gatos: how to compile
    October 30, 2022, 12:50:22 PM
  • criss282828: A tutorial about how to compile? What Java JDK i need? Still compile with SVN?
    April 25, 2022, 02:18:13 AM
  • Damon: [link] - INTERLUDE server FILES (Pack) Recommend our files and get a REAL MONEY: [link]
    March 16, 2022, 01:08:50 PM
  • Damon: [link] - INTERLUDE server FILES (Pack) Recommend our files and get a REAL MONEY: [link]
    March 16, 2022, 01:08:45 PM
  • Damon: [link] - INTERLUDE server FILES (Pack) Recommend our files and get a REAL MONEY: [link]
    March 16, 2022, 01:08:39 PM
  • pabblo525: donde se descarga el datapack 1.5
    February 13, 2022, 05:04:45 PM
  • Dan: I need an interlude pack with customs (acis is retail with nothing)
    November 13, 2021, 04:46:49 PM
  • Dan: is this project alive or what?
    November 13, 2021, 04:46:23 PM
  • kaisan34: Hola alguien que hable en espaƱol?
    September 25, 2021, 07:56:46 PM