Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, 25 August 2013

The Gtk+ look and feel using openjdk

I just did some further experiments with my ruby-processing file chooser, and now I think the "Gtk+" look and feel might be the way to go on linux:-
However it is not that you should call the "Gtk+" look and feel, you should probably call "Metal", but specify system wide that the system and default look and feel is GTK (on archlinux you can do this in /etc/jre.sh in others you might use a flag or otherwise specify an environmental variable, be sure to set GTK fonts too).

Wednesday, 10 April 2013

A simple install of jruby on linux for individual users

You absolutely should not install jruby supplied by your distribution (well at least not if it is debian based, actually ArchLinux version is OK) it will be hopelessly out of date and you will probably have no control over java version used.
OK you don't want anything too complicated so why not just unzip the tar file in your home directory (or possibly in /opt). So now you have folder jruby-1.7.4 with a sub folder bin. So now all you need to add that bin to your PATH in your .bashrc, then source .bashrc to update. Now when you type 'which jruby' it should point to the ~/jruby-1.7.4/bin/jruby
Actually in practice it is probably more convenient to create a symbolic link to say /usr/local/bin/jruby. I found rvm to be a real pig and probably over complicated, but that or brew may be way to go on the Mac? Actually I'm warming the idea of creating my own jruby script, in which I can set the java version and export JAVA_HOME and JRUBY_HOME also could set 'global' jruby args such as invoke-dynamic, see below (it is unfortunate the way -J--XX command gets split over two lines here).
#!/usr/bin/env bash
export RUBYOPT=rubygems
export JAVA_HOME=/opt/jdk1.7.0_40
export JRUBY_HOME=/opt/jruby-1.7.4
${JRUBY_HOME}/bin/jruby -J-XX:CompileCommand=dontinline,org.jruby.runtime.invokedynamic.InvokeDynamicSupport::invocationFallback $@

For installing gems using jgem or jruby -S gem you migh want to take a look at this .bashrc file I use on Archlinux (for ubuntu gems are /var/lib/gems/etc)
https://gist.github.com/monkstone/7614877

Followers

About Me

My photo
I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2