-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] problem accessing java math class constants #5090
Comments
This is disabled in eXist-db by default. You would need to change |
yes, this is enabled : and function work declare namespace double = "java:java.lang.Double";
double:doubleValue(xs:integer(50)) => 5.0e1 => "ok" but declare namespace double = "java:java.lang.Double";
double:MAX_VALUE() => Cannot compile xquery: exerr:ERROR no method matches MAX_VALUE with 0 arguments [at line 5, column 1, source: String/-3378769710902313501] the same error occur with Math:PI() I am on jdk-17.0.8.7-hotspot Eclipse Adoptium |
Thank you very much ! declare namespace double = "java:java.lang.Double"; expected result = (50, 100, 1.7976931348623157E308) |
Likewise, this is not a function in declare namespace math = "java:java.lang.Math";
$math:PI |
Have you tried that on eXide ? with Saxon and Basex my script work well |
No. Apologies, I tried it elsewhere.
I can now confirm that eXist-db does not support accessing anything apart from static functions, or functions via a previously invoked constructor.
You or someone else would need to send a PR to add a feature to eXist-db to support Java class members (e.g. constants) and/or public non-static members. The relevant class in eXist-db is currently |
(: but access of class constant don't work as expected :)
SAXON example
existdb 6.2.0
The text was updated successfully, but these errors were encountered: