4

我有一些 bluehost 空间,想运行一个我用它写的 java 程序。

问题是我认为 bluehost 不支持 java。当我 ssh 进入然后键入时,javac -v我得到command not found.

无论如何将java文件导出到.jar我不能在bluehost服务器上运行这个java程序的东西?

4

1 回答 1

4

如果你想在你的 bluehost 服务器上运行一个 java 程序,你有几个选择。

选项 1. 获得专用主机,这可能会花费更多,然后您可以获得 sudo 访问权限并且您可以sudo yum install java.

如果您有专用的 bluehost 托管,那么:

Login to your Bluehost Control Panel
Click the Server quicklink
Scroll down to the Access Management section.
Click the Primary User tab.
Enable sudo

选项 2. 在本地沙箱中下载 java jdk 并在本地安装。

a.  From bluehost terminal run command `uname -m`  mine says 64 bit.
b.  Go download the 64 bit linux JDK .tar.gz
c.  untar it and install it to somewhere local.
d.  Add an alias so that javac and java are reachable from terminal.

选项 3. 制作您自己的服务器或虚拟机。

于 2015-03-21T14:24:25.637 回答