简体   繁体   English

NSIS-如何在NSIS中运行Java应用程序?

[英]NSIS - How to run Java Application In NSIS?

I wanna run a java application through NSIS. 我想通过NSIS运行Java应用程序。 My java program is called PropertiesReader.java which reads a property from a .config file.How can I do this? 我的Java程序名为PropertiesReader.java,它从.config文件中读取属性。 Also the output of java program (which in this case is the property value) is stored in some variable say property_value in java program. Java程序的输出(在这种情况下为属性值)也存储在Java程序的某个变量(例如property_value)中。 How can i access back the value of this variable in NSIS script? 我如何在NSIS脚本中访问该变量的值?

From the NSIS srcipt, you can run Exec or ExecWait to run the "java" and pass the PropertiesReader.class as parameter to it. 从NSIS程序中,您可以运行Exec或ExecWait来运行“ java”,并将PropertiesReader.class作为参数传递给它。 Your java program can write the property_value to a file which you can read back from the script. 您的Java程序可以将property_value写入文件,您可以从脚本中读取该文件。

Here is a link that has a heading "NSIS and Java". 是标题为“ NSIS和Java”的链接。 You can check that out. 您可以检查出来。 Just make sure that the PropertiesReader.class file is in the classpath. 只要确保PropertiesReader.class文件在类路径中即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM