*! version 1.0.0
program define mymeanjava, eclass

    version 15.1

    syntax varlist(numeric) [if] [in]
    marksample touse
    tempname b V N

    javacall myCalcs myWork `varlist' if `touse' `in',  ///
        jar(mycalcs.jar) args(`b' `V' `N')

    matrix colnames `b'  = `varlist'
    matrix colnames `V'  = `varlist'
    matrix rownames `V'  = `varlist'
    ereturn post `b' `V', esample(`touse')
    ereturn scalar   N   = `N'
    ereturn scalar df_r  = `N'-1
    ereturn display

end