Call C# class from Java class -


i have java class , c# class. want run c# class java class.

however don't want pass java code c# , don't want in return c# code, want run c# code.

i want shown in below classes

java class:

public void static main(string[] args){  system.out.println("running java code ");  // here need call c# class  } } 

i want code executed above java program

using system;      class program {         console.writeline("running c# code ");         }     } 

you can run c# program exe file java code.

first compile c#.net program program.exe file run same program.exe java code below:

public static void main(string[] args) throws ioexception {     // todo code application logic here      process process;     process = new processbuilder("c:\\projectspath\\program.exe").start(); } 

edit:

you can send parameters exe file invoked passing arguments processbuilder constructor below:

note : here im passing 2 argumenbts program.exe file name , id :

process = new processbuilder("c:\\projectspath\\program.exe" , "sudhakar","id501").start(); 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -