Jars built with rawr:jar only work inside package directory

29 views
Skip to first unread message

metachr...@gmail.com

unread,
Jun 14, 2013, 5:16:37 PM6/14/13
to rawr...@googlegroups.com
As the title says jars (and bundled mac and windows executables.) don't work unless they reside in their output directory.  What am I doing incorrectly?  Is there a setting I am supposed to use to get deployable jars? 

James Britt

unread,
Jun 14, 2013, 8:03:23 PM6/14/13
to rawr...@googlegroups.com


On Friday, June 14, 2013 2:16:37 PM UTC-7, metachr...@gmail.com wrote:
As the title says jars (and bundled mac and windows executables.) don't work unless they reside in their output directory.  What am I doing incorrectly?  Is there a setting I am supposed to use to get deployable jars? 

I'm unclear what you mean by  "they reside in their output directory" Does "they"  mean the resulting executable jar generated by rawr?

To where are you moving these jars, and are you making sure that you alos move all files and folders needed by whatever is in that jar?



James

Metatron Chronicler

unread,
Jun 16, 2013, 9:54:30 AM6/16/13
to rawr...@googlegroups.com
I just mean that the jars my application needs are located in package/jar/lib and the application jar is in package/jar/application.jar.  I was under the impression that the various package commands would include any required jars inside the resulting executable/jar. Is this not the case?  I've also noticed that the resulting application jar does not include anything from lib/ruby.  I was hoping to get everything including dependencies contained in a single jar file for distribution.


--
You received this message because you are subscribed to the Google Groups "rawr-lib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rawr-lib+u...@googlegroups.com.
To post to this group, send email to rawr...@googlegroups.com.
Visit this group at http://groups.google.com/group/rawr-lib.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

James Britt

unread,
Jun 16, 2013, 12:44:17 PM6/16/13
to rawr...@googlegroups.com
Metatron Chronicler wrote:
> I just mean that the jars my application needs are located in
> package/jar/lib and the application jar is in
> package/jar/application.jar. I was under the impression that the
> various package commands would include any required jars inside the
> resulting executable/jar. Is this not the case?

No. Existing jars are not repackaged.

Any resulting program is going to need to include jruby_complete.jar,
and often another jars (such as for Swing). These need to be included
with your application jar, as rawr does not rebuild existing jars into
new jar, bundled jars.


If you want to ship a single file you need to use some kind of installer
program, such as what you get if you run

rake rawr:bundle:exe
# Bundles the jar from rawr:jar into a
# native Windows application (.exe)



> I've also noticed that
> the resulting application jar does not include anything from lib/ruby.
> I was hoping to get everything including dependencies contained in a
> single jar file for distribution.



Does your build_configuration.rb file indicate that the files in
lib/ruby should be included?

For example:

c.source_dirs = ["lib/ruby", "src"]


James

--

jamesbritt.com - Live curious
justthebestparts.com - Feed your head
neurogami.com - Hack your world
Reply all
Reply to author
Forward
0 new messages