-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KNETCore fails to locate "libjvm.so" on *NIX based systems #115
Comments
@JeetCXX On *nix systems: JCOBridge try to find an incorrect library name and location if JAVA_HOME points out to the JRE folder, this is an open issue. The common way of work is to use the command-line switch --JVMPath:<full-path-to jvm.dll or libjvm.so> other options under https://www.jcobridge.com/net-examples/command-line-options/. If the developer/user cannot use the command-line switch, another way to overcome this behavior is to override the property class MyKNetCore : KNetCore
{
public override string JVMPath
{
get
{
string pathToJVM = "Set here the path to JVM library or use your own search method";
return pathToJVM;
}
}
} #110 will cover an enhancement about usage and environment set-up. |
* #110 #115 (comment): enhanced docs, templates and tests
I think I will use the symbolic link for now, because it does not require the C# developer using KNet to bother about JAVA infrastructure details. Of course, this is a matter of individual developer preference. Thanks. |
We delayed an answer due to JCOBridge porting finalization after official release of .NET 7. If you look at Dockerfile, KNet deploys a container which has everything it needs to run. The predefined |
Describe the bug
KNETCore::CreateGlobalInstance() fails to locate the JVM on LINUX and other *NIX based systems.
To Reproduce
Expected behavior
"KNetCore.CreateGlobalInstance()" should locate the JVM dynamic library (libjvm.so) correctly after browsing the entire folder structure. Currently, it only looks under $JAVA_HOME/bin/server. Also, the file to look for is libjvm.so and not jvm.so.
Works fine on WINDOWS with a standard OPENJDK installation and correctly set JAVA_HOME environment variable.
A possible workaround: Set a symbolic link under $JAVA_HOME/bin to $JAVA_HOME/lib/server/libjvm.so. Name the link as server/jvm.so.
Should be fine for DEV machines.
Screenshots
Not applicable.
Desktop (please complete the following information):
Additional context
See email to Support.
The text was updated successfully, but these errors were encountered: