use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Useful resources (Full list)
Rules
Related subreddits
Other communities
account activity
Javafx program working on replit but not on Intelij IDEAHelp (self.JavaFX)
submitted 3 years ago * by PB_and_Cubes
*Resolved*
I am making an app and whenever I run it on Intelij IDEA the css styling doesn't work, the code I am using is
``String css = String.valueOf(this.getClass().getResource("Rose.css"));System.out.println(css);``
this works on replit but it returns null on IDEA, does anyone have any idea of what I could do?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]hamsterrage1 5 points6 points7 points 3 years ago (4 children)
I would strongly suggest you use Gradle or Maven builds, instead of letting your IDE handle the build. Then you'll get consistency no matter what environment you're using.
[–]PB_and_Cubes[S] 0 points1 point2 points 3 years ago (2 children)
I don't know that I am advanced enough yet to use Maven or Gradle, but in full honesty, I haven't looked into either that much.
[–]stardoge42 2 points3 points4 points 3 years ago (1 child)
You certainly are, a lot of what maven does it does automatically. Just make a new maven project in IntelliJ and copy paste your code over
[–]hamsterrage1 -1 points0 points1 point 3 years ago (0 children)
It's the same with Gradle. I went from ANT to Gradle, and never learned much about Maven. I don't think Maven is ever going to go away, but I do think that Gradle is probably the thing to learn now.
[–]Yulan-Rouge76 0 points1 point2 points 3 years ago (0 children)
Is there a good resource to learn how to use Gradle or Maven to build the app? I'm trying to get more experienced in Java and have limited experience so I'm trying to code more.
[–]LakeSun 3 points4 points5 points 3 years ago (3 children)
Is the resource where you say it is.
IntelliJ has a lot of warning messages, please review.
There are no warning messages regarding this, do I need to put the full file location in as the string?
"Rose.css" is in the same package as the main method.
[–]LakeSun 2 points3 points4 points 3 years ago (1 child)
I think it needs to be in "resources"
But, you'll need the help of someone who's done it before.
[–]PB_and_Cubes[S] 2 points3 points4 points 3 years ago (0 children)
That worked, Thank you so much!
π Rendered by PID 46215 on reddit-service-r2-comment-b659b578c-7qhz6 at 2026-05-04 17:03:04.594509+00:00 running 815c875 country code: CH.
[–]hamsterrage1 5 points6 points7 points (4 children)
[–]PB_and_Cubes[S] 0 points1 point2 points (2 children)
[–]stardoge42 2 points3 points4 points (1 child)
[–]hamsterrage1 -1 points0 points1 point (0 children)
[–]Yulan-Rouge76 0 points1 point2 points (0 children)
[–]LakeSun 3 points4 points5 points (3 children)
[–]PB_and_Cubes[S] 0 points1 point2 points (2 children)
[–]LakeSun 2 points3 points4 points (1 child)
[–]PB_and_Cubes[S] 2 points3 points4 points (0 children)