Could not find mainclass....
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 3
- Joined: Mon Jan 13, 2014 6:28 pm
Could not find mainclass....
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision 6346:
L2JDP Revision 10125:
Heyhey everyone, maybe you guys can help me.
so, i've installed (&re-installed) everything, searched in google for tipps and tried myself, but everytime i want to start the new startLoginServer.bat it can't find the main class.
i'm using Eclipse 4.3 and i already updated all things (like svnkit and all these things)
hope someone can help me - Maybe it's just a little mistake in my settings because i never worked a lot with eclipse (i hope so) /:
ยป Find Revision
L2J Revision 6346:
L2JDP Revision 10125:
Heyhey everyone, maybe you guys can help me.
so, i've installed (&re-installed) everything, searched in google for tipps and tried myself, but everytime i want to start the new startLoginServer.bat it can't find the main class.
i'm using Eclipse 4.3 and i already updated all things (like svnkit and all these things)
hope someone can help me - Maybe it's just a little mistake in my settings because i never worked a lot with eclipse (i hope so) /:
-
- Posts: 257
- Joined: Thu Dec 16, 2010 5:16 am
Re: Could not find mainclass....
I suppose you are just trying to run "startLoginServer.bat" from console window and you already changed into your login directory, right?
That login directory is supposed to have "l2jlogin.jar" amongst other files. If that file is invalid for whatever reason, it might not be able to find the class, which contains the Main-method.
1. check your "l2jlogin.jar" file in server\login - if it's not there, you might have a problem
2. if it's not there, you must either create it (using build.xml of L2J_Server_BETA project) or check it out from e.g. a nightly build (or whatever revision works for you)
To compile it, you need to either set up ant separately, switch into console window (cmd.exe for example) and your L2J_Server_BETA directory and then run ant there (I don't remember the exact command line) or - which might be easier for you - create a workspace in Eclipse, import L2J_Server_BETA and L2J_DataPack_BETA into it and drag the build.xml into ant view. Then you just execute default ant target and it should create new files in L2J_Server_BETA\build folder. There you can find all the files you need. Your best bet would be to copy them over into appropriate folders of your server folder.
That login directory is supposed to have "l2jlogin.jar" amongst other files. If that file is invalid for whatever reason, it might not be able to find the class, which contains the Main-method.
1. check your "l2jlogin.jar" file in server\login - if it's not there, you might have a problem
2. if it's not there, you must either create it (using build.xml of L2J_Server_BETA project) or check it out from e.g. a nightly build (or whatever revision works for you)
To compile it, you need to either set up ant separately, switch into console window (cmd.exe for example) and your L2J_Server_BETA directory and then run ant there (I don't remember the exact command line) or - which might be easier for you - create a workspace in Eclipse, import L2J_Server_BETA and L2J_DataPack_BETA into it and drag the build.xml into ant view. Then you just execute default ant target and it should create new files in L2J_Server_BETA\build folder. There you can find all the files you need. Your best bet would be to copy them over into appropriate folders of your server folder.

I don't mind helping - however: I only do so if I want to.
No support for other server packs than L2J.
-
- Posts: 3
- Joined: Mon Jan 13, 2014 6:28 pm
Re: Could not find mainclass....
right there is my problem, everything is in the Folder and the usual (already compiled version) of l2j server works perfectly.
But if i compile it by myself (build.xml->Run As->Ant) it has this error.
You can try with Teamviewer if u want >-<
But if i compile it by myself (build.xml->Run As->Ant) it has this error.
You can try with Teamviewer if u want >-<
-
- Posts: 76
- Joined: Mon May 02, 2011 10:19 am
- Location: Paris, France
- Contact:
Re: Could not find mainclass....
Hello, try to use only 32 bits version of all your development softwares: eclipse, Java, Java JDK, SVN client, ...
It worked for me
It worked for me
French touch.
-
- Posts: 257
- Joined: Thu Dec 16, 2010 5:16 am
Re: Could not find mainclass....
I use 64 bit Java and Eclipse and it works.
Please post the exact error message and the log of when you build the L2J_Server_BETA.zip. Also if a l2jserver.jar is created, please go inside this file, into META-INF folder and post your MANIFEST.MF.
Mine looks like this:
We have to track down the reason why it won't find the class.
Please post the exact error message and the log of when you build the L2J_Server_BETA.zip. Also if a l2jserver.jar is created, please go inside this file, into META-INF folder and post your MANIFEST.MF.
Mine looks like this:
Code: Select all
Manifest-Version: 1.0Ant-Version: Apache Ant 1.8.4Created-By: 1.7.0_25-b17 (Oracle Corporation)Built-By: HyreliusBuilt-Date: 15/01/2014 08:10Implementation-URL: http://www.l2jserver.com/Implementation-Version: 6337M

I don't mind helping - however: I only do so if I want to.
No support for other server packs than L2J.
-
- L2j Veteran
- Posts: 1228
- Joined: Thu Jan 17, 2013 9:46 am
- UnAfraid
- L2j Veteran
- Posts: 4199
- Joined: Mon Jul 23, 2007 4:25 pm
- Location: Bulgaria
- Contact:
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: Could not find mainclass....
Why would not having an svn client installed create this error? If that really is the cause, it should be fixed on l2j side.UnAfraid wrote:Just install svn client
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
- UnAfraid
- L2j Veteran
- Posts: 4199
- Joined: Mon Jul 23, 2007 4:25 pm
- Location: Bulgaria
- Contact:
Re: Could not find mainclass....
Because when u don't have svn client installed eclipse's ant builder corrupt's meta-data with that message about missing svn client..jurchiks wrote:Why would not having an svn client installed create this error? If that really is the cause, it should be fixed on l2j side.UnAfraid wrote:Just install svn client
- Zoey76
- L2j Inner Circle
- Posts: 7008
- Joined: Tue Aug 11, 2009 3:36 am
Re: Could not find mainclass....
That's only because we fetch logs, I think that should be removed.UnAfraid wrote:Because when u don't have svn client installed eclipse's ant builder corrupt's meta-data with that message about missing svn client..jurchiks wrote:Why would not having an svn client installed create this error? If that really is the cause, it should be fixed on l2j side.UnAfraid wrote:Just install svn client
Powered by Eclipse 4.34
| Eclipse Temurin 21
| MariaDB 11.3.2
| L2J Server 2.6.3.0 - High Five 
Join our Discord! 

- UnAfraid
- L2j Veteran
- Posts: 4199
- Joined: Mon Jul 23, 2007 4:25 pm
- Location: Bulgaria
- Contact:
Re: Could not find mainclass....
Actually no.. its not because of this..Zoey76 wrote:That's only because we fetch logs, I think that should be removed.
its because of:
Code: Select all
<manifest>ย ย <attribute name="Built-By" value="${user.name}" />ย ย <attribute name="Built-Date" value="${build.tstamp}" />ย ย <attribute name="Implementation-URL" value="http://www.l2jserver.com/" />ย ย <attribute name="Implementation-Version" value="${l2j.version}" /> <!-- THIS --></manifest>
- Zoey76
- L2j Inner Circle
- Posts: 7008
- Joined: Tue Aug 11, 2009 3:36 am
Re: Could not find mainclass....
Well, logs require svn client to perform the ant task too.UnAfraid wrote:Actually no.. its not because of this..Zoey76 wrote:That's only because we fetch logs, I think that should be removed.
its because of:Code: Select all
<manifest>ย ย <attribute name="Built-By" value="${user.name}" />ย ย <attribute name="Built-Date" value="${build.tstamp}" />ย ย <attribute name="Implementation-URL" value="http://www.l2jserver.com/" />ย ย <attribute name="Implementation-Version" value="${l2j.version}" /> <!-- THIS --></manifest>
Powered by Eclipse 4.34
| Eclipse Temurin 21
| MariaDB 11.3.2
| L2J Server 2.6.3.0 - High Five 
Join our Discord! 

- tukune
- Posts: 533
- Joined: Sun Mar 29, 2009 2:35 pm
- Location: Japan
Re: Could not find mainclass....

Code: Select all
- <exec dir="${basedir}" executable="svnversion" outputproperty="l2j.version">+ <exec dir="${basedir}" executable="svnversion" outputproperty="l2j.version" logError="true" failifexecutionfails="false">