Fedora31安装OracleJDK

编程

Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
    at java.awt.Window.<init>(Window.java:536)
    at java.awt.Frame.<init>(Frame.java:420)
    at java.awt.Frame.<init>(Frame.java:385)
    at javax.swing.JFrame.<init>(JFrame.java:189)
    at net.sourceforge.tessboxeditor.Gui.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithMRU.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithEdit.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithSpinner.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithFont.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithLaF.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithTools.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithGenerator.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithTrainer.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithValidator.<init>(Unknown Source)
    at net.sourceforge.tessboxeditor.GuiWithValidator$1.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

所以特地安装Oracle的JDK,又遇到问题:

sudo dnf install  jdk-8u241-linux-x64.rpm

问题: conflicting requests
  - nothing provides /bin/basename needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/cp needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/ls needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/mkdir needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/mv needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/pwd needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
  - nothing provides /bin/sort needed by jdk-11.0.6-2000:11.0.6-ga.x86_64
(try to add "--skip-broken" to skip uninstallable packages) 

 正确步骤:

# cd jdk path

sudo rpm -Uvh jdk-8u241-linux-x64.rpm

sudo alternatives --config java

# cd jar path

sudo java -Xms128m -Xmx1024m -jar jTessBoxEditor.jar

JDK软件包下载:

链接: https://pan.baidu.com/s/1_H0TolU68wZGhda5SnqMbQ 提取码: 66ai 

以上是 Fedora31安装OracleJDK 的全部内容, 来源链接: utcz.com/z/513119.html

回到顶部