Hi Andy, exactly: In previous versions, the java.lang standard package needed to be specified. Best, Christian



Andy Bunce <bunce.andy@gmail.com> schrieb am Mo., 22. Aug. 2022, 16:18:
Got it I think...
props:store·java.io.Writer·java.lang.String( Q{java:java.io.FileWriter}new($source), "The saucer has landed")

On Mon, 22 Aug 2022 at 15:11, Andy Bunce <bunce.andy@gmail.com> wrote:
Hi,

I am trying to write a Java property file using v9.5.1 and no new Java code.
The code below runs in 9.7.3. Although it only uses 9.5 features in 9.5.1 it produces the error message

props:store·java.io.Writer·String cannot be called with (Writer, String).

I assume this is a 9.5.1 java binding bug?
Any workaround suggestions or details of what the problem is?
/Andy

-----------------------------------------------
(:~  Using Basex 9.5.1
and assuming a file  "test.properties" in folder containing this module:)
import module namespace props = "java:java.util.Properties";
declare variable $source:= file:resolve-path("test.properties",file:base-dir())
                                   !(prof:void(props:load·java.io.Reader(Q{java:java.io.FileReader}new(.))),.)
;                                

props:store·java.io.Writer·String( Q{java:java.io.FileWriter}new($source), "The saucer has landed")