简体   繁体   English

如何在Linux上为Aptana设置内部浏览器

[英]How to set up internal browser for Aptana on Linux

I downloaded the Aptana_Studio_Setup_Linux.zip package, unpacked it and run ./AptanaStudio. 我下载了Aptana_Studio_Setup_Linux.zip包,解压缩并运行./AptanaStudio。 It starts fine, but reports one problem: 它开始很好,但报告一个问题:

The embedded browser widget for this editor cannot be created. 无法创建此编辑器的嵌入式浏览器窗口小部件。 It is either not available for your operating system or the system needs to be configured in order to support embedded browser. 它不适用于您的操作系统,或者需要配置系统以支持嵌入式浏览器。

After that, it opens the "Welcome page" in external browser (Mozilla), but when I click on a link to install PHP support it does not open the destination target. 之后,它会在外部浏览器(Mozilla)中打开“欢迎页面”,但是当我单击链接以安装PHP支持时,它不会打开目标目标。 No wonder, because the link is in format: com.aptana....etc. 难怪,因为链接格式为:com.aptana ....等。 Ie written in reverse. 即反过来写的。 I assume such links only work with internal browser. 我假设此类链接仅适用于内部浏览器。

If I look into details, I get these error messages: 如果我查看详细信息,我会收到以下错误消息:

No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
at org.eclipse.swt.SWT.error(SWT.java:3400)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:138)
at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:224)
at org.eclipse.ui.internal.browser.WebBrowserEditor.createPartControl(WebBrowserEditor.java:78)
at com.aptana.ide.intro.browser.CoreBrowserEditor.createPartControl(CoreBrowserEditor.java:138)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)

etc. I hope this is enough. 我希望这就够了。

I tried to set the env. 我试着设置环境。 variable: 变量:

export MOZILLA_FIVE_HOME=/usr/lib/mozilla/

However, it only changes the error message to: 但是,它只将错误消息更改为:

No more handles [NS_InitEmbedding /usr/lib/mozilla/ error -2147221164]
org.eclipse.swt.SWTError: No more handles [NS_InitEmbedding /usr/lib/mozilla/ error -2147221164]
at org.eclipse.swt.SWT.error(SWT.java:3400)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:225)
at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:224)
at org.eclipse.ui.internal.browser.WebBrowserEditor.createPartControl(WebBrowserEditor.java:78)
at com.aptana.ide.intro.browser.CoreBrowserEditor.createPartControl(CoreBrowserEditor.java:138)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)

For start I really want to have PHP working, but I'd also like to fix the whole internal browser issue in the end. 首先,我真的想让PHP工作,但我还想最终修复整个内部浏览器问题。

I happened to come across this: https://groups.google.com/forum/#!msg/xmind/5SjPTy0MmEo/PbPi0OGzqPwJ 我碰巧碰到了这个问题: https//groups.google.com/forum/#!msg / xmind / 5SjPTy0MmEo /PbPi0OGzqPwJ

Which advised running: 建议运行:

sudo apt-get install libwebkitgtk-1.0-0

should solve the problem. 应该解决问题。 It worked for me so I figured I'd share here. 它对我有用,所以我想我会在这里分享。

FWIW, I ended up here while trying to get the Play! FWIW,我在试图获得游戏时最终到了这里! Framework working on Ubuntu 13.04. 在Ubuntu 13.04上工作的框架。 using the Scala-IDE. 使用Scala-IDE。 So far, everything seems to be working... 到目前为止,一切似乎都在起作用......

You will have to install XULRunner then edit the eclipse.ini. 您必须安装XULRunner然后编辑eclipse.ini。

After installing xulrunner, adding the following line in the eclipse.ini solved the problem of "No more handles" issue. 安装xulrunner后,在eclipse.ini中添加以下行解决了“不再处理”问题。

-Dorg.eclipse.swt.browser.XULRunnerPath=/opt/eclipse/xulrunner/ -Dorg.eclipse.swt.browser.XULRunnerPath = /选择/蚀/ xulrunner的/

I am using eclipse 3.63 and ubuntu 12.04. 我使用的是eclipse 3.63和ubuntu 12.04。

您需要从mozilla.org下载并安装XULRunner,并将MOZILLA_FIVE_HOME指向该目录。

安装xulrunner后,你需要设置:

MOZILLA_FIVE_HOME=/usr/lib/xulrunner

Edit: getting internal browser to work is NOT required in order to get PHP support in Aptana. 编辑:为了在Aptana中获得PHP支持,不需要让内部浏览器工作。 Just install PHP support from Help , Software updates menu. 只需从“ 帮助” ,“ 软件更新”菜单中安装PHP支持

If this is the problem I think you're having, just installing Firefox 2 (alongside FF3) should fix the issue. 如果这是我认为你遇到的问题,只需安装Firefox 2(和FF3一起)就可以解决问题。 It happens because Aptana can only use FF2 at the moment. 这是因为Aptana目前只能使用FF2。 Hopefully they'll fix this soon. 希望他们能很快解决这个问题。

If you're on Ubuntu, it's really just a case of: 如果你在Ubuntu上,它只是一个例子:

sudo apt-get install firefox-2

Naturally, the process will vary on different distributions. 当然,该过程将根据不同的分布而变化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM