Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a code which is written in c#, how can I run it in java code??
Thanks
The ikvm project is a JVM written in .net - designed to allow Java and .net interoperability.
If it is a small chunk of code, I'd recommend rewriting it.
If it is a large chunk of code, I'd recommend:
wrapping it as a command and running it using System.exec(), or
turning it into a service and making requests using HTTP, a common RPC protocol or plain sockets.
Only if neither of those approaches were technically feasible would I consider something like JNI or IKVM.
Take a look at JNBridgePro (www.jnbridge.com), which is specifically designed to tightly integrate .NET and Java code.
Disclosure: I work for JNBridge.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I was reading about the .NET framework and I read that ".NET provides language interoperability", and I also read the answer to the question What is language interoperability (basic concept) in .net framework?, but I don't have any idea about how to use this feature practically.
Create a simple project using C#, make a simple class and compile it. You will generate a .dll.
Then create a project using VB and import/include the one you compiled where you used C#. VB won´t take care of your C# code, but it can manage the class you created.
How? Because .NET is compiled in a common language. Does not matter if you have used C# or VB to generate the code.
Interoperability is a framework feature. Is rare that you need make use of this for small projects so I undestand you don't find a real way to carry out. But it is that simple as all what you do with C# in .NET you can reuse if you decide code in VB in the future or for some parts of a project.
In practice programmers decide to code in one language. But reusability is already there.
Feel free to ask what you need.
https://stackoverflow.com/a/43417187/7733724
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is it possible to raise an event in one .dll that can be handled by another? If so, what should I be looking at.
EDIT:
I think the two dlls are running in the same process - they are both add-ins to another program. I'm limited to what I can do with add-ins, hence the need to have this communication.
I thought about writing to a local file and reading it from the other dll, but how would I know when to read it.
It's called Interprocess Communication
You probably would like to look on Pipes, or look into the IpcChannel Class, which may make things even easier. I personally didn't use any of those under C# language, but what important, is an idea and technology behind, the rest is an implementation detail.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Is it possible to use .NET framework with the Python scrapy framework to scrape data from different sites?
I am working on my final year project in which I want to use C# as front end language and Python for scraping the data.
I don't think it is possible, because Scrapy uses twisted networking engine which can not run on IronPython
Alternatively, you may start your spider/crawler through command line using C# and then interact with it using JSON API
Take a look at ScrapySharp, also described on this blog, which is the C# version of python's Scrapy.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
What is COM+? What is equivalent for COM+ in .Net?
COM+ was Microsoft's offering in the battle for the middle tier that raged in the late nineties. A set of extensions built on top of COM with typical middleware duties like componentizing modules across machines and getting them to work together in a transaction-safe way. CORBA was another one, now also largely forgotten.
The only thing it really accomplished was to make Java a significant force.
ServicedComponent http://msdn.microsoft.com/en-us/library/7c05y13x(VS.71).aspx
Right here on wikipedia. Has a section on .Net
Component Object Model
There is no equivalent in .Net as you can still use COM+ in .Net but there are better ways of achieving the same thing.
COM Interop used to be a rather dangerous, if not overly-hyped feature.
Why dangerous? It used to collect and dispose of live com pointers, thus pulling the rug right out from under you. Oh my, it was so much fun. It could be fixed by now I would hope.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
are there any tutorials out there on how to create a sandbox using C#?
I would like to personalize my own one, thanks
Study up on using AppDomains. Here's some code examples.
We just recently used the MonoSandbox for Security reasons.
I don't know if it works with standard Microsoft's CLR, or if it is specific to the Mono implementation, but I think it works better than just a custom sanbdbox using AppDomains, and since the source code is open you can probably find a way to make it work for you.
The best documentation I have found for the MonoSandbox is here: http://www.mono-project.com/MonoSandbox
I would start by looking at Code Access Security.