Project

General

Profile

Actions

Bug #4983

closed

cannot run kepler.sh in RC2

Added by Daniel Crawl almost 14 years ago. Updated almost 14 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
execution engine
Target version:
Start date:
05/07/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4983

Description

  1. /Applications/Kepler-2.0-RC2/Kepler.app/Kepler/kepler.sh
    Exception in thread "main" java.lang.NoClassDefFoundError: org/kepler/build/runner/Kepler

Related issues

Blocked by Kepler - Bug #4943: RC5 Installer Tracking BugResolvedDavid Welker04/19/2010

Actions
Actions #1

Updated by Daniel Crawl almost 14 years ago

This works if kepler.sh/bat is in the current directory.

Actions #2

Updated by David Welker almost 14 years ago

This bug is still true in RC 3. If you are in the same directory as kepler.sh or kepler.bat, it works, but if not, it doesn't. Is this something that should work differently?

Actions #3

Updated by Christopher Brooks almost 14 years ago

This works for me:
--start--
#!/bin/sh -x
  1. This script starts Kepler.
  2. Run with -h to see all command-line options.
  3. This script is auto-generated by the 'ant startupScript' command
    keplerScriptPath=$0
    kepler=`dirname $keplerScriptPath`
    java -classpath ${kepler}/build-area/lib/ant.jar:${kepler}/kepler.jar org.kepler.build.runner.Kepler "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"

end-

Actions #4

Updated by David Welker almost 14 years ago

Should I close this bug?

Actions #5

Updated by Christopher Brooks almost 14 years ago

The acceptance criteria to close this bug would be for
"ant startup-script"

to create a kepler/kepler.sh script that properly invokes Kepler
in a directory other than the kepler directory.

Also, kepler.bat should be checked and possibly fixed.

Actions #6

Updated by Sean Riddle almost 14 years ago

I have a script that works for kepler.sh. I haven't integrated it into the startup-script target yet, though. It's attached below. Does anybody have a problem with using /bin/bash instead of /bin/sh? It's a lot easier to robustly get the location of the script with bash.

#!/bin/bash
  1. This script starts Kepler.
  2. Run with -h to see all command-line options.
  3. This script is auto-generated by the 'ant startupScript' command
    #CURDIR=`pwd`
    #cd $(dirname $0)
    #echo `dirname $0`
    CUR_DIR=`pwd`
    SCRIPT_DIR=`dirname $BASH_SOURCE`
    echo $SCRIPT_DIR
    cd $SCRIPT_DIR
    java -classpath build-area/lib/ant.jar:kepler.jar org.kepler.build.runner.Kepler "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
    echo $CUR_DIR
    cd $CUR_DIR
Actions #7

Updated by Sean Riddle almost 14 years ago

Fixed in r24623 in trunk build-area (script works from any directory on a Mac). Is there a separate 2.0 build-area that's getting used for anything?

Actions #9

Updated by Sean Riddle almost 14 years ago

Okay, patched in branch as well.

Actions #10

Updated by Christopher Brooks almost 14 years ago

Thanks for taking a look at this.
One issue is that by changing directories to the script directory,
starting java and then changing to the CUR_DIR is that
the Java process will have java.user.dir (or whatever it is)
set to the the script directory.

This would be confusing because if I start kepler.sh in a directory
and then do File|Open, I'll be in the Kepler script directory.

Most scripts, when invoked from a command line prompt, have
the current directory of the program be the directory in which the
script was invoked.

A fix would be to add SCRIPT_DIR to the classpath:

-classpath "${SCRIPT_DIR}/build-area/lib/ant.jar:${SCRIPT_DIR}kepler.jar"

Also, be sure to test your script in a directory that has spaces
in the path and a Kepler installation that has spaces in the path.

Actions #11

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 4983

Actions

Also available in: Atom PDF