如何从Mac bash上的命令行运行Gradle [英] How to run Gradle from the command line on Mac bash

查看:336
本文介绍了如何从Mac bash上的命令行运行Gradle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的问题。我是全新的Mac,我试图让我的Java项目移到我的新Mac。该项目有一个Gradlew文件,我认为我可以从命令行运行以在任何机器上构建和运行。当我从命令行(在gradlew文件的位置)执行gradlew时,它说没有找到gradlew。我错过了一些关于如何从bash shell运行命令的东西?

解决方案

./ gradlew



您的gradlew目录不包含在PATH中,因此您必须指定gradlew的路径。 表示当前目录。

I have a very simple question. I am brand new to Mac and I am trying to get my Java project moved over to my new Mac. The project has a Gradlew file that I thought I could run from the command line to build and run on any machine. When I do gradlew from the command line (in the location of the gradlew file) it says gradlew not found. Am I missing something on how to run a command from a bash shell?

解决方案

./gradlew

Your directory with gradlew is not included in the PATH, so you must specify path to the gradlew. . means "current directory".

这篇关于如何从Mac bash上的命令行运行Gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆