Hi,
when i try to run sfs2x.sh on my mac i got this error
Error: Could not find or load main class com.smartfoxserver.v2.Main
Caused by: java.lang.ClassNotFoundException: com.smartfoxserver.v2.Main
how can i fix this please
thanks in advance,
Error: Could not find or load main class com.smartfoxserver.v2.Main
-
- Posts: 5
- Joined: 08 Jun 2023, 07:23
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
Hi,
what version of SmartFoxServer are you using?
Also what macOS version are you using?
Although we recommend launching the server via the native app provided under the SFS2X/ folder you can also use the sfs2x.sh script, which is expected to work out of the box (unless you have moved other files around).
Thanks
what version of SmartFoxServer are you using?
Also what macOS version are you using?
Although we recommend launching the server via the native app provided under the SFS2X/ folder you can also use the sfs2x.sh script, which is expected to work out of the box (unless you have moved other files around).
Thanks
-
- Posts: 5
- Joined: 08 Jun 2023, 07:23
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
smartfox version : SFS2X_macos_2_19_0
macOS version : ventura 13.4
i didn’t move any folders actually i removed smartfox and re installed it
then i tried to use sfs2x.sh
and still getting this error
Error: Could not find or load main class com.smartfoxserver.v2.Main
Caused by: java.lang.ClassNotFoundException: com.smartfoxserver.v2.Main
thanks in advance,
macOS version : ventura 13.4
i didn’t move any folders actually i removed smartfox and re installed it
then i tried to use sfs2x.sh
and still getting this error
Error: Could not find or load main class com.smartfoxserver.v2.Main
Caused by: java.lang.ClassNotFoundException: com.smartfoxserver.v2.Main
thanks in advance,
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
Thanks,
we have tested on numerous macOS versions, including Ventura and there is no problem.
Can you run the the server via the SFS2X app?
Thanks
we have tested on numerous macOS versions, including Ventura and there is no problem.
Can you run the the server via the SFS2X app?
Thanks
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
@moustafaSamy are you starting the script via double-click from Finder? This will generally set the working directory to your Home directory instead of the SFS2X directory which could lead to relative path problems. Try starting it in a terminal window instead if this is the case, or like Lapo said, use the mac native app instead.
-
- Posts: 5
- Joined: 08 Jun 2023, 07:23
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
Hi,
i run the script via terminal bash <drag and drop the script>
i also tried to run the SFS2X app instead and it worked but when i replace the extensions and lib folders with the ones for my game server to run a local test and then run the SFS2X app again i got the same error on the app
i run the script via terminal bash <drag and drop the script>
i also tried to run the SFS2X app instead and it worked but when i replace the extensions and lib folders with the ones for my game server to run a local test and then run the SFS2X app again i got the same error on the app
- Attachments
-
- Screenshot 2023-06-08 at 3.56.58 PM.png
- (206.84 KiB) Not downloaded yet
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
moustafaSamy wrote:Hi,
i run the script via terminal bash <drag and drop the script>
You should cd into the folder and the run the script:
Code: Select all
cd <SFS2X-Installation>/SFS2X/
./sfs2x.sh
i also tried to run the SFS2X app instead and it worked but when i replace the extensions and lib folders with the ones for my game server to run a local test and then run the SFS2X app again i got the same error on the app
the SFS2X/lib/ folder should not be replaced. In there are locate all the necessary files and libraries to run the server.
You should deploy your Extensions and extensions libraries under SFS2X/extensions/ and SFS2X/extesions/__lib__/ respectively
Cheers
-
- Posts: 5
- Joined: 08 Jun 2023, 07:23
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
ok when i dont replace lib folder it works fine
however i cant run my local test
so do you mean i should
-copy extensions folder content from (deploy/extensions) to (SFS2X/extensions)
-copy lib folder content from (deploy/lib) to (SFS2X/extensions/__lib__)
or i am doing it wrong ?
thanks in advance
however i cant run my local test
so do you mean i should
-copy extensions folder content from (deploy/extensions) to (SFS2X/extensions)
-copy lib folder content from (deploy/lib) to (SFS2X/extensions/__lib__)
or i am doing it wrong ?
thanks in advance
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
I don't know what IDE you're using, but in any case once you have generated your jar file you should follow the documentation here:
http://docs2x.smartfoxserver.com/Extens ... uick-start
Cheers
http://docs2x.smartfoxserver.com/Extens ... uick-start
Cheers
-
- Posts: 5
- Joined: 08 Jun 2023, 07:23
Re: Error: Could not find or load main class com.smartfoxserver.v2.Main
thanks alot
you can consider this done
its working now
you can consider this done
its working now
Who is online
Users browsing this forum: No registered users and 99 guests