Hello. Before i tried make JavaScript extention and all was right. I loaded it with out any problems. Now i begin studing Java and meet with one problem.
I wrote code, made .JAR files and move they to "extention/My" folder, but cant find them in list of avaible extentions. Can anyone say me a reason? =)
I think i did something wrong with packages in IDE.
P.S. Sorry for my bad English
Cant load my Java extention.
Re: Cant load my Java extention.
Hello,
make sure your jar file is named <Something>Extension.jar.
For example MyGameExtension.jar, or MyExtension.jar or WhateverExtension.jar.
Also add "Extension" at the end of the main class that extends SFSExtension.
Cheers.
make sure your jar file is named <Something>Extension.jar.
For example MyGameExtension.jar, or MyExtension.jar or WhateverExtension.jar.
Also add "Extension" at the end of the main class that extends SFSExtension.
Cheers.
Re: Cant load my Java extention.
Lol, first i think its joke, but it really work. Thank you)
-
- Posts: 45
- Joined: 24 Oct 2013, 14:17
Re: Cant load my Java extention.
hi, sorry to revive this post again, i just re-learn smartfox again
i'm having this problem but i already rename my jar to DGFServerExtension.jar , but i can't see anything in zone extension, is there anything i need to do? i use ecclipse Version: 2022-09 , with jdk 1.8 and windows smartfoxserve verson 2.19.
thanks
i'm having this problem but i already rename my jar to DGFServerExtension.jar , but i can't see anything in zone extension, is there anything i need to do? i use ecclipse Version: 2022-09 , with jdk 1.8 and windows smartfoxserve verson 2.19.
thanks
Re: Cant load my Java extention.
Hi,
when configuring the Zone in the AdminTool make sure the "Use naming convention" switch is turned off.
When it's on it will only show classes whose name end with "Extension"
That should be all. If it still doesn't work, make sure that the generated jar file really contain the classes you want to export.
Cheers
when configuring the Zone in the AdminTool make sure the "Use naming convention" switch is turned off.
When it's on it will only show classes whose name end with "Extension"
That should be all. If it still doesn't work, make sure that the generated jar file really contain the classes you want to export.
Cheers
-
- Posts: 45
- Joined: 24 Oct 2013, 14:17
Re: Cant load my Java extention.
still not working, i have export all generated class in jar but nothing seems work, did jre version problem? what ide should i use for java server development, is eclipse good? how about jre? which version should i use? the default from eclipse is java 19
Re: Cant load my Java extention.
Eclipse is perfectly fine and you can use any JDK you want.
Just make sure to set the compiler compliance level to Java 8. Under Eclipse check the properties of your project and under Java Compiler set the compliance to Java 1.8
If you're using SFS2X 2.18 or higher you can set the compliance up to Java 11.
Cheers
Just make sure to set the compiler compliance level to Java 8. Under Eclipse check the properties of your project and under Java Compiler set the compliance to Java 1.8
If you're using SFS2X 2.18 or higher you can set the compliance up to Java 11.
Cheers
-
- Posts: 45
- Joined: 24 Oct 2013, 14:17
Re: Cant load my Java extention.
still haven't get it, is this setting correct ?
or something should be changed?
or something should be changed?
Re: Cant load my Java extention.
The jar file should be inside your Extension folder, not outside.
Cheers
Cheers
-
- Posts: 45
- Joined: 24 Oct 2013, 14:17
Re: Cant load my Java extention.
i have move the jar file inside folder but nothing showing, is there anyhing else from the setting?
Re: Cant load my Java extention.
Can you send us the jar file to our support@... emailbox with a reference to this post?
We'll take a look.
Thanks
We'll take a look.
Thanks
-
- Posts: 45
- Joined: 24 Oct 2013, 14:17
Re: Cant load my Java extention.
i think i mess up the export, i tried to unzip the jar and turn out nothing in it.. any information how to export correctly? how to add my class inside the jar?
-
- Posts: 45
- Joined: 24 Oct 2013, 14:17
Re: Cant load my Java extention.
never mind, already know the issue, now enter another issue, here is the log, is it jdk issue?
Exception: com.smartfoxserver.v2.exceptions.SFSException
Message: Extension creation failure: DGFServerExtension - Unexpected error while launching Extension: com.sushi.DGF.ServerExtension -- com/sushi/DGF/ServerExtension has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 55.0
Description: There were startup errors during the Zone Setup
Exception: com.smartfoxserver.v2.exceptions.SFSException
Message: Extension creation failure: DGFServerExtension - Unexpected error while launching Extension: com.sushi.DGF.ServerExtension -- com/sushi/DGF/ServerExtension has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 55.0
Description: There were startup errors during the Zone Setup
Re: Cant load my Java extention.
Hi,
yes as mentioned earlier, Extensions must be compiled for Java 8 or 11, depending on what SFS2X version you're using.
SFS2X 2.18.0 and higher supports Java 11, all prior versions require Java 8
Just make sure to set the Compiler compatibility level to the right value in your Eclipse project's settings.
Cheers
yes as mentioned earlier, Extensions must be compiled for Java 8 or 11, depending on what SFS2X version you're using.
SFS2X 2.18.0 and higher supports Java 11, all prior versions require Java 8
Just make sure to set the Compiler compatibility level to the right value in your Eclipse project's settings.
Cheers
-
- Posts: 45
- Joined: 24 Oct 2013, 14:17
Re: Cant load my Java extention.
i see, all set and done, thanks Lapo for the support
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 43 guests