Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute Java classes with Node JS (Meteor JS)

I am developing with Meteor JS, a node framework.

A question to those of you familiar with it, would it be possible to execute code i've written in Java without using an applet?

How would I go about doing this?

Thank you for your time.

like image 279
TheProofIsTrivium Avatar asked Jul 25 '13 01:07

TheProofIsTrivium


1 Answers

You can run them server-side the same way as any command line tool:

var exec = Npm.require('child_process').exec;

exec("java myProgram.jar param param", function (error, stdout, stderr) {
    ...
});
like image 148
Hubert OG Avatar answered Oct 01 '22 00:10

Hubert OG