I try the rawr,but failed.
how can i make an exe in xp using jruby+swing?
thanks a lot!
I try the rawr,but failed.
how can i make an exe in xp using jruby+swing?
thanks a lot!
rawr documentation is pretty basic. From what I saw, rawr does not
create an EXE it produces a JAR file. You could then use another tool to
create an EXE.
In my case I didn’t use any specific gem.
Not everything works. For instance, if you are reading a file from you
project, when it is located in the JAR you cannot read it using the Ruby
APIs
From: Lei K. [email protected]
To: [email protected]
Sent: Mon, June 28, 2010 5:29:12 AM
Subject: [jruby-user] how can i make an exe in xp using jruby+swing
I try the rawr,but failed.
how can i make an exe in xp using jruby+swing?
Posted via http://www.ruby-forum.com/.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Hi Lei,
I’m not really sure whether I understood your question or not… But
there is one trick available for JRuby native launcher on Windows that
may or may not be suitable for you. It is possible to rename jruby.exe
to something else, say myapp.exe, and launching myapp.exe would
actually equivalent to jruby -S myapp.
Thanks,
–Vladimir
On Mon, Jun 28, 2010 at 5:29 AM, Lei K. [email protected] wrote:
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Lei K. wrote:
I try the rawr,but failed.
how can i make an exe in xp using jruby+swing?
What happens when you run this:
rake rawr:bundle:exe
James B.
–
Neurogami - Smart application development
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
James B. wrote:
Lei K. wrote:
I try the rawr,but failed.
how can i make an exe in xp using jruby+swing?
What happens when you run this:
rake rawr:bundle:exe
James B.
–
Neurogami - Smart application development
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I tried to use rawr.
there is a flaw in using rawr:
every time you make an exe, It will download the jruby-complete.jar
But, I cannot download anything from web…
I tried use jrubyc to compile *.rb to *.class
and use 7-zip to create a jar file. (without jruby-complete.jar)
but the jar file cannot run, I will download the jar at home. And try
it.
3x, bros.
the errors that jar file outputs :
ava.lang.NoClassDefFoundError: org/jruby/ast/executable/AbstractScript
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
Lei K. wrote:
I tried to use rawr.
there is a flaw in using rawr:
every time you make an exe, It will download the jruby-complete.jar
Yes. I need to undo that, and allow the user to specify the source of
the jruby jar (which you will need, but it doesn’t have to come from the
jruby.org server.)
If you do not already have jruby-complete.jar on your system you can’t
make a self-contained executable jruby application jar.
But, I cannot download anything from web…
That’s a problem then if rawr depends on that.
I tried use jrubyc to compile *.rb to *.class
and use 7-zip to create a jar file. (without jruby-complete.jar)
but the jar file cannot run, I will download the jar at home. And try
it.
Jar files are basically zip files, but with some extra info. You need
to include a Manifest file. Executable jars also require special
treatment.
To make a jar by hand you should use the Java jar command, not 7zip.
However, you’ll need t be sure you’ve placed things in the appropriate
jar directories such that your application code can find things. Rawr
was written to automate things like that.
It also creates application bundles (for example, .app for OS X, and
.exe for Win32. The exe bundle requires launch4j.
Launch4j - Cross-platform Java executable wrapper
For making a Windows installer for the resulting exe file and related
libs and resources, I’ve used NSIS from Nullsoft:
James
–
Neurogami - Smart application development
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Lei K. wrote:
James B. wrote:
3x:)
I finally have got the answer from:
http://blog.nicksieger.com/articles/2009/01/10/jruby-1-1-6-gems-in-a-jar
haha, I works! thanks bros!
I think the rawr is the same sequence as above, isn’t it?
Recorded in jruby+swing to exe
James B. wrote:
Lei K. wrote:
I tried to use rawr.
there is a flaw in using rawr:
every time you make an exe, It will download the jruby-complete.jar
Yes. I need to undo that, and allow the user to specify the source of
the jruby jar (which you will need, but it doesn’t have to come from the
jruby.org server.)If you do not already have jruby-complete.jar on your system you can’t
make a self-contained executable jruby application jar.But, I cannot download anything from web…
That’s a problem then if rawr depends on that.
I tried use jrubyc to compile *.rb to *.class
and use 7-zip to create a jar file. (without jruby-complete.jar)
but the jar file cannot run, I will download the jar at home. And try
it.Jar files are basically zip files, but with some extra info. You need
to include a Manifest file. Executable jars also require special
treatment.To make a jar by hand you should use the Java jar command, not 7zip.
However, you’ll need t be sure you’ve placed things in the appropriate
jar directories such that your application code can find things. Rawr
was written to automate things like that.It also creates application bundles (for example, .app for OS X, and
.exe for Win32. The exe bundle requires launch4j.Launch4j - Cross-platform Java executable wrapper
For making a Windows installer for the resulting exe file and related
libs and resources, I’ve used NSIS from Nullsoft:James
–
Neurogami - Smart application development
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I download the jar from home:0)
Here is my steps:
here is the problem:
what is about the gem ?
when lauching exe, it reports: gem no loaded: log4r
3x:)
On Mon, Jun 28, 2010 at 1:57 AM, Vladimir S. [email protected]
wrote:
Hi Lei,
I’m not really sure whether I understood your question or not… But
there is one trick available for JRuby native launcher on Windows that
may or may not be suitable for you. It is possible to rename jruby.exe
to something else, say myapp.exe, and launching myapp.exe would
actually equivalent to jruby -S myapp.Thanks,
–Vladimir
That sounds like a cool trick, but I can’t get it to work; when I run
the .exe it just hangs. It doesn’t seem to matter if I include ‘.rb’
in its filename or not, but if I name it ‘foo.exe’ it rightly says
‘jruby: No such file, directory, or command – foo’.
Version:
jruby 1.5.0 (ruby 1.8.7 patchlevel 249) (2010-05-12 6769999) (Java
HotSpot™ Client VM 1.6.0_13) [x86-java]
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Lei K. wrote:
I think the rawr is the same sequence as above, isn’t it?
More or less, and then some. It makes it easier to define assorted
properties, package things in particular ways, create executable
packages for multiple platforms, and the like.
Neurogami - Smart application development
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Thu, Jul 1, 2010 at 2:33 AM, Eric C.
[email protected] wrote:
Oh, I think I figured it out! My script’s filename started with
‘jruby-’; renaming it allowed the script to run. I assume this means
that jruby.exe only checks whether the filename starts with ‘jruby’
in order to determine if the .exe has been renamed or not.
Yep, jruby* is reserved for things like jrubyw.exe, for example.
Thanks,
–Vladimir
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Wed, Jun 30, 2010 at 7:02 PM, Eric C.
[email protected] wrote:
–Vladimir
That sounds like a cool trick, but I can’t get it to work; when I run
the .exe it just hangs. It doesn’t seem to matter if I include ‘.rb’
in its filename or not, but if I name it ‘foo.exe’ it rightly says
‘jruby: No such file, directory, or command – foo’.
Oh, I think I figured it out! My script’s filename started with
‘jruby-’; renaming it allowed the script to run. I assume this means
that jruby.exe only checks whether the filename starts with ‘jruby’
in order to determine if the .exe has been renamed or not.
Version:
jruby 1.5.0 (ruby 1.8.7 patchlevel 249) (2010-05-12 6769999) (Java
HotSpot™ Client VM 1.6.0_13) [x86-java]
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs