all files / node-find-java-home-sync/ test2.js

25% Statements 3/12
0% Branches 0/2
0% Functions 0/1
25% Lines 3/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32                                                          
const fs = require('fs');
const path = require('path');
const glob = require('glob');
var fjh = require('.')
 
var result = fjh({
    allowJre: true
}, function(err, home) {
    var dll;
    var binary;
 
    if (home) {
        console.log('JAVA_HOME: ' + home)
        process.env.JAVA_HOME = home;
        console.log(process.env.JAVA_HOME);
        // dll = glob.sync('**/jvm.dll', {
        //     cwd: home
        // })[0];
 
        // binary = dll;
 
        // fs.writeFileSync(
        //     path.resolve(__dirname, '../node_modules/java/build/jvm_dll_path.json'),
        //     binary ? JSON.stringify(
        //         path.delimiter + path.dirname(path.resolve(home, binary))
        //     ) : '""'
        // );
    }
 
    return true;
});