Is it possible to invoke a .NET Core app in Java?Calling C# code from Java?Is Java “pass-by-reference” or “pass-by-value”?How do I efficiently iterate over each entry in a Java Map?Does a finally block always get executed in Java?What is the difference between public, protected, package-private and private in Java?How do I read / convert an InputStream into a String in Java?When to use LinkedList over ArrayList in Java?How do I generate random integers within a specific range in Java?How do I make a textbox that only accepts numbers?How do I convert a String to an int in Java?Creating a memory leak with Java

How many are the non-negative integer solutions of 𝑥 + 𝑦 + 𝑤 + 𝑧 = 16 where x < y?

How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?

What is Plautus’s pun about frustum and frustrum?

How to cope with regret and shame about not fully utilizing opportunities during PhD?

How can dragons propel their breath attacks to a long distance

Reaction of borax with NaOH

How to minimise the cost of guessing a number in a high/low guess game?

Why does my circuit work on a breadboard, but not on a perfboard? I am new to soldering

Word for being out at night during curfew

What's the word for the soldier salute?

SSD - Disk is OK, one bad sector

Why not just directly invest in the holdings of an ETF?

How to slow yourself down (for playing nice with others)

Who was this character from the Tomb of Annihilation adventure before they became a monster?

What stroke width Instagram is using for its icons and how to get same results?

Does the 500 feet falling cap apply per fall, or per turn?

Usefulness of complex chord names?

Extracting sublists that contain similar elements

How are Core iX names like Core i5, i7 related to Haswell, Ivy Bridge?

How to compact two the parabol commands in the following example?

Why does getw return -1 when trying to read a character?

What to do if SUS scores contradict qualitative feedback?

What food production methods would allow a metropolis like New York to become self sufficient

What does the expression "right on the tip of my tongue" mean?



Is it possible to invoke a .NET Core app in Java?


Calling C# code from Java?Is Java “pass-by-reference” or “pass-by-value”?How do I efficiently iterate over each entry in a Java Map?Does a finally block always get executed in Java?What is the difference between public, protected, package-private and private in Java?How do I read / convert an InputStream into a String in Java?When to use LinkedList over ArrayList in Java?How do I generate random integers within a specific range in Java?How do I make a textbox that only accepts numbers?How do I convert a String to an int in Java?Creating a memory leak with Java






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I have a .NET Core (console) app that I would like for a Java app to depend on. Essentially I would like to be able for the Java app to invoke a multi variable method in the .NET Core app and then pass the result back to the Java app. It would be nice if the .NET Core app could be embedded in the Java app. I have previously seen .NET Framework specific solutions to this problem, but since this would only be relevant on Windows, I would like a solution that also works on Linux.










share|improve this question
























  • Possible duplicate of Calling C# code from Java?

    – vinicius.ras
    Mar 23 at 12:13






  • 1





    @vinicius.ras: No, this is not a duplicate. The questions you refer to, consider .NET Framework (and not .NET Core). I would like for a multi platform solution.

    – Birdie
    Mar 23 at 12:20












  • WHY do you want to do this.

    – Ian Kemp
    Mar 23 at 12:33











  • You can't "embed" an app in an app. Is your console app a utility or a service? If it's a utility you can invoke it by calling out to the OS and receive the output. If it's a service it needs to expose an interface so you can call that with your choice of RPC.

    – iakobski
    Mar 23 at 12:44











  • @iakobski: Could you describe or reference material that describes the utility and service approaches? My motivation is that I would like to be able to use a specific .NET library in my Java app.

    – Birdie
    Mar 23 at 13:56

















1















I have a .NET Core (console) app that I would like for a Java app to depend on. Essentially I would like to be able for the Java app to invoke a multi variable method in the .NET Core app and then pass the result back to the Java app. It would be nice if the .NET Core app could be embedded in the Java app. I have previously seen .NET Framework specific solutions to this problem, but since this would only be relevant on Windows, I would like a solution that also works on Linux.










share|improve this question
























  • Possible duplicate of Calling C# code from Java?

    – vinicius.ras
    Mar 23 at 12:13






  • 1





    @vinicius.ras: No, this is not a duplicate. The questions you refer to, consider .NET Framework (and not .NET Core). I would like for a multi platform solution.

    – Birdie
    Mar 23 at 12:20












  • WHY do you want to do this.

    – Ian Kemp
    Mar 23 at 12:33











  • You can't "embed" an app in an app. Is your console app a utility or a service? If it's a utility you can invoke it by calling out to the OS and receive the output. If it's a service it needs to expose an interface so you can call that with your choice of RPC.

    – iakobski
    Mar 23 at 12:44











  • @iakobski: Could you describe or reference material that describes the utility and service approaches? My motivation is that I would like to be able to use a specific .NET library in my Java app.

    – Birdie
    Mar 23 at 13:56













1












1








1








I have a .NET Core (console) app that I would like for a Java app to depend on. Essentially I would like to be able for the Java app to invoke a multi variable method in the .NET Core app and then pass the result back to the Java app. It would be nice if the .NET Core app could be embedded in the Java app. I have previously seen .NET Framework specific solutions to this problem, but since this would only be relevant on Windows, I would like a solution that also works on Linux.










share|improve this question
















I have a .NET Core (console) app that I would like for a Java app to depend on. Essentially I would like to be able for the Java app to invoke a multi variable method in the .NET Core app and then pass the result back to the Java app. It would be nice if the .NET Core app could be embedded in the Java app. I have previously seen .NET Framework specific solutions to this problem, but since this would only be relevant on Windows, I would like a solution that also works on Linux.







java c# .net-core






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 12:29







Birdie

















asked Mar 23 at 12:06









BirdieBirdie

4728




4728












  • Possible duplicate of Calling C# code from Java?

    – vinicius.ras
    Mar 23 at 12:13






  • 1





    @vinicius.ras: No, this is not a duplicate. The questions you refer to, consider .NET Framework (and not .NET Core). I would like for a multi platform solution.

    – Birdie
    Mar 23 at 12:20












  • WHY do you want to do this.

    – Ian Kemp
    Mar 23 at 12:33











  • You can't "embed" an app in an app. Is your console app a utility or a service? If it's a utility you can invoke it by calling out to the OS and receive the output. If it's a service it needs to expose an interface so you can call that with your choice of RPC.

    – iakobski
    Mar 23 at 12:44











  • @iakobski: Could you describe or reference material that describes the utility and service approaches? My motivation is that I would like to be able to use a specific .NET library in my Java app.

    – Birdie
    Mar 23 at 13:56

















  • Possible duplicate of Calling C# code from Java?

    – vinicius.ras
    Mar 23 at 12:13






  • 1





    @vinicius.ras: No, this is not a duplicate. The questions you refer to, consider .NET Framework (and not .NET Core). I would like for a multi platform solution.

    – Birdie
    Mar 23 at 12:20












  • WHY do you want to do this.

    – Ian Kemp
    Mar 23 at 12:33











  • You can't "embed" an app in an app. Is your console app a utility or a service? If it's a utility you can invoke it by calling out to the OS and receive the output. If it's a service it needs to expose an interface so you can call that with your choice of RPC.

    – iakobski
    Mar 23 at 12:44











  • @iakobski: Could you describe or reference material that describes the utility and service approaches? My motivation is that I would like to be able to use a specific .NET library in my Java app.

    – Birdie
    Mar 23 at 13:56
















Possible duplicate of Calling C# code from Java?

– vinicius.ras
Mar 23 at 12:13





Possible duplicate of Calling C# code from Java?

– vinicius.ras
Mar 23 at 12:13




1




1





@vinicius.ras: No, this is not a duplicate. The questions you refer to, consider .NET Framework (and not .NET Core). I would like for a multi platform solution.

– Birdie
Mar 23 at 12:20






@vinicius.ras: No, this is not a duplicate. The questions you refer to, consider .NET Framework (and not .NET Core). I would like for a multi platform solution.

– Birdie
Mar 23 at 12:20














WHY do you want to do this.

– Ian Kemp
Mar 23 at 12:33





WHY do you want to do this.

– Ian Kemp
Mar 23 at 12:33













You can't "embed" an app in an app. Is your console app a utility or a service? If it's a utility you can invoke it by calling out to the OS and receive the output. If it's a service it needs to expose an interface so you can call that with your choice of RPC.

– iakobski
Mar 23 at 12:44





You can't "embed" an app in an app. Is your console app a utility or a service? If it's a utility you can invoke it by calling out to the OS and receive the output. If it's a service it needs to expose an interface so you can call that with your choice of RPC.

– iakobski
Mar 23 at 12:44













@iakobski: Could you describe or reference material that describes the utility and service approaches? My motivation is that I would like to be able to use a specific .NET library in my Java app.

– Birdie
Mar 23 at 13:56





@iakobski: Could you describe or reference material that describes the utility and service approaches? My motivation is that I would like to be able to use a specific .NET library in my Java app.

– Birdie
Mar 23 at 13:56












1 Answer
1






active

oldest

votes


















1














In the past there were some technologies such as IKVM.NET and COM Interop wrappers but the former is defunct and the latter probably wouldn't work on Linux.



Since you own the .net core code, I would take a more modern microservice approach. I would design the .net core app to be a REST API running as a console app listening on a port. I'd have the Java application spin up the console app, invoke the methods passing JSON back and forth and then spit it down when complete.






share|improve this answer























  • Thank you! I was considering doing that, but my fear was that it would be considered bad practise or expensive in terms of performance. Do you have a view on that?

    – Birdie
    Mar 23 at 14:29











  • Is it considered a typical microservice approach to expose the service through a REST API? And why is it considered “modern”?

    – Birdie
    Mar 23 at 14:31











  • It shouldn't take much code to mock it up and measure the performance.

    – Christopher Painter
    Mar 23 at 14:35











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55313556%2fis-it-possible-to-invoke-a-net-core-app-in-java%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














In the past there were some technologies such as IKVM.NET and COM Interop wrappers but the former is defunct and the latter probably wouldn't work on Linux.



Since you own the .net core code, I would take a more modern microservice approach. I would design the .net core app to be a REST API running as a console app listening on a port. I'd have the Java application spin up the console app, invoke the methods passing JSON back and forth and then spit it down when complete.






share|improve this answer























  • Thank you! I was considering doing that, but my fear was that it would be considered bad practise or expensive in terms of performance. Do you have a view on that?

    – Birdie
    Mar 23 at 14:29











  • Is it considered a typical microservice approach to expose the service through a REST API? And why is it considered “modern”?

    – Birdie
    Mar 23 at 14:31











  • It shouldn't take much code to mock it up and measure the performance.

    – Christopher Painter
    Mar 23 at 14:35















1














In the past there were some technologies such as IKVM.NET and COM Interop wrappers but the former is defunct and the latter probably wouldn't work on Linux.



Since you own the .net core code, I would take a more modern microservice approach. I would design the .net core app to be a REST API running as a console app listening on a port. I'd have the Java application spin up the console app, invoke the methods passing JSON back and forth and then spit it down when complete.






share|improve this answer























  • Thank you! I was considering doing that, but my fear was that it would be considered bad practise or expensive in terms of performance. Do you have a view on that?

    – Birdie
    Mar 23 at 14:29











  • Is it considered a typical microservice approach to expose the service through a REST API? And why is it considered “modern”?

    – Birdie
    Mar 23 at 14:31











  • It shouldn't take much code to mock it up and measure the performance.

    – Christopher Painter
    Mar 23 at 14:35













1












1








1







In the past there were some technologies such as IKVM.NET and COM Interop wrappers but the former is defunct and the latter probably wouldn't work on Linux.



Since you own the .net core code, I would take a more modern microservice approach. I would design the .net core app to be a REST API running as a console app listening on a port. I'd have the Java application spin up the console app, invoke the methods passing JSON back and forth and then spit it down when complete.






share|improve this answer













In the past there were some technologies such as IKVM.NET and COM Interop wrappers but the former is defunct and the latter probably wouldn't work on Linux.



Since you own the .net core code, I would take a more modern microservice approach. I would design the .net core app to be a REST API running as a console app listening on a port. I'd have the Java application spin up the console app, invoke the methods passing JSON back and forth and then spit it down when complete.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 23 at 14:16









Christopher PainterChristopher Painter

48.2k64985




48.2k64985












  • Thank you! I was considering doing that, but my fear was that it would be considered bad practise or expensive in terms of performance. Do you have a view on that?

    – Birdie
    Mar 23 at 14:29











  • Is it considered a typical microservice approach to expose the service through a REST API? And why is it considered “modern”?

    – Birdie
    Mar 23 at 14:31











  • It shouldn't take much code to mock it up and measure the performance.

    – Christopher Painter
    Mar 23 at 14:35

















  • Thank you! I was considering doing that, but my fear was that it would be considered bad practise or expensive in terms of performance. Do you have a view on that?

    – Birdie
    Mar 23 at 14:29











  • Is it considered a typical microservice approach to expose the service through a REST API? And why is it considered “modern”?

    – Birdie
    Mar 23 at 14:31











  • It shouldn't take much code to mock it up and measure the performance.

    – Christopher Painter
    Mar 23 at 14:35
















Thank you! I was considering doing that, but my fear was that it would be considered bad practise or expensive in terms of performance. Do you have a view on that?

– Birdie
Mar 23 at 14:29





Thank you! I was considering doing that, but my fear was that it would be considered bad practise or expensive in terms of performance. Do you have a view on that?

– Birdie
Mar 23 at 14:29













Is it considered a typical microservice approach to expose the service through a REST API? And why is it considered “modern”?

– Birdie
Mar 23 at 14:31





Is it considered a typical microservice approach to expose the service through a REST API? And why is it considered “modern”?

– Birdie
Mar 23 at 14:31













It shouldn't take much code to mock it up and measure the performance.

– Christopher Painter
Mar 23 at 14:35





It shouldn't take much code to mock it up and measure the performance.

– Christopher Painter
Mar 23 at 14:35



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55313556%2fis-it-possible-to-invoke-a-net-core-app-in-java%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현