Click here to Skip to main content
15,898,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Team,

I have a jar file which has some classes.I want to access those class files from .net environment.I mean i want to pass some parameters from .net environment to class files and process the parameters in class files and send response back to .net environment.
please help me
Posted

Hello,

There are in-fact multiple ways to do this.

  • Via Java Native Interface - Here[^] is an article to learn more about this.
  • Via IKVM.NET - You can find related article Here[^]
  • Via Shell Command - Here[^] is an article about Shell Commands. Does not show calling a java code, but can be easily adapted to invoke a batch file which in turn calls the java code. You will have to write a wrapper java class with main method. The main method in wrapper will then instantiate the desired class and call it's method. The result will then get written onto StdOut. which then can be read in C#

Regards,
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900