Anyone lucky enough to get extensions working?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
AlaskanDruid
Posts: 10
Joined: 06 Aug 2024, 01:26

Anyone lucky enough to get extensions working?

Post by AlaskanDruid »

The problem I am having right now is that the sfs2x.jar and sfs2x-core.jar files do not have accessible classes in Eclipse.

Following the instructions found @ https://docs2x.smartfoxserver.com/Exten ... extensions

Even after rebooting Eclipse, when tryin to simply import:

import com.smartfoxserver.*;

or:

import com.smartfoxserver.v2.extensions.*;

or even:

import com.smartfoxserver.v2.extensions.SFSExtension;

Eclipse claims...

"The package com.smartfoxserver is not accessible"


Autocomplete works properly.. nothing else does.

Ah! Steps to duplicate this issue:

1. Install SmartFoxServer.
2. Install newest patch.
3. Install Eclipse.
4. Follow instructions found @ https://docs2x.smartfoxserver.com/Exten ... extensions
5. Error/Issue occurs at the following step:

"Finally we have created our main Extension class; we can now proceed adding some very basic code like the following picture shows."
AlaskanDruid
Posts: 10
Joined: 06 Aug 2024, 01:26

Re: Anyone lucky enough to get extensions working?

Post by AlaskanDruid »

After doing more searches. This is a massive bug with Java 11. Therefore Java 11 is non-viable for any kind of development... The SFS documentation linked above claimed you can use java 8 or 11. This is incorrect. Only 8 is actually usable.

Once I downgraded the runtime from 11 to 8, everything in the instructions worked as expected.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Anyone lucky enough to get extensions working?

Post by Lapo »

Hi,
This is a massive bug with Java 11. Therefore Java 11 is non-viable for any kind of development


Sorry but I don't really think so. We have worked on SFS2X in Java 11 for years and still do, and so do our customers. There is no such problem. What is more likely is that there's an issue with your specific setup but you will need to give us more details as to what errors you have encountered.

In order to provide the necessary details please take a look here:
viewtopic.php?f=18&t=16497

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply