How to use the java.classpath function in java

To help you get started, we’ve selected a few java examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FRC1458 / TurtleDashboard / server / java / testJavaServer.js View on Github external
var java = require("java");

java.classpath.push("ntcore-osx.jar");

var NetworkTable = java.import("edu.wpi.first.wpilibj.networktables.NetworkTable");
//NetworkTable.setClientModeSync();
//NetworkTable.setIPAddressSync("127.0.0.1");

var table = NetworkTable.getTableSync("SmartDashboard");

var x = 0.0;
/*setInterval(() => {
    table.putNumberSync("Number", x++);
    table.putNumberSync("second", x/10.0);
    table.putNumberSync("third", 4.0);
    console.log(x);
}, 1000);*/

table.putBooleanSync("BrownOut", false);
github NextCenturyCorporation / EVEREST / test / specs / services / parsers / nlp.spec.js View on Github external
var base_path = '../../../..';
var services_path = base_path + '/services';
var models = require(base_path + '/models/models');
var java = require('java');
java.classpath.push(base_path +'/java_lib/Triplet_Extraction.jar');
var Nlp_Parser = require(services_path + '/parsers/nlp_parser_async.js'); 
var alpha_report_service = require(services_path + '/database/alpha_report.js');
var Assertion_Service = require(services_path + '/database/assertion.js');
var config = require(base_path + '/config.js');

var winston = require('winston');
var logger = new (winston.Logger)({
	transports: [new (winston.transports.Console)({level:config.log_level}),
		new (winston.transports.File)({filename: base_path + '/logs/jasmine_testing.log'})]
});
var assertionService = new Assertion_Service(models, null, logger);
var nlpParser = new Nlp_Parser({assertionService: assertionService}, logger);
github pedro-lucas / node-pdfbox / lib / PDFBox.js View on Github external
'use strict';

const java = require('java');
const path = require('path');
const PDFDocument = require('./PDFDocument');

java.classpath.push("./src-library/jai-imageio-core-1.3.1.jar");
java.classpath.push("./src-library/levigo-jbig2-imageio-1.6.5.jar");
java.classpath.push("./src-library/pdfbox-2.0.0.RC3.jar");
java.classpath.push("./out/production/node-pdfbox");

class PDFBox {

  static loadSync(path) {

    const PDFDocumentJava = java.import('br.com.appmania.PDFDocument');
    let doc = null;

    try {
      doc = PDFDocumentJava.loadSync(path);
    }catch(ex) {
      console.error(ex);
      return null;
github alpcanaydin / heygidi / backend / bin / lib / stemmer.js View on Github external
const java = require('java');

java.classpath.push(`${__dirname}/../../jar/guava-19.0.jar`);
java.classpath.push(`${__dirname}/../../jar/zemberek-all-0.10.0.jar`);

const TurkishMorphology = java.import('zemberek.morphology.analysis.tr.TurkishMorphology');

class Stemmer {
  constructor() {
    this.morphology = TurkishMorphology.createWithDefaultsSync();
  }

  getStemsFromSentence(sentence) {
    const words = sentence
      .split(' ')
      .map((word) => {
        let analysisWord = word;

        if (/^[a-zA-Z0-9şŞıİçÇöÖüÜĞğ]+'/.test(word)) {
          analysisWord = word.split('\'')[0];
github hotpxl / corenlp-server / lib.js View on Github external
var setupGlobalOptions = function() {
  java.options.push('-Xmx4g');
  java.classpath.push('./java-lib/stanford-corenlp-3.5.2.jar');
  java.classpath.push('./java-lib/stanford-corenlp-3.5.2-models.jar');
  java.classpath.push('./java-lib/xom.jar');
};
github hiteshjoshi / node-stanford-corenlp / lib / StanfordNLP.js View on Github external
function loadLibrary(path,version){
    
    if(semver.satisfies(version , '>=3.6.0')){
      java.classpath.push(path+"/slf4j-api.jar");
      java.classpath.push(path+"/slf4j-simple.jar");
    }

    java.classpath.push(path+"/ejml-0.23.jar");
    java.classpath.push(path+"/joda-time.jar");
    java.classpath.push(path+"/jollyday.jar");
    java.classpath.push(path+"/xom.jar");
    java.classpath.push(path+"/stanford-corenlp-"+version+"-models.jar");
    java.classpath.push(path+"/stanford-corenlp-"+version+".jar");
  };
github KRMAssociatesInc / eHMP / rdk / product / production / rdk / ccow / contextProcess.js View on Github external
'use strict';

var java = require('java');
var bunyan = require('bunyan');

java.classpath.push('./jars/WebJContextor.jar');
java.classpath.push('./jars/CCOWContextWrapper.jar');
java.classpath.push('./jars/commons-lang3-3.3.2.jar');

var config = require('./config.js');
var logger = bunyan.createLogger(config.logger);

function setContext(paramBlob, mContextManagerUrl, participantUrl) {
    var initializeContext = java.newInstanceSync('com.sentillion.sdkweb.webcontextor.WebContextor');
    var blob = java.newArray('java.lang.String', [null]);
    blob[0] = java.callMethodSync(initializeContext, 'getLastContextBlob');
    var contextItems = [];
    var _state = 0,
        dfn = '',
        icn = '',
        participantCoupon = '',
        contextCoupon = '',
github hotpxl / corenlp-server / lib.js View on Github external
var setupGlobalOptions = function() {
  java.options.push('-Xmx4g');
  java.classpath.push('./java-lib/stanford-corenlp-3.5.2.jar');
  java.classpath.push('./java-lib/stanford-corenlp-3.5.2-models.jar');
  java.classpath.push('./java-lib/xom.jar');
};
github DanielGarciaMandillo / angular-java / app / angularApp / tsJavaModule.js View on Github external
moduleJars.forEach(function (jarPath) {
        var fullJarPath = path.join(__dirname, '..', jarPath);
        _java.classpath.push(fullJarPath);
    });
    return BluePromise.resolve();
github NextCenturyCorporation / EVEREST / services / parsers / nlp_parser.js View on Github external
module.exports = function(services, logger) {
	var me = this;

	java.classpath.push('./java_lib/Triplet_Extraction.jar');
	var url = 'http://localhost:8081/';
	var ExtractionService = java.import('com.nextcentury.TripletExtraction.ExtractionService');
	var Parser = java.import('com.nextcentury.TripletExtraction.CoreNlpParser');
	var parser = new Parser();
	var extractor = new ExtractionService();

	var assertion_service = services.assertionService;
	
	me.parseAndSave = function(alpha_report_object, callback){
		logger.info('Attempting to parse alpha_report_object with id ' + alpha_report_object._id);
			
		var assertion_object = {};
		if(alpha_report_object.message_body){
			var tree = parser.parseSync(alpha_report_object.message_body);
			for (var i = 0; i < tree.sizeSync(); i++){
				//get first sentence fragment from parsed message