A simple project that enables the execution of Java applications within a .NET environment, ideal for scenarios requiring quick hosting and testing of Java services without the need for dedicated application servers.
SharpJDKWrapper, built on .NET Framework 4.8, enables the execution of Java JAR files within .NET processes in a Windows environment. It can be installed as a Windows service, allowing JARs to be hosted for testing purposes without the need for configuring application servers like Tomcat.
To use SharpJDKWrapper, you need to configure the following keys within the application config:
<appSettings>
<add key="JDK_DIRECTORY" value="C:\JDK\bin"/>
<add key="JAR_DIRECTORY" value="C:\JARs"/>
<add key="API_ADDRESS" value="http://localhost:12345/"/>
</appSettings>
In the JDK_DIRECTORY
key, specify the path to the directory where the JDK is installed. In JAR_DIRECTORY
, provide the path to the directory containing the JAR files.
Finally, API_ADDRESS
defines the endpoint at which the APIs will be exposed.
SharpJDKWrapper provides REST APIs to perform specific commands, including:
- Retrieving the number of active Java services.
- Checking the status of a particular Java service.
- Stopping a specific Java service.
SharpJDKWrapper can be easily migrated to.NET Core.
Thank you for considering to help out with the source code! If you'd like to contribute, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base.
- Setting up Git
- Fork the repository
- Open an issue if you encounter a bug or have a suggestion for improvements/features
SharpJDKWrapper source code is available under MIT License, see license in the source.
Please contact at francesco.delre.87[at]gmail.com for any details.