IntelliJ - access is denied when creating artifacts

I am trying to export a JavaFX 2 application using IntelliJ 13.1.2 on Windows 8 x64. This is my setup:

enter image description here

But when I create an artifact, I get an error message, this is the log:

Info: compilation completed with 1 error and 0 warnings in 7 seconds

Information: 1 error

Information: 0 warnings

Error: Java FX Packager: D: \ Dropbox \ Development \ MultiWork-PC \ out \ artifacts \ MultiWork_PC (access denied)

I do not know if this is an error or, rather, some kind of Windows resolution issue. All files are copied to the output folder of Artifact:

enter image description here

Except the application itself! What I tried:

  • Running IntelliJ as an Administrator
  • Change folder permissions so that everyone can write / change it
  • Change folder location from D: \, to C: \, desktop and documents, but still getting errors

NOTE. This does not happen if I use jar instead of a JavaFX application

+5
source share
3 answers

As a result, I used Maven to export my JavaFX application:

<plugin> <groupId>com.zenjava</groupId> <artifactId>javafx-maven-plugin</artifactId> <version>8.1.1</version> <configuration> <mainClass>foo.bar.mainclass</mainClass> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> 

Clear and run:

clear jfx: jar

In your /target/jfx/app you will find the JavaFX jar executable with the lib folder containing all the dependencies.

+3
source

I had the same problem. I somehow decided:

  • by checking the Build on make checkbox in the Project Structur dialog box
  • launch launch Java application in Intellij Idea

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

+2
source

I had the same problem and arose to protect AV Ramsonware. Resolved, including exception.

0
source

Source: https://habr.com/ru/post/1202727/


All Articles