4

I'm trying to generate an artifact of my JavaFX application using Intellij but for some reason I always end up having JavaFX packager throwing an access denied error on my output directory.

Generating a simple jar works fine though.

I'm using it on Windows 8.1 with Java 8.

LZH
  • 775
  • 1
  • 7
  • 15
Max
  • 197
  • 4
  • 15
  • I realize this is old, but since the two "answers" completely ignored the actual question, I thought I'd just throw my two cents in here as well. I too have this problem. I am unable to build a native JavaFX application due to the "Access is Denied" error pointing to the build directory. Were you able to resolve your issue? – Zephyr Jun 15 '17 at 18:43

6 Answers6

0

I had the same problem. I kind of solved it:

by ticking the "Build on make" box in the Project Structur Dialog

starting a Run of my Java App in Intellij Idea

Now the executable jar magically appeared in my build folder. God knows why.

VovovoIP
  • 9
  • 1
0

I had this problem and solved it by deleting the Artifact from IntellIJ, then deleting the "out/artifact" previously created folder where it tried to build my jar and finally re created an artifact from scratch. For no specific reason it now worked.

Gregzenegair
  • 361
  • 4
  • 7
0

I have encountered the same problem recently. I checked the permissions of the directory and can read and write. Later I deleted the artifact and re-created a new one to solve the problem. I hope to help people who have encountered this problem.

z.houbin
  • 216
  • 3
  • 6
0

I had this problem. I ran into it because When I added artifact with + button in Project Settings->Artifacts, I selected JAR artifact , and change JAR to JavaFx Application from type drop down box on right side pane. Later, I removed this artifact and pressed + button, then selected JavaFx Application from drop down list, then it was builded successfully. My JDK version is 8.

0

When I call JavaVXPacker from the command line I get the following:

C:\Users\Ingo>javafxpackager -help
javafxpackager.exe has been renamed javapackager.exe.
The original file may be removed in a future release in lieu of javapackager.
Please update your scripts.
...
...

So I guess IntelliJ has to update it's script to re-enable the feature??? (using Windows 10 and JDK Liberica 15+36)

Ingo
  • 605
  • 6
  • 10
-2

Go to File > Project Structure

Click on Artifacts on the left panel.

Thereafter click on the plus icon to add a Jar From modules with dependencies…

A pop-up will be shown and there you would have to select for the startup class of your project.

Click on OK twice to save the changes.

Lastly go to Build > Build Artifacts... And select build action. Now your jar will be generated in the out folder of your project.

For a more details guide, please refer to this post

LZH
  • 775
  • 1
  • 7
  • 15