-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Allow using a wrapper file to start JVM #623
Comments
On Sun, Apr 26, 2015 at 3:34 PM, Lyor Goldstein [email protected]
For example, what's preventing you, for example, from writing a new Your myjava.so could then sit in a separate OSv "module" (apps/...) so only Nadav Har'El |
Sounds like a good idea - is there some documentation / example that explains how such a myjava.so would work - mainly:
Also, I have not been able to infer from the java.cc code how to set up the classpath - the code seems to ignore the -cp argument. How then is the classpath from the scripts/osv/modules/api.py being used to configure the JVM before launching ? |
On Mon, Apr 27, 2015 at 7:47 AM, Lyor Goldstein [email protected]
A second option is to use the OSv-specific C++ API, for example (not tested: auto lib = elf::get_program()->get_library("/java.so");
RunJava.java used to be a nice, understandable, program, but unfortunately, Nadav Har'El |
It still does not explain how does the classpath setting from the scripts/osv/modules/api.py gets to RunJava.java. Basically, what I would like to do is parse the wrapper configuration and then invoke the JVM startup code as if it has been invoked using the current manner. Can you point me to the relevant source files and also explain the flow - i.e., who calls whom - especially the classpath part. Thanks |
Spoke to soon - figured it out - I may need your help in incorporating the code correctly into OSV, but other than that I am good to go. |
@nyh I have the code ready to go - can you send me more detailed instructions about:
|
On Tue, Apr 28, 2015 at 1:03 PM, Lyor Goldstein [email protected]
Alternatively (and much more simply), if you just want to run one specific
/jetty/start.jar: ${MODULE_DIR}/upstream/start.jar This means that the upstream/start.jar in the module's directory will be Nadav Har'El |
@nyh
|
|
Is this issue still valid given we can run completely unmodified JVM including java executable as long as it is a PIE? |
Is this still a problem? Is it resolved by #626? |
So-called "java wrapper" was created in the early days when OSv could run shared libraries only (regular 'bin/java' is typically a pie or position-dependent executable). In essence, it is a C++ app that is built as a SO file acts as a limited substitute of traditional Now standard I am guessing there are around 20 open issues related to the limitations of the java wrapper (just search issues with java in it). And possibly most of them are not relevant. It would be nice for someone to revisit them. I think @lgoldstein had authored many of them? I am planning to write a new Wiki page that will document up-to-date Java support in OSv. |
@phillaverdiere If you are looking for issues to contribute to, I will try to make a pass at open ones and mark some them with |
As far as I see it, this is a very specfic feature request from @lgoldstein who wanted to run Java applications in a specific way (using a configuration file in a certain format). I think that if the original requester of a feature lost interest in it, and nobody else expressed similar interest, we can safely close it. Especially since this whole area (how to run Java code) significantly change in the last few years, as @wkozaczuk noted. So I'm closing this issue. Feel free to reopen it if there's renewed interest in this feature. |
The idea is to use a wrapper file to specify JVM startup configuration - similar to Tanuki. Attached as gist is a patch for the java/java.cc file that knows how to read such a file and replace the original argc/argv with the parsed ones. Open issues:
The text was updated successfully, but these errors were encountered: