-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the run-jshell script to the bin/ #85
Conversation
bin/run-jshell
Outdated
echo "*****************************************" | ||
echo " " | ||
echo " " | ||
jshell --class-path "$JYPATH" $* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using "$@"
should allow better argument capture (see #79).
jshell --class-path "$JYPATH" $* | |
jshell --class-path "$JYPATH" "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, resolved (not sure why I don't see the "mark as resolved button", but if you have it, please click it, otherwise one of the repo admins will need to).
Made the recommended edit. Switched "$*" with "$@" for the command line inputs. |
Thanks.
I clicked the Closed with Comment, and now the pull request is marked as Closed. I don’t know if that did anything.
Mike
/\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\/
Experimental Nuclear Physicist
Professor/Chair Quantitative Sciences Department
Director Pre-engineering Program
Canisius College
716-888-2426
716-888-2499 (Chair’s Office)
/\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\/
On Aug 21, 2023, at 3:50 PM, Christopher Dilks ***@***.******@***.***>> wrote:
@c-dilks commented on this pull request.
________________________________
In bin/run-jshell<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_coatjava_pull_85-23discussion-5Fr1300576168&d=DwMCaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=-KNeEZI7ShpbkRX5FgA_3aDmyJJkbPigBmPHDUbP87k&m=25AxSdDWHfmyWCxS7N4tGAQYGuMVynBZr55Wlb6OgzMvGDcHD2wBn2LgHOyH5tas&s=Q4iNGaedTT_dZMnOhhPBPcb8qmyUzd8rST_9sgrYONs&e=>:
+do
+if [ -z "${JYPATH}" ] ; then
+JYPATH="$i"
+else
+JYPATH=${JYPATH}:"$i"
+fi
+done
+#-------------------------------------------------------------
+echo " "
+echo " "
+echo "*****************************************"
+echo "* Running COAT-JAVA JShell Scripts *"
+echo "*****************************************"
+echo " "
+echo " "
+jshell --class-path "$JYPATH" $*
Thanks, resolved (not sure why I don't see the "mark as resolved button", but if you have it, please click it, otherwise one of the repo admins will need to).
—
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_coatjava_pull_85-23discussion-5Fr1300576168&d=DwMCaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=-KNeEZI7ShpbkRX5FgA_3aDmyJJkbPigBmPHDUbP87k&m=25AxSdDWHfmyWCxS7N4tGAQYGuMVynBZr55Wlb6OgzMvGDcHD2wBn2LgHOyH5tas&s=Q4iNGaedTT_dZMnOhhPBPcb8qmyUzd8rST_9sgrYONs&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABZICSNSQ66EWGQLAJRU533XWO3W7ANCNFSM6AAAAAA3XXD2F4&d=DwMCaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=-KNeEZI7ShpbkRX5FgA_3aDmyJJkbPigBmPHDUbP87k&m=25AxSdDWHfmyWCxS7N4tGAQYGuMVynBZr55Wlb6OgzMvGDcHD2wBn2LgHOyH5tas&s=SSa0DBp0jDFAn5qWkkqcXetqc6-G9LcnnULwPS3CupM&e=>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
"Closed" means this Pull Request will no longer be considered for merging; you should re-open it (unless you no longer want it); I believe there is a button near the bottom to do this. |
On the other hand, my comments above were part of a "Review", and "Review Conversations" typically need to be "Resolved" before the maintainers can merge a Pull Request. You've added the commit, but there should be a "Resolve" button somewhere near my comments above (if not, the maintainers can do this). |
echo "*****************************************" | ||
echo " " | ||
echo " " | ||
jshell --class-path "$JYPATH" "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to export JAVA_OPTS
too, as bin/run-groovy
does?
On that note, this script has significant overlap with bin/run-groovy
, which makes me wonder if they could be combined, e.g., move common things like JYPATH
into bin/env.sh
... any thoughts @baltzell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From some discussion today, we are fine with the repetition.
I will admit that my script is a cut and paste of run-groovy. Maybe we could streamline it by moving the environment variables to env.sh.
Mike
/\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\/
Professor of Physics
Director of the Pre-Engineering Program
Chair of the Quantitative Sciences Department
Canisius College
716-888-2426
/\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\//\/\\-\\/\/
On Aug 21, 2023, at 4:10 PM, Christopher Dilks ***@***.***> wrote:
CAUTION: This email was sent from outside of Canisius University.
Do not open attachments or click on links from unknown senders or unexpected emails.
@c-dilks commented on this pull request.
________________________________
In bin/run-jshell<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_coatjava_pull_85-23discussion-5Fr1300597413&d=DwMCaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=-KNeEZI7ShpbkRX5FgA_3aDmyJJkbPigBmPHDUbP87k&m=YrvulSuYq3tNn-NEQY_BfrswkODcz558egaaqt7-1N_W7XlQAhfwnMQbXvltosgS&s=QuVX0AYci987M4nRfpGcFekhlzPi57Zlnav1XDYQjmE&e=>:
+do
+if [ -z "${JYPATH}" ] ; then
+JYPATH="$i"
+else
+JYPATH=${JYPATH}:"$i"
+fi
+done
+#-------------------------------------------------------------
+echo " "
+echo " "
+echo "*****************************************"
+echo "* Running COAT-JAVA JShell Scripts *"
+echo "*****************************************"
+echo " "
+echo " "
+jshell --class-path "$JYPATH" "$@"
Do you need to export JAVA_OPTS too, as bin/run-groovy does?
On that note, this script has significant overlap with bin/run-groovy, which makes me wonder if they could be combined (e.g., move common things like JYPATH into bin/env.sh... any thoughts @baltzell<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_baltzell&d=DwMCaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=-KNeEZI7ShpbkRX5FgA_3aDmyJJkbPigBmPHDUbP87k&m=YrvulSuYq3tNn-NEQY_BfrswkODcz558egaaqt7-1N_W7XlQAhfwnMQbXvltosgS&s=6QrI7y0MjGXupuSp6EAhGPhmit51Cg20fCGCd6Mfa64&e=>?
—
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_coatjava_pull_85-23pullrequestreview-2D1587797176&d=DwMCaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=-KNeEZI7ShpbkRX5FgA_3aDmyJJkbPigBmPHDUbP87k&m=YrvulSuYq3tNn-NEQY_BfrswkODcz558egaaqt7-1N_W7XlQAhfwnMQbXvltosgS&s=ZchCo78SkOGgTNPIRv6iiNqbSgA2Jb-SxMAa127SHHM&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABZICSPYE4M5Z62VEJPNYTDXWO6C5ANCNFSM6AAAAAA3XXD2F4&d=DwMCaQ&c=CJqEzB1piLOyyvZjb8YUQw&r=-KNeEZI7ShpbkRX5FgA_3aDmyJJkbPigBmPHDUbP87k&m=YrvulSuYq3tNn-NEQY_BfrswkODcz558egaaqt7-1N_W7XlQAhfwnMQbXvltosgS&s=9m2fcxvWbkj3aIA8TnKRBchu2nQB7GfRhFwP6BH9DDA&e=>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Added a bash script called run-shell that will open the jshell interactive session and load the jar files in coatjava/lib to the class-path. The user does not need to add the jar files as options on the command line or set them as environment variables.