如何在Linux中安装适用于Java 7的DCEVM?

前端之家收集整理的这篇文章主要介绍了如何在Linux中安装适用于Java 7的DCEVM?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
DCEVM的主要网站没有明确说明如何在Linux上安装DCEVM.在Linux中运行“java -jar installer.jar”(通过PuTTy访问时)给了我以下异常.
[admin@LINUXBox jdk1.7.0_55]$java -jar DCEVM-full-7u79-installer.jar
java.awt.HeadlessException:
No X11 DISPLAY variable was set,but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:224)
at com.github.dcevm.installer.MainWindow.<init>(MainWindow.java:43)
at com.github.dcevm.installer.Main.main(Main.java:46)
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set,but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1757)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1832)
at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1697)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638)
at com.github.dcevm.installer.Main.main(Main.java:51)

如果需要,我也准备使用安装了Desktop Linux的Virtual Box来尝试,然后我可以将(修补的JDK)复制到我原来的Linux框中.

那么,如何在Linux上安装DCEVM(对于Java 7)?我需要一台基于桌面的Linux吗?

编辑:
这是Sharad的第一个答案建议的几个命令的输出

[admin@TESTBEDPEGSEARCH jdk1.7.0_55]$echo $DISPLAY

[admin@TESTBEDPEGSEARCH jdk1.7.0_55]$java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03,mixed mode)

EDIT2:
我在Windows中使用DCEVM相当长的时间.

解决方法

DISPLAY变量仅在X11会话激活时设置.当您使用ssh登录远程机器时,通常不是这样.

有两种可能的解决方案:

>在Windows上安装X服务器(例如XMing),并在Putty会话(Connection> SSH> X11)中启用X11转发.这将显示Windows PC上的安装程序.>在图形会话中登录Linux主机,这将自动设置DISPLAY变量.

原文链接:https://www.f2er.com/linux/393820.html

猜你在找的Linux相关文章