Created
October 13, 2011 17:38
-
-
Save chuckremes/1284895 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration do |c| | |
# The name for your resulting application file (e.g., if the project_name is 'foo' then you'll get foo.jar, foo.exe, etc.) | |
# default value: "test" | |
# | |
c.project_name = "test" | |
# Undocumented option 'output_dir' | |
# default value: "package" | |
# | |
c.output_dir = "package" | |
# The type of executable to create (console or gui) | |
# default value: "gui" | |
# | |
#c.executable_type = "gui" | |
c.executable_type = "console" | |
# The main ruby file to invoke, minus the .rb extension | |
# default value: "main" | |
# | |
#c.main_ruby_file = "main" | |
c.main_ruby_file = "foo" | |
# The fully-qualified name of the main Java file used to initiate the application. | |
# default value: "org.rubyforge.rawr.Main" | |
# | |
c.main_java_file = "org.rubyforge.rawr.Main" | |
# A list of directories where source files reside | |
# default value: ["src"] | |
# | |
#c.source_dirs = ["src"] | |
c.source_dirs = ["src", "lib/ruby"] | |
# A list of regexps of files to exclude | |
# default value: [] | |
# | |
#c.source_exclude_filter = [] | |
# The base directory that holds Mirah files, or subdirectories with Mirah files. | |
# default value: "src" | |
# | |
#c.mirah_source_root = "src" | |
# Whether Ruby source files should be compiled into .class files | |
# default value: true | |
# | |
c.compile_ruby_files = true | |
# A list of individual Java library files to include. | |
# default value: [] | |
# | |
#c.java_lib_files = [] | |
# A list of directories for rawr to include . All files in the given directories get bundled up. | |
# default value: ["lib/java"] | |
# | |
c.java_lib_dirs = ["lib/java"] | |
# Undocumented option 'files_to_copy' | |
# default value: [] | |
# | |
#c.files_to_copy = [] | |
# Undocumented option 'target_jvm_version' | |
# default value: 1.6 | |
# | |
#c.target_jvm_version = 1.6 | |
# Undocumented option 'jvm_arguments' | |
# default value: "" | |
# | |
#c.jvm_arguments = "" | |
# Undocumented option 'java_library_path' | |
# default value: "" | |
# | |
#c.java_library_path = "" | |
# Undocumented option 'extra_user_jars' | |
# default value: {} | |
# | |
#c.extra_user_jars[:data] = { :directory => 'data/images/png', | |
# :location_in_jar => 'images', | |
# :exclude => /*.bak$/ } | |
# Undocumented option 'mac_do_not_generate_plist' | |
# default value: nil | |
# | |
#c.mac_do_not_generate_plist = nil | |
# Undocumented option 'mac_icon_path' | |
# default value: nil | |
# | |
#c.mac_icon_path = nil | |
# Undocumented option 'windows_icon_path' | |
# default value: nil | |
# | |
#c.windows_icon_path = nil | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mac-Pro:test cremes$ rake rawr:jar | |
Loaded /Users/cremes/.rvm/gems/jruby-1.6.3/gems/rawr-1.6.0/lib/rawr/core_ext.rb | |
javac -target 1.6 -cp lib/java/jruby-complete.jar:src:lib/ruby -sourcepath src:lib/ruby -d package/classes/java src/org/rubyforge/rawr/Main.java | |
Compile src/foo.rb into package/classes/ruby/foo.class | |
compile_dirs has src_dirs = ["src", "lib/ruby"] | |
glob_ruby_files has directory 'src' glob ["src/foo.rb"] | |
files for src: 1 | |
glob_ruby_files has directory 'lib/ruby' glob [] | |
files for lib/ruby: 0 | |
ruby_globs.each has glob_data = #<OpenStruct files=["foo.rb"], directory="src"> | |
Go compile ["src/foo.rb"] | |
ruby_globs.each has glob_data = #<OpenStruct files=[], directory="lib/ruby"> | |
=== Creating jar file: package/jar/test.jar | |
Mac-Pro:test cremes$ java -classpath .:package/jar/lib/java/jruby-complete.jar package/jar/test.jar | |
Exception in thread "main" java.lang.NoClassDefFoundError: package/jar/test/jar | |
Caused by: java.lang.ClassNotFoundException: package.jar.test.jar | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) | |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment