Bug 1214 : Fixes for invoking Processing from arbitrary locations & passing arguments to command line version
Last modified: 2010-03-11 03:52




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
Christian
Assigned To:
fry

Attachment Type Created Size Actions
Patch for ticket 1214 patch 2009-03-18 21:21 1.33 KB

Description:   Opened: 2009-03-18 21:20
I am using Processing from SVN trunk (0166) on Linux. The provided processing shell script only
works for me when run from the toplevel directory in the unpacked distribution tree. When I put
the toplevel processing directory in my PATH and run processing from elsewhere, I get:

Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base

This is because in the current script, lib/*.jar can expand only when run locally, as part of the "for
LIB in ..." statement. I'm attaching a patch that fixes this, as follows:

- Putting lib/*.jar into quotation marks prevents accidental expansion when mentioned in the LIB
list.
- An added loop uses the strings in LIB, appended to APPDIR, and expands them to include the
intended .jar files.

Two additional tweaks:

- To make Processing itself find everything required, the directory is changed to APPDIR in a
subshell before invoked, so that upon return the directory remains unaffected.
- For the cmd invocation, you can get the effect of "$1" "$2" ... by using "$@".

Feedback is very welcome.

Cheers,
Christian
Additional Comment #1 From Christian 2009-03-18 21:21
edit]
Patch for ticket 1214
Additional Comment #2 From fry 2010-02-17 19:32
sorry, lost track of this. is it still relevant for the current code with
the linux script, or have these issues been covered with the more recent
updates?

thanks for looking into it!
Additional Comment #3 From Christian 2010-03-10 17:36
Hi Ben -- no, I'm no longer noticing the issue. I haven't read over the
most recent code, but I presume it's been fixed.
Additional Comment #4 From fry 2010-03-11 03:52
great, thanks for checking.