java 卸载 GlassFish 应用程序服务器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4704456/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 07:37:09  来源:igfitidea点击:

Uninstall GlassFish Application Server

javaglassfish

提问by Mark Estrada

How do you uninstall Glassfish Application Server?

如何卸载 Glassfish 应用程序服务器?

I made a mistake in my installation and I want to change the directory of my Glassfish installation.

我在安装中犯了一个错误,我想更改 Glassfish 安装的目录。

I just follow below sequence during installation.

我只是在安装过程中遵循以下顺序。

  1. Download the Glassfish V2 jar
  2. Run below line java -Xmx256m -jar glassfish-installer-v2.1.1-b31g-windows.jar
  3. Set the GLASSFISH_HOME variable
  1. 下载 Glassfish V2 jar
  2. 在下面运行 java -Xmx256m -jar glassfish-installer-v2.1.1-b31g-windows.jar
  3. 设置 GLASSFISH_HOME 变量

It says from the document that I saw from the net that there is an uninstall.exe option but I can seem to find one.

它从我从网上看到的文档中说有一个uninstall.exe选项,但我似乎可以找到一个。

回答by strauberry

There's a uninstall.sh shell script in the glashfish-folder. Execute this with sudo, otherwise the files can not be deleted!

glashfish 文件夹中有一个uninstall.sh shell 脚本。用sudo执行这个,否则文件无法删除!

回答by jk.

Just delete the contents of the directory to which glassfish was installed. You might also check for a file named .glassfish in your home directory, or something similar, and delete that as well.

只需删除安装 glassfish 的目录的内容即可。您还可以检查主目录中名为 .glassfish 的文件或类似的文件,然后将其删除。

I've worked with glassfish quite a bit and have never had problems removing it this way, though I can't say whether it is the 'official' way to do it.

我已经与 glassfish 一起工作了很多,并且以这种方式移除它从来没有遇到过问题,尽管我不能说这是否是“官方”的方式。

回答by uncaught_exceptions

Its a executable jar file and there are no register entries. So there is no need for an uninstall. Like the previous user had mentioned you just need to worry about any env variables pointing to obsolete glassfish location.

它是一个可执行的 jar 文件,没有注册条目。所以不需要卸载。就像之前的用户提到的那样,您只需要担心任何指向过时 glassfish 位置的 env 变量。

(Note: If you want to relocate just copy and paste to new folder).

(注意:如果您想重新定位只需复制并粘贴到新文件夹)。

回答by haliciad

The GlassFish Enterprise Server v2.1.1 Installation Guide includes a section on uninstalling. To uninstall a GlassFish that was installed using the JAR-based installer:

GlassFish Enterprise Server v2.1.1 安装指南包含有关卸载的部分。要卸载使用基于 JAR 的安装程序安装的 GlassFish:

Windows:go the the Explorer window, choose the glassfish directory and delete all its contents.

Windows:进入资源管理器窗口,选择 glassfish 目录并删除其所有内容。

Solaris/UNIX:run the following command: rm -r glassfish.

Solaris/UNIX:运行以下命令:rm -r glassfish。

http://docs.oracle.com/cd/E19879-01/821-0187/abnbk/index.html

http://docs.oracle.com/cd/E19879-01/821-0187/abnbk/index.html

回答by James Drinkard

These didn't work for me running java 1.6.0_24 in Windows 7:

这些对我在 Windows 7 中运行 java 1.6.0_24 不起作用:

  • I tried modifying the asenv.bat file that glassfish uses to find the jre to point to my jre.

  • I tried manually putting it in as in C:\glassfish3\uninstall.exe -j . This was per the official Oracle documentation.

  • 我尝试修改 glassfish 用来查找 jre 以指向我的 jre 的 asenv.bat 文件。

  • 我尝试手动将其放入 C:\glassfish3\uninstall.exe -j 。这是根据官方 Oracle 文档。

The only thing that worked was to use the original path and move the bin and lib folders from my java installation to the directory that the error dialog specified. Then the Glassfish uninstall started up and completed with no problems.

唯一有效的是使用原始路径并将 bin 和 lib 文件夹从我的 java 安装移动到错误对话框指定的目录。然后 Glassfish 卸载启动并顺利完成。

回答by JSS

doc_180, just cut and poaste won't help becuase many files insite the bin directory are generated at installation time and they keep the directory path. And you will not be able to start the server. So once directory has been moved to new location search for old directory entries and update them or delete the glassfish folder and start from scracth (later recommended).

doc_180,只是剪切和粘贴无济于事,因为 bin 目录中的许多文件是在安装时生成的,并且它们保留了目录路径。并且您将无法启动服务器。因此,一旦目录移动到新位置,搜索旧目录条目并更新它们或删除 glassfish 文件夹并从 scracth 开始(稍后推荐)。