Skip to content
This repository has been archived by the owner on May 19, 2019. It is now read-only.

consider running the jar without unpacking it #32

Closed
mkristian opened this issue Jan 14, 2015 · 9 comments
Closed

consider running the jar without unpacking it #32

mkristian opened this issue Jan 14, 2015 · 9 comments
Assignees

Comments

@mkristian
Copy link
Contributor

with https://github.com/mkristian/jruby-mains I created a few "Main" classes which do execute the jar as is without unpacking it. this requires jruby-1.7.19 since the CWD (or PWD) needs to be inside the jar for tools like rake to find the right Rakefile.

it really reduces the startup time by 2-3 sec on my machine not to extract the jar.

@rtyler
Copy link
Member

rtyler commented Jan 14, 2015

The jar should already be run without unpacking, since we're not using the JarMain bootstrap code from warbler in the jar plugin. It is used in the war plugin however`

Have you published the jruby-mains code to maven central or jcenter in such a way that might make sense to incorporate it?

@rtyler
Copy link
Member

rtyler commented Jan 15, 2015

@mkristian your original report references changes in 1.7.19 to Dir.pwd or something similar, do you have a commit reference I could look at? A fix to that might actually correct #23

@mkristian
Copy link
Contributor Author

https://github.com/jruby/jruby/tree/jruby-1_7/maven/jruby/src/it/runnable
is the test-case and the src/main/java/Main.java in there was the base for the https://github.com/mkristian/jruby-mains module.

yes, the test will pick the Rakefile from within the jar but probably I should delete the Rakefile before executing the code and run the execution inside another directory.

let me see if find the commit on jruby code side as well.

@mkristian
Copy link
Contributor Author

regarding jruby-mains, I will release it tomorrow or so to maven-central.

@mkristian
Copy link
Contributor Author

jruby/jruby@ef39dd5
jruby/jruby@3d56328

are the changes to change the directory into the classloader space

@mkristian
Copy link
Contributor Author

jruby-1.7.19 can chdir into a jar file now and I released de.saumya.mojo:jruby-mains:0.1.0 to maven central

@rtyler
Copy link
Member

rtyler commented Feb 5, 2015

@mkristian I can update to 1.7.19 as the default, but could you clarify what's beneficial about the jruby-mains code over what we're using right now? I think @ysb33r might also be interested in the answer

@mkristian
Copy link
Contributor Author

mkristian commented Feb 5, 2015 via email

@rtyler rtyler self-assigned this Feb 5, 2015
@mkristian
Copy link
Contributor Author

this is the default now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants