[SOLVED] Problem with networking on openjdk 10

As far as I know this will only work for java 9 and 10, from 11 onward this module will be completely removed and the above jvm option won’t work.

I think the proper solution which will work for all jdk versions is to add it as a dependency like what I am doing.

see

1 Like

A quick web search for javax.jws api removed or something similar. I think that the bit about the java.se.ee ubermodule came from one of the java-centric tutorial-blog sites.

(The sort that are aimed at a junior/intermediate java programmer whose non-technical boss says “hey, our thingie is broke. Fix it by Monday”)

The article was aimed at short-term migrations from of Java 1.x code up to Java 9. The focus was getting your legacy code working right now, before you are prepared to do the proper re-structuring.

I’d give you a link, but its not in my browser history for some reason. Also, it was fairly shallow. (It was old enough that it did not have the Info that @Ali_RS added, about this only working on 9 & 10)

TL;DR version: I use iterative google-adjacent searches, spreading across multiple tabs, and often forget exactly where I found things! :slight_smile:

1 Like

LOL. I do that, too. In some cases, I’ve bookmarked like 15-20 tabs into a single folder just in case I needed it again later. It’s nice that the browser lets us do that… it’s been especially important for day-job related stuff.

Thanks @Ali_RS.

Edit:
OpenJDK 14
netbeans 12.

1 Like

You are welcome:)

By the way, I think we have already solved it in some 3.3 release, so no more need to use javax.jws API if you are on JME 3.3.

Edit:
This is the commit that removed javax.jws.Oneway dependency that was used in the MethodInfo class.

I am on 3.3.2 so its not working for me if fixed.

Must be something about jdk 14 as I was getting the same error and adding javax.jws-api fixed it.

    implementation 'javax.jws:javax.jws-api:1.1'

Edit: On master for all Simsilica libraries.

I am also using jdk 14 without that issue.

My guess is your project somehow is using a 3.2 version of jme3-networking. Maybe through a third-party library. (this has happened a few times for me in the past)

Can you check if the jme3-networking version you are using is actually 3.3 and not 3.2?

Here is how I am excluding any external libraries from coming by Simsilica libraries:

    compile "com.simsilica:sio2:$sio2Version" exclude group: '*'
    compile "com.simsilica:zay-es:$zayESVersion" exclude group: '*'
    compile "com.simsilica:zay-es-net:$zayESNetVersion" exclude group: '*'
    compile "com.simsilica:sim-math:$simMathVersion" exclude group: '*'
    compile "com.simsilica:sim-ethereal:$simEthVersion" exclude group: '*'

You nailed it.

3.2.1 on server. Somehow the server dependency was commented out. Go figure.

Works as expected now.

3 Likes

Glad it is solved.

You shouldn’t have to do this.

Edit: to be clearer.

If simLib123 depends on version X of jme-networking and your app depends on version X+1 of jme-networking then gradle will use version X+1.

1 Like

Ok, thank you so much for the clarification :slightly_smiling_face:

Maven works this way, too.

That way libraries that depend on other libraries may select the minimum version they require and apps are free to use newer compatible versions as they choose.

Consequently, I try not to increase the Sim-* library JME dependencies unless there was a breaking change with a newer version. That way people can still use them for a while even if they are running on older JME versions.

1 Like

I was having Assertion Error (so it means code cannot run on current environment) on Parrot OS 4.9 x64 as I remember … when running the jar game directly it crashes & gave me Assertion error so I downloaded jdk 8 & it works but I was running a normal offline game …Parrot OS comes with jdk11 or 12