相关疑难解决方法(0)

如何使用java 10在maven中添加javafx依赖项

我切换到ubuntu 18.04.其中java 10默认为jvm

现在我使用javafx的应用程序无法再编译了.

 cannot find symbol
[ERROR]   symbol:   class ObservableMap
Run Code Online (Sandbox Code Playgroud)

我尝试将参数添加到maven-compiler-plugin以加载javafx.graphics模块.

        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <compilerArgs>
                    <arg>--add-modules</arg>
                    <arg>javafx.graphics</arg>
                </compilerArgs>
            </configuration>
        </plugin>
Run Code Online (Sandbox Code Playgroud)

结果:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] module not found: javafx.graphics
Run Code Online (Sandbox Code Playgroud)

当然,java --list-modules | grep fx什么都不返回.

我花了10多个小时试图解决这个问题.

TL:DR我应该怎么做用Java 10编译我的JavaFX模块?

最小项目:

/pom.xml

<project>
    <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>
    <name>java10fx</name>

    <artifactId>java10fx</artifactId>
    <version>0.0.1</version>
    <groupId>my.test</groupId>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <release>10</release>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
Run Code Online (Sandbox Code Playgroud)

/src/main/java/MyApp.java

import javafx.application.Application;
import javafx.stage.Stage;

public class MyApp  extends Application{

    public static void main(String[] args) {
        launch(args);
    } …
Run Code Online (Sandbox Code Playgroud)

java ubuntu javafx java-10

2
推荐指数
1
解决办法
3175
查看次数

What happened to the J2EE jar on Maven Central?

I have a legacy project with this dependency:

<dependency>
    <groupId>javax.j2ee</groupId>
    <artifactId>j2ee</artifactId>
    <version>1.4</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

Although, I can find this on Maven here, if I try to download the jar I get a 404.

So what happened to this jar? With what should I replace it?

Thanks

java maven maven-central jakarta-ee

2
推荐指数
1
解决办法
972
查看次数

如何在防火墙后面安装Leiningen软件包?

我使用本地库进行一些开发,但防火墙可以防止很多互联网站点.有没有办法手动下载工件?

我的project.clj是:

https://github.com/zubairq/coils/blob/master/project.clj?
Run Code Online (Sandbox Code Playgroud)

更新

从给出的评论中我了解到采取的步骤是:

1) Install Maven

2) Find out which jars are in my project (How can I do this based on my project.clj?)
Run Code Online (Sandbox Code Playgroud)

clojure leiningen clojurescript lighttable

1
推荐指数
1
解决办法
2211
查看次数

使用oracle作为数据库打包spring boot应用程序

我正在尝试打包我的spring boot应用程序,以便可以将其部署在tomcat服务器上。观看完youtube视频后,我扩展了SpringBootServletInitializer类并进行了一些更改。

 @ComponentScan("com.infodev.loksewa")
    @SpringBootApplication
    public class LoksewaApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(LoksewaApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(LoksewaApplication.class);
    }
}
Run Code Online (Sandbox Code Playgroud)

pox.xml

<?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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.infodev</groupId>
    <artifactId>loksewa</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>loksewa</name>
    <description>Demo project for Spring Boot</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency> …
Run Code Online (Sandbox Code Playgroud)

java intellij-idea spring-boot

1
推荐指数
1
解决办法
1789
查看次数