Variable that is not refreshed

11 views
Skip to first unread message

rdvg...@gmail.com

unread,
Jul 19, 2021, 10:53:52 PM7/19/21
to CodenameOne Discussions
Hi,

I have a static variable "SERVER_URL" where I keep the URL that I use to consume a WS. At some point put the address 172.31.29.165 for testing. Currently I use 3.12.118.139 as shown in the box in the attached image, but for some reason it sends me an error directing me to the other IP address.
I am using Netbeans as IDE.

This has me surprised and I appreciate your comments.
error.png

Shai Almog

unread,
Jul 19, 2021, 11:23:48 PM7/19/21
to CodenameOne Discussions
Hi,
static final fields are copied by the javac compiler. So even if you change them you might still have an older value all over the code.
Do a clean build to workaround this.
Reply all
Reply to author
Forward
0 new messages