从 USB 拇指驱动器运行 glassfish
Is it possible to run glassfish from a USB thumb drive with no installation necessary? Anyone have a link to a tutorial or documentation about how to do this?
Similar Question:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
假设我们正在谈论 MS Windows。在 Linux 或其他系统上,步骤类似。
GlassFish 依赖于 JRE,因此您还需要将 JRE 存储在 USB 驱动器上(或依赖于系统 JRE)。实现此目的的最简单方法是将 JRE 安装到本地 PC,然后从“程序文件”中复制生成的目录。例如,将“C:\Program Files\Java\jre7”复制到“X:\glassfish\JRE”
然后,您需要下载 GlassFish zip 发行版并将其解压到所需的文件夹,例如“X:\glassfish”。
最后要做的是将 GlassFish 配置为使用 USB 驱动器中的 JRE。要实现此目的,请将以下行添加到文件“X:\glassfish\glassfish\config\asenv.bat”
现在您可以像往常一样使用 asadmin.bat start-domain 命令启动 GlassFish 服务器。您还可以创建自己的 bat 文件来启动和停止服务器。
Assume we are talking about MS Windows. On the linux or other systems the steps are similar.
GlassFish depends on JRE, thus you also need to store JRE on the USB drive (or depend on system JRE). The easiest way to achieve this is to install JRE to your local PC and just copy the resulting directory from your "Program files". For example, copy "C:\Program Files\Java\jre7" to "X:\glassfish\JRE"
Then, you need to download GlassFish zip distribution and extract it to the desired folder, say "X:\glassfish".
The last thing to do is to configure GlassFish to use the JRE from USB drive. To achieve this, add the following line to the file "X:\glassfish\glassfish\config\asenv.bat"
Now you may start your GlassFish server with the asadmin.bat start-domain command as usual. You could also create your own bat files for starting and stopping the server.
我不太确定 glassfish 和 USB 驱动器。我从闪存驱动器运行 NetBeans 和 tomcat,没有出现问题。我在通过 DropBox 服务同步的多台计算机上运行 glassfish,但情况有所不同。我做了很多实验,在闪存驱动器上收集良好的开发堆栈。对于其中的大多数内容,我在此处发布了相关博客。我的建议是为 glassfish 和一些 IDE 获取一个独立于操作系统的软件包(我使用 NetBeans,但 eclipse 也应该能够完成这项工作)并将它们提取到闪存驱动器上。您可能还需要将本地 JDK 安装复制到闪存驱动器。一旦你启动了 IDE,通常你只需要注册应用程序服务器,IDE 就会让你轻松管理它。
我希望这很清楚:)
I'm not exactly sure about glassfish and USB drive. I ran NetBeans and tomcat from flash drive and didn't have a problem. I ran glassfish on several computers synced through the DropBox service, but that is different. I made many experiments with collecting a good development stack on a flash drive. For most of them I blogged about here. My suggestion is to take an OS independent packages for glassfish and some IDE (I work with NetBeans but eclipse should also be very able do the job) and extract them on the flash drive. You might need to copy a local JDK installation to the flash drive also. Once you get the IDE running, generally you'll only need to register the application server, and the IDE will let you manage it easily.
I hope this was clear :)
我能够从 USB 记忆棒运行 GlassFish4。
我只是按照 https://glassfish.java.net/download.html 中的步骤操作
1.下载.zip
2.解压到U盘
3. 启动服务器(从 USB 位置)。启动大约需要 1.2 分钟
I was able to run GlassFish4 from a USB Stick.
I just followed the steps from https://glassfish.java.net/download.html
1. download the .zip
2. unzip it to USB stick
3. start the server(from the USB location). the start-up took some 1,2 minutes