1
The following code normally functions:
package com.lucasdaniel;
package com.lucasdaniel;
import java.net.URL;
public class Main {
public static void main(String[] args) {
new Subclass();
}
static class Subclass {
public Subclass() {
URL resource = getClass().getResource("css.css");
System.out.println(resource);
}
}
}
But when I create module-info.java, Resource gets null.
build.Radle looks like this:
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}
group 'com.lucasdaniel'
version '1.0-SNAPSHOT'
mainClassName = "untitled/com.lucasdaniel.Main"
repositories {
mavenCentral()
}
javafx {
version '11.0.2'
modules = ['javafx.fxml', 'javafx.controls']
}
the project files are like this:
You’re running it inside a JAR?
– Victor Stafusa
I’m not running into jar
– Lucas Daniel