如何让 Eclipse 在 Windows 10 任务栏和程序搜索中表现良好?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32728018/
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
How to make Eclipse behave well in the Windows 10 taskbar and program search?
提问by icyitscold
This question is very similar to its famed windows 7 counterpart, but the same solution no longer works on windows 10 so it seems like the new platform is worthy of its own question.
这个问题与其著名的 windows 7对应问题非常相似,但相同的解决方案不再适用于 windows 10,因此似乎新平台值得提出自己的问题。
Of course, everybody who uses eclipse on windows has hit this age old bug at one point of another - documented here- but for those who aren't familiar, the TL;DR is that you get two taskbar icons for eclipse because the eclipse launcher (eclipse.exe) and the eclipse workspace (JVM) are two separate processes and you can't pin the workspace process. It looks like they wont fix this in the near term so we're reliant on workarounds for now.
当然,在 Windows 上使用 eclipse 的每个人都曾遇到过这个古老的错误 - 记录在这里- 但对于那些不熟悉的人来说,TL;DR 是因为 eclipse 启动器,所以你会得到两个用于 eclipse 的任务栏图标(eclipse.exe) 和 eclipse 工作区 (JVM) 是两个独立的进程,您无法固定工作区进程。看起来他们不会在短期内解决这个问题,所以我们现在依赖于变通方法。
Has anybody gotten eclipse to work with Windows 10 taskbar? What about start menu search (a.k.a. cortana). The post herewalks through start menu pinning but windows search doesn't pick up the shortcut, unfortunately
有没有人让 Eclipse 与 Windows 10 任务栏一起工作?开始菜单搜索(又名 cortana)呢?此处的帖子介绍了开始菜单固定,但不幸的是,Windows 搜索没有选择快捷方式
采纳答案by icyitscold
The answer was staring me in the face all along - at least for the taskbar. Full credit to Timo Kinnunen who had already posted this workaround in the in the bugzilla report
答案一直盯着我的脸 - 至少对于任务栏。完全归功于 Timo Kinnunen,他已经在bugzilla 报告中发布了此解决方法
1) Edit the plugin.xml file of your selected Eclipse version ("product") and erase the following line:
1) 编辑您选择的 Eclipse 版本(“产品”)的 plugin.xml 文件并删除以下行:
<property name="appName" value="Eclipse"/>
This should be done before starting the installation for the first time, because the property value gets cached and the change won't have effect before the cache is cleared. The correct file to edit varies:
这应该在第一次开始安装之前完成,因为属性值会被缓存,并且在清除缓存之前更改不会生效。要编辑的正确文件各不相同:
- \plugins\org.eclipse.sdk_4.4.0.v20140123-1600
- \plugins\org.eclipse.epp.package.standard_2.1.0.20131103-0830
- \plugins\org.eclipse.epp.package.jee_4.5.0.20150621-1200
- \plugins\org.eclipse.sdk_4.4.0.v20140123-1600
- \plugins\org.eclipse.epp.package.standard_2.1.0.20131103-0830
- \plugins\org.eclipse.epp.package.jee_4.5.0.20150621-1200
2) Edit eclipse.ini to add these lines at the end before the line --launcher.appendVmargs
, add this:
2) 编辑 eclipse.ini 以在行前的末尾添加这些行--launcher.appendVmargs
,添加以下内容:
-vm
C:/Program Files/Java/jdk1.8.0/jre/bin/server/jvm.dll
This causes the JVM to be launched in the same process as eclipse.exe rather than as a child process and avoids the intricacies of Host Processes with AppUserModelIDs.
这会导致 JVM 在与 eclipse.exe 相同的进程中启动,而不是作为子进程启动,并避免了具有 AppUserModelID 的主机进程的复杂性。
3) Launch Eclipse by double-clicking eclipse.exe. Only once the workspace is open select "Pin this program to taskbar" from the taskbar icon.
3) 双击 eclipse.exe 启动 Eclipse。只有打开工作区后,才能从任务栏图标中选择“将此程序固定到任务栏”。
回答by Shannon Smith
This is an updated version of icyitscold's answer that doesn't require uninstalling/reinstalling eclipse.
这是 icyitscold 答案的更新版本,不需要卸载/重新安装 eclipse。
1) Unpin any eclipse icons
2) Run "eclipse.exe -clean" to clear the cache and then close eclipse
3) Modify
./plugins/org.eclipse.epp.package.xxxxx/plugin.xml
The folder varies based on which version of eclipse you are using: j2ee, java, c++ etc.
Change the appName property - call it "MyEclipse" or something.
4) Edit the eclipse.ini to add:
1) 取消固定所有 eclipse 图标
2) 运行“eclipse.exe -clean”清除缓存,然后关闭 eclipse
3) 修改
./plugins/org.eclipse.epp.package.xxxxx/plugin.xml
文件夹因您使用的 eclipse 版本而异:j2ee、java、c++ 等。
更改 appName属性 - 将其称为“MyEclipse”或其他名称。
4)编辑eclipse.ini添加:
-vm
C:/Program Files/Java/jdk1.8.0/jre/bin/server/jvm.dll
Or wherever your JDK is before the line:
或者您的 JDK 位于该行之前的任何位置:
--launcher.appendVmargs
5) Run eclipse and open a workspace, pin the eclipse icon after it's loaded.
5)运行eclipse并打开一个工作区,加载后固定eclipse图标。
Credit to icyitscold, Ruslan Gainutdinov, Timo Kinnunen
感谢 icyitscold、Ruslan Gainutdinov、Timo Kinnunen
回答by Charles Goodwin
Fix for Eclipse Neon + Oxygen + Photon + 2019?06
修复 Eclipse Neon + Oxygen + Photon + 2019?06
This was pretty simple 2 step process, no editing required.
这是非常简单的两步过程,无需编辑。
Close all Eclipse instances and unpin the non-working icon
Open up Eclipse. DO NOT PIN yet. Select a workspace, let the main Eclipse window load. Pin that (right click on the icon -> Pin to taskbar).
关闭所有 Eclipse 实例并取消固定非工作图标
打开 Eclipse。暂时不要PIN。选择一个工作区,让主 Eclipse 窗口加载。固定(右键单击图标 -> 固定到任务栏)。
That worked perfectly for me.
这对我来说非常有效。
回答by Jobayer Ahmmed
For windows 10, go to extracted eclipse folder, right click on eclipse.exe
and
对于 Windows 10,转到解压缩的 eclipse 文件夹,右键单击eclipse.exe
并
- To pin to taskbar, select
Pin to taskbar
- To pin to Start menu, select
Pin to Start
- 要固定到任务栏,请选择
Pin to taskbar
- 要固定到“开始”菜单,请选择
Pin to Start
回答by erdalprinz
The steps described in this post worked for me, to get rid of the duplicated item in the taskbar (Windows 10 + eclipse Oxygen):
这篇文章中描述的步骤对我有用,可以摆脱任务栏中的重复项(Windows 10 + eclipse Oxygen):
回答by the_p_unit
This was way easier than I expected..here's what I did in Win 10.
这比我预期的要容易得多……这是我在 Win 10 中所做的。
- Went to unzipped Eclipse folder and right clicked on the Eclipse Icon and 'created shortcut by using Send to Desktop.
- Once the shortcut appeared on my Desktop,,right clicked the icon and chose 'Pin to Taskbar'
- 转到解压缩的 Eclipse 文件夹并右键单击 Eclipse 图标并“使用发送到桌面创建快捷方式”。
- 一旦快捷方式出现在我的桌面上,右键单击该图标并选择“固定到任务栏”
Done!....simple..no?
完成!....简单...不是吗?