如何在mac中运行.jar? [英] How to run a .jar in mac?

查看:1188
本文介绍了如何在mac中运行.jar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我写了一个相对简单的java应用程序。我在我的电脑上安装了JDK,但我需要它在Mac上运行才能上学。 .jar在我的电脑上完美运行,但我在我的macintosh上测试了它(顺便说一下,没有安装JDK)。那么......为什么不在mac上运行?我怎样才能解决这个问题?是否可能修复它?

Ok, so i've written a relatively simple java application. I have JDK on my PC, but I need it to run on a mac for school. The .jar runs perfectly on my PC, but I tested it on my macintosh (which, btw, does not have JDK installed). So...why isn't it running on mac? How can I fix this? Is fixing it even possible?

推荐答案

您不需要 JDK 运行基于Java的程序。 JDK 用于开发,代表 Java Development Kit

You don't need JDK to run Java based programs. JDK is for development which stands for Java Development Kit.

你需要 JRE 哪些应该在Mac中。

You need JRE which should be there in Mac.

尝试: java - jar Myjar_file.jar

编辑:根据这篇文章,适用于Mac OS 10

According to this article, for Mac OS 10


作为
操作系统安装的一部分,不再自动安装Java运行库。

The Java runtime is no longer installed automatically as part of the OS installation.

然后,您需要安装JRE到您的机器。

Then, you need to install JRE to your machine.

这篇关于如何在mac中运行.jar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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