什么是纯Java HTML查看器和渲染器?要求是:
JComponent放置在Scrollable窗格中的接口.我只知道一些组件和项目,其中一些现在已经不存在了:
JEditorPane,支持HTML 3.2(自Java 1.4起)javax.swing.text.html.HTMLEditorKit)JWebPane (它是否曾被发布)?是否可以在pom.xml中将JavaFX 2.0作为Maven中的依赖项引用,以便一切顺利进行?
我在这个问题中看到可以在本地安装jfxrt.jar,但理想情况下我想要一个更简单的方法,可以正确地解析和下载依赖,而无需任何本地黑客....
我有一个Java FX项目,我正在使用maven 3.0.5来构建.当我运行mvn package/install时,项目失败并抱怨包javafx.*不存在.根据我的理解,Javafx打包在Java 1.7中,因此构建不会选择它是没有意义的.当我在我的IDE(intellij)中编译它时它工作正常,之后我的maven构建也成功安装,但是我不希望每次我进行干净安装时都要通过IDE.有任何想法吗?
这是我的pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>thenaglecode</artifactId>
<groupId>com.thenaglecode</groupId>
<version>1.0.0.Pre-Alpha</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>system-setup</artifactId>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-vfs2</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<includeEmptyDirs>true</includeEmptyDirs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<jre>
<path>C:\Program Files\Java\jre7</path>
<minVersion>1.7.0</minVersion>
<initialHeapSize>128</initialHeapSize>
<maxHeapSize>1024</maxHeapSize>
</jre>
<jar>${project.build.directory}/${project.build.finalName}.jar</jar> …Run Code Online (Sandbox Code Playgroud) JavaFX应该包含在最新版本的JDK中.我正在使用1.7 v 17.进口如:
import javafx.fxml.Initializable;
Run Code Online (Sandbox Code Playgroud)
不被承认.我宁愿不必手动链接到jar.
我之前听说这是一个错误,但应该已经修好了.http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166330
有没有人对如何识别javafx有答案.我不想让e(fx)clipe为我做,我不想连接jar.据我所知,它现在包含在最新版本的jdk中,因此我应该能够像上面那样进行导入吗?
尝试在环境中编译JavaFX应用程序时:
java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.18.04.1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
Run Code Online (Sandbox Code Playgroud)
我收到错误消息:
cannot access javafx.event.EventHandler
[ERROR] class file for javafx.event.EventHandler not found
Run Code Online (Sandbox Code Playgroud)
我尝试通过以下链接找到解决方案:
最有希望的行动在哪里
但是错误仍然存在。
要使OpenJDK 8和JavaFX在Ubuntu 18.04.2 LTS上运行需要做什么?