You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi folks:
I've found a lot of examples in the internet how to access any kind of java classes via .class.forName. I've tested this in my user macro:
#set ($string="")
#set ($base64=$string.class.forName('java.util.Base64'))
<pre>
base64: $base64.getClass()
</pre>
that results in "$base64.getClass()" and not as expected in "java.util.Base64".
An implicit initialization with "newInstance()" has changed nothing.
#set ($base64=$string.class.forName('java.util.Base64').newInstance())
Has someone an idea, what's wrong here?
I'm using Confluence 7.4.0 Server.
Thanks
Hi René,
I just ran across the same problem. Have you found a solution in the meantime?
Regards,
Ulrik
Hi Ulrik:
Unfortunately not. The java support in confluence macros does not work as well as expected.
Regards, René
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi René,
meanwhile, I found a posting that gave me the impression that the option of using "object.class.forName()" has gone for security reasons. :-(
Regards,
Ulrik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.