[英]how to pass data as an arguments between two java classes using node js
i have two java classes , and i want to take the output of the first java class ,pass this data to Node Js then, finally this data must move from Node Js to the other Java class as arguments 我有两个Java类,并且我想获取第一个Java类的输出,然后将此数据传递给Node Js,最后,此数据必须作为参数从Node Js移至另一个Java类。
this the first java class 这是第一个Java类
public static void main(String[] args) {
Random randomGenerator = new Random();
String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
long timestamp = System.currentTimeMillis() / 1000;
for (int idx = 1; idx <= 10; ++idx) {
int randomInt = randomGenerator.nextInt(100);
System.out.println("Generated : \t" + randomInt + "\t time:\t" + timestamp);
//System.out.println("Generated : \t" + randomInt + "\t time:\t" + timeStamp);
}
}
then this is the second one 那是第二个
String msg = args[]
producer.send(new KeyedMessage("topic",msg));
i need to do this job using Node Js 我需要使用Node Js来完成这项工作
Any suggestions please 有什么建议吗
You have many approaches available. 您有许多可用的方法。 Some of them are:
他们之中有一些是:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.