<p>Generally people go the opposite direction and try to get more to run on Linux as it is generally cheaper (e.g. license free).  Also, Windows 10 is more of a personal workstation (vs Windows Server).  So, it seems like it may be a short term strategy (unless you're just learning on your own).</p>

<p>Having said that, the most DevOps standard way to do this would be to:</p>

<ul>
<li>Install Docker on your Windows 10 PC.  Docker (in layman terms) lets you run apps on top of slimmed down operating systems of various kinds in a portable manner.</li>
<li>Dockerize the application(s) running on the Linux server.  You can start off with some slim linux variant like Alpine and just add what you need.</li>
<li>While you're at it, just Dockerize your windows 10 Java app at the same time and start running it from command line rather than NetBeans.</li>
<li>Now, you can run it all on Windows or Mac Or Linux (or kubernetes) with ease.</li>
</ul>

<p>This assumes the server-side app is not a Java or otherwise portable app.  If it is portable, you can just run it locally and forget all this (although all of this is still a good idea).</p>

CC BY-SA 4.0
2020-03-08T06:42:29.753Z
Excellent thanks. So would I need 2 separate docker containers? Presumably applications will need their own container unless they have identical requirements? And one docker container can see any API created by another?
schoon
CC BY-SA 4.0
2020-03-08T11:51:25.143Z
A container is (usually) supposed to just run literally one main process. So, it would exist only to run the java app or Linux app and would die when it exited.  So, yeah, one per app as they should be as small and purpose built as possible.  Also, you can expose ports in your docker file and when you run the container (do both).  Then, those ports are available to other containers or your host in general.
John Humphreys
CC BY-SA 4.0
2020-03-08T11:53:07.767Z
Also, If you are inclined, docker compose, docker stacks, and kubernetes all provide ways to launch and  orchestrate multiple containers.  Docker compote is easy for local use and has a low entry bar.   Kubernetes is taking over the world, but has a high entry bar and is complex.
John Humphreys
CC BY-SA 4.0
2020-03-08T19:56:06.043Z
Many thanks John!
schoon
CC BY-SA 4.0
2020-03-07T21:42:12.723Z
2020-03-07T21:49:51.423Z
2020-03-07T21:49:51.423Z
John Humphreys
<p>I'm new to DevOps so please forgive my ignorance. I have inherited a Win10 Java app that is currently run by pressing play in NetBeans. It makes API calls to a server running in a Linux VM.</p>

<p>What I'd like to know is how can I bundle this together and create an application that can be installed and run'out of the box' in win 10? Also, if possible, as a web service.</p>

<p>I'm just after pointers on how to start.</p>

<linux><windows><java><vm>
How do I package a jar and a Linux VM to run in Windows?
schoon
# How do I package a jar and a Linux VM to run in Windows?

(Asked by: username_0 on 2020-03-07)

I'm new to DevOps so please forgive my ignorance. I have inherited a Win10 Java app that is currently run by pressing play in NetBeans. It makes API calls to a server running in a Linux VM.

What I'd like to know is how can I bundle this together and create an application that can be installed and run'out of the box' in win 10? Also, if possible, as a web service.

I'm just after pointers on how to start.

**Tags:** linux, windows, java, vm


---

## 1 answers

### Answer by username_1 on 2020-03-07. Score: 1 | Accepted answer

Generally people go the opposite direction and try to get more to run on Linux as it is generally cheaper (e.g. license free). Also, Windows 10 is more of a personal workstation (vs Windows Server). So, it seems like it may be a short term strategy (unless you're just learning on your own).

Having said that, the most DevOps standard way to do this would be to:

* Install Docker on your Windows 10 PC. Docker (in layman terms) lets you run apps on top of slimmed down operating systems of various kinds in a portable manner.
* Dockerize the application(s) running on the Linux server. You can start off with some slim linux variant like Alpine and just add what you need.
* While you're at it, just Dockerize your windows 10 Java app at the same time and start running it from command line rather than NetBeans.
* Now, you can run it all on Windows or Mac Or Linux (or kubernetes) with ease.

This assumes the server-side app is not a Java or otherwise portable app. If it is portable, you can just run it locally and forget all this (although all of this is still a good idea).

> **Comments:**
> **username_0**: Excellent thanks. So would I need 2 separate docker containers? Presumably applications will need their own container unless they have identical requirements? And one docker container can see any API created by another?  
> **username_1**: A container is (usually) supposed to just run literally one main process. So, it would exist only to run the java app or Linux app and would die when it exited.  So, yeah, one per app as they should be as small and purpose built as possible.  Also, you can expose ports in your docker file and when you run the container (do both).  Then, those ports are available to other containers or your host in general.  
> **username_1**: Also, If you are inclined, docker compose, docker stacks, and kubernetes all provide ways to launch and  orchestrate multiple containers.  Docker compote is easy for local use and has a low entry bar.   Kubernetes is taking over the world, but has a high entry bar and is complex.  
> **username_0**: Many thanks John!  

---

