Error after update with SFS2X_API_Java_v1.3.2

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

Madhusmita
Posts: 37
Joined: 08 Jan 2014, 11:28

Error after update with SFS2X_API_Java_v1.3.2

Postby Madhusmita » 15 Apr 2014, 06:42

Updated my Java Client API with the latest version "SFS2X_API_Java_v1.3.2".
Then when I run my existing code, which was running fine with the earlier(1.3.0) SFS Java client API now its showing below mentioned error.

Code: Select all

java.lang.UnsupportedClassVersionError: sfs2x/client/core/IEventListener : Unsupported major.minor version 51.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Exception in thread "main"


I am using:
SmartFoxServer 2.8.2
Client API: JavaSE 6 with "SFS2X_API_Java_v1.3.2"
Server API: JavaSE6

Windows7, jre 1.6.0_41, jdk 1.6.0_26
Madhusmita
Posts: 37
Joined: 08 Jan 2014, 11:28

Re: Error after update with SFS2X_API_Java_v1.3.2

Postby Madhusmita » 15 Apr 2014, 07:25

Looks like Java SFS Client API using 1.7.0 for the latest version.

But I have to use 1.6 java version.

Please let me know how to fix the same.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error after update with SFS2X_API_Java_v1.3.2

Postby Lapo » 15 Apr 2014, 07:55

Yes, the compilation has been done with Java 7. I would suggest to install the JDK 7
Java 6 is over 7 years old and it's reached the end of its support life. Java 8 is now the standard version.

For the record SFS2X also runs on JDK 7.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error after update with SFS2X_API_Java_v1.3.2

Postby Lapo » 19 Sep 2014, 16:10

There is no problem with the SERVER_READY event in SFS 2X 2.9

I would recommend to start with something simple, like a single trace("...") call in your code and see that it works without errors in the logs.
If there's any other problem please start a new thread in the "SFS2X Questions" forum: viewforum.php?f=18

I will remove these posts from here tomorrow.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 22 guests