Jump to content
  • 0

Error "could Not Find Or Load Main Class.."


Question

Posted

Hello everyone. If someone can help me in my problem. I've got old l2j server files (IL pack by lightmagik from 2008) and it works fine. I wanted to run my server on some newer files so I downloaded some server and data packs (Frost, aCis or L2J datapack and server from official l2server site) but it won't run. I've got error "could not find or load main class net.sf.l2j.gsregistering.gameserverregister" in all this versions.. What I'm doing wrong? I need maybe something else except server and datapacks? Maybe I extract files to wrong directories? Really I don't know.. I tried on another computer and it's the same..

Please help me in solving this..

 

Regards, Matt

7 answers to this question

Recommended Posts

  • 0
Posted

You have to set the compiler to jdk. Windows -> Preferences -> Java -> installed jres and press "Add" -> select jdk from program files and then select it and you are done.

 

Old l2j int is using java 6 I guess, so you have to uninstall your java 8 and install JDK 6. But, I suggest you to use aCis with java 7. https://xp-dev.com/svn/aCis_community/

  • 0
Posted

Hello mate..

 

Because i don't understand well what you said about "aCis or L2J datapack and server from official l2server site", i have a question..

You use for example aCis datapack files, and gameserver files from other project?

If yes, you can't do this.. The reasons is many.. For example, the scripts running via some java files and is not same from a project to other..

 

Here now...

error "could not find or load main class net.sf.l2j.gsregistering.gameserverregister"

Maybe you run the acis source files who downloaded on internet and is not compiled.. So, you trying to run the files from gameserver/disk..
If you do compile the source files, you can run it from "gameserver/build/dist".

 

Take a look in this topic and the posts of topic..

 

  • 0
Posted (edited)

Thank you for answers guys,

How can I compile server and datapack? Of course I dont mix projects.

I used this for example :

 

https://github.com/L2J/L2J_Server/tree/Interlude

https://github.com/L2J/L2J_DataPack/tree/Interlude

 

I have to compile it?

 

btw. I dont have build folders in any of these packs..

Edited by chckm8
  • 0
Posted

Hi again,

I tried to build this files by mysefl first time via Eclipse. I've got error:

Buildfile: C:\Users\mat\git\L2J_Server\L2J_Server\build.xml
clean:
   [delete] Deleting directory C:\Users\mat\git\L2J_Server\L2J_Server\build
init:
    [mkdir] Created dir: C:\Users\mat\git\L2J_Server\L2J_Server\build
    [mkdir] Created dir: C:\Users\mat\git\L2J_Server\L2J_Server\build\classes
    [mkdir] Created dir: C:\Users\mat\git\L2J_Server\L2J_Server\build\dist
    [mkdir] Created dir: C:\Users\mat\git\L2J_Server\L2J_Server\build\dist\login
    [mkdir] Created dir: C:\Users\mat\git\L2J_Server\L2J_Server\build\dist\gameserver
compile:

BUILD FAILED
C:\Users\mat\git\L2J_Server\L2J_Server\build.xml:51: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre1.8.0_40"

Total time: 805 milliseconds
  • 0
Posted (edited)

Okay, locked then.

 

 

PS: Jeżeli planujesz stawiać serwer, odradzam czyste l2j, jest po prostu "za stare" ;)

Edited by SweeTs
  • Haha 1
Guest
This topic is now closed to further replies.


  • Posts

    • I think that solves the freeze thing, anyway great share! 
    • Introducing: Daily & Weekly Missions!   I've released a major panel update with a new Missions system and expanded language support.   Players can now complete daily and weekly missions directly through the panel and claim rewards such as balance or items. Mission progress is tied to in-game activity and supported panel actions, and the update also adds a dedicated Missions page, dashboard mission previews, claimable mission indicators, and full admin tools for creating and managing missions.   The Roll page now shows the potential reward drops below the roll container.   Alongside this, I’ve expanded the panel’s language support with new locale options, including Bulgarian, Czech, Georgian, Lithuanian, Polish, Romanian, Japanese, Simplified Chinese, and Traditional Chinese.     The Demo is now updated with the new features for you to try out!
    • I sell complete packs. If you want to add an item, NPC, etc., you have to do that yourselves. Your friend bought the pack; he's the one who needs to configure his server type. He received what he bought as agreed, and I'm saying this without knowing who you're talking about, because anyone who buys something receives what was agreed upon.   Regards. mmmmm L2Velmore ????   If that's the one, I see everything went well... if I remember correctly you were crying over $100, I gave you a better price, and I suppose you made thousands with that... And you're still coming back to complain? :=)
    • I know many people have struggled with this specific issue and had trouble setting up the correct behavior for Toggle skills in aCis. By default, toggles interrupt the player's movement (retail-like), which often feels clunky to players who prefer a smoother, more modern experience. I've prepared a clean solution that eliminates this "freeze" and allows for fluid movement while toggling your auras. Below is the code on how to achieve this. Hope it helps! Changes in PlayerAI.java: Modified doActiveIntention to properly update the active state without stalling. Removed the forced stop() during toggle casting. Added a MoveToLocation broadcast to ensure other players see your movement correctly (prevents visual "teleporting" or desync). Best regards 😃 diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java index ba0425a..1b2658d 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/ai/type/PlayerAI.java @@ -28,6 +28,7 @@  import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;  import net.sf.l2j.gameserver.network.serverpackets.AutoAttackStart;  import net.sf.l2j.gameserver.network.serverpackets.ChairSit; +import net.sf.l2j.gameserver.network.serverpackets.MoveToLocation;  import net.sf.l2j.gameserver.network.serverpackets.MoveToLocationInVehicle;  import net.sf.l2j.gameserver.network.serverpackets.MoveToPawn;  import net.sf.l2j.gameserver.network.serverpackets.StopMove; @@ -159,7 +160,10 @@      @Override      public synchronized void doActiveIntention()      { -        doIdleIntention(); +        prepareIntention(); +        _currentIntention.updateAsActive(); +        if (!getActor().isMoving()) +            thinkIdle();      }            @Override @@ -280,8 +284,9 @@                    if (skill.isToggle())          { -            getActor().getMove().stop();              getActor().getCast().doToggleCast(skill, target); +            if (getActor().isMoving()) +                getActor().broadcastPacket(new MoveToLocation(getActor()));          }          else          { https://pastebin.com/twZujZ3Y
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..