Java 带有 JRE 的便携式 Eclipse
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18129626/
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
Portable Eclipse with JRE
提问by jsan
I'm not able to run a majority of programs from my work computer due to JRE <= 1.6 does not support switch statements for Strings. As I'm not able to install or update due to admin restrictions, would it be possible to create a portable Eclipse on a USB that incorporates the JRE (1.7) as well?
由于 JRE <= 1.6 不支持字符串的 switch 语句,我无法从我的工作计算机上运行大多数程序。由于管理员限制,我无法安装或更新,是否可以在包含 JRE (1.7) 的 USB 上创建便携式 Eclipse?
采纳答案by Gilbert Le Blanc
The Eclipse part is easy. Just unzip Eclipse on your USB.
Eclipse 部分很简单。只需在您的 USB 上解压缩 Eclipse。
You'll have to install Java to your USB. Afterwards, go into Eclipse Window -> Preferences; Java -> Installed JREs and make sure your Java JRE or JDK is listed and the default.
您必须在 USB 上安装 Java。然后,进入 Eclipse Window -> Preferences; Java -> Installed JREs 并确保您的 Java JRE 或 JDK 已列出并且是默认值。
Create your workspace on the USB, and you should be ready to go.
在 USB 上创建您的工作区,您应该准备好了。
回答by Sergey Toporkov
Just put your eclipse and jdk7 on the flash and run from flash. Set JDK in eclipse: Window->Preference->Java->Installed JRE...
只需将您的 eclipse 和 jdk7 放在 flash 上并从 flash 运行。在eclipse中设置JDK:Window->Preference->Java->Installed JRE...
回答by Cheung
In my experience, since Eclipse upgraded from Indigo to Juno, the .zip they provide is already portable. It no longer creates any folders or files in the Windows user data folder.
根据我的经验,自从 Eclipse 从 Indigo 升级到 Juno,他们提供的 .zip 已经是可移植的。它不再在 Windows 用户数据文件夹中创建任何文件夹或文件。
回答by Stevoisiak
It's fairly easy to run Eclipse on a USB drive. You just need to make sure it knows to look for Java on your USB drive rather than on the host computer.
在 USB 驱动器上运行 Eclipse 相当容易。您只需要确保它知道在您的 USB 驱动器上而不是在主机上查找 Java。
If you have Java Portableinstalled on your drive, you can tell Eclipse to use it by adding the following to your eclipse.ini
file.
如果您的驱动器上安装了Java Portable,您可以通过将以下内容添加到您的eclipse.ini
文件中来告诉 Eclipse 使用它。
-vm
/PortableApps/CommonFiles/Java64/bin/javaw.exe
Note that Eclipse Portablestores the file as EclipsePortable\App\eclipse\eclipse.ini
.
请注意,Eclipse Portable将文件存储为EclipsePortable\App\eclipse\eclipse.ini
.