1
Answer

Whats the best way one can consume a Java API in .Net. How to deal with java objects in .Net.

Shirish Tayshete

Shirish Tayshete

15y
2.3k
1
Hello guys,

I have a .net application which is basically a trade blotter. Once the trade is blotted by the trader in the application, they need to STP the trade directly to another system from my application rather than feeding into the 3rd system manually.

The system which they need to STP the trade has an API developed around, which is java based. I intend to use the JAVA API in .net to stp those trade from my application.

Could you guys provide inputs on the best way to consume the java api in .net. Also can we convert a java api to .Net dll so can be consumed directly ?
Also seems the challenge could be dealing with java objects. Any suggestions pls ?

Awaiting reply and thnks in advance.


Shirish T.

Answers (1)
0
Bechir Bejaoui
NA 20.1k 5.3m 16y
The problem is when you open the file and leave it for other tasks you leave it in an open state so that you can't reuse it later, be sure to close it after each operation
you can try to use a StreamWriter object to write your content, it will append contents without getting this error.
Take a look on this

http://www.velocityreviews.com/forums/t294100-the-process-cannot-access-the-file-quotquot-because-it-is-being-used-by-another-process.html

they have the same problem as you





0
krishna shivarla
NA 9 14.9k 16y
Yes , I got that error.................
0
Bechir Bejaoui
NA 20.1k 5.3m 16y

Did you recieved the error

The process Can not access the file because it is being used by another
process
0
krishna shivarla
NA 9 14.9k 16y

In my application I am usin dsoframer activex control..........using that dsoframer activex control I am opening my word document from server ........when i try to save that file it is giving error........so i save my file to client system folder.......so that now i need to save that file to server agian which is actually has to saved to server....................that is the reason i want to save the client system fule to server without the help of fileuploader or any UI component........instead of that I want to save the file which i saved in particular client folder..........please help me out in this with some sample code.............. 

0
Bechir Bejaoui
NA 20.1k 5.3m 16y

Cloud you please explain the situation it is a little unclair