从 VB.net 运行高级 java 调用
我需要运行一小段Java代码(在这种情况下Java是唯一的选择)
我在VB.net资源中有jar文件作为JSSMCL
(运行它不需要扩展名,我确信这一点:P)我知道我使用 Path.GetFullPath(My.Resources.ResourceManager.BaseName) 但无论我怎么做都失败了,我尝试了很多方法,我都记不清了!
这是我需要运行的命令:
java -cp "JSSMCL.jar" net.minecraft.MinecraftLauncher username false
I need to run a small piece of Java code (Java is the only option in this case)
I have the jar file in the VB.net resources as JSSMCL
(the extension is not required to run it, of this I am sure :P) I know I use Path.GetFullPath(My.Resources.ResourceManager.BaseName)
but no mater how I do it it fails, I have tried so many ways i have lost count!
this is the command that I need to run:
java -cp "JSSMCL.jar" net.minecraft.MinecraftLauncher username false
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 System.Diagnostics.Process 类及其方法来启动/运行外部进程。
You can use
System.Diagnostics.Process
class and its method to start/run theexternal
process.请参阅以下代码部分以使用
Process
运行命令编辑:
使用如下所示的编码部分,可能会起作用
看看这个链接解决您的问题
Refer to the following code part to run the Command using
Process
EDIT:
Use the Coding part like below, may be it works
Have a look at this link for your problem