简体   繁体   中英

Why can't I find Javafx desktop application in Netbeans 10 after coding it

I downloaded Netbeans 8.1 http://netbeans.org/downloads and then downloaded scene builder and installed them successfully on Windows 10

But after coding my first app I used clean and build button in netbeans but i when i run the app jar file nothing running but when i opened the task manager in Win10 i found the app shows java. ! i wanna someone tell me how to get it.Thank you

when i used build button in netbeans the output was :

> ant -f "C:\\Users\\Omar Ahmed\\Documents\\Any" jfx-rebuild 1init:
> deps-clean: Created dir: C:\Users\Omar Ahmed\Documents\Any\build
> Updating property file: C:\Users\Omar
> Ahmed\Documents\Any\build\built-clean.properties Deleting directory
> C:\Users\Omar Ahmed\Documents\Any\build clean: init: deps-jar: Created
> dir: C:\Users\Omar Ahmed\Documents\Any\build Updating property file:
> C:\Users\Omar Ahmed\Documents\Any\build\built-jar.properties Created
> dir: C:\Users\Omar Ahmed\Documents\Any\build\classes Created dir:
> C:\Users\Omar Ahmed\Documents\Any\build\empty Created dir:
> C:\Users\Omar
> Ahmed\Documents\Any\build\generated-sources\ap-source-output Compiling
> 1 source file to C:\Users\Omar Ahmed\Documents\Any\build\classes
> compile: Created dir: C:\Users\Omar Ahmed\Documents\Any\dist Detected
> JavaFX Ant API version 1.3 Launching <fx:jar> task from C:\Program
> Files\Java\jdk1.8.0_91\jre\..\lib\ant-javafx.jar Warning: From JDK7u25
> the Codebase manifest attribute should be used to restrict JAR
> repurposing.
>          Please set manifest.custom.codebase property to override the current default non-secure value '*'. Launching <fx:deploy> task from
> C:\Program Files\Java\jdk1.8.0_91\jre\..\lib\ant-javafx.jar No base
> JDK. Package will use system JRE. No base JDK. Package will use system
> JRE. jfx-deployment-script: jfx-deployment: jar: jfx-rebuild:
 **BUILD SUCCESSFUL (total time: 8 seconds)**

Did you convert the Project File into a .jar File?

  1. Right-click on the Project name.
  2. Select Properties .
  3. Click Packaging .
  4. Check Build JAR after Compiling.
  5. Check Compress JAR File.
  6. Click OK to accept changes.
  7. Right-click on a Project name .
  8. Select Build or Clean and Build .

In the Project Folder You will find your PC app as a jar file in the FOLDER named dist .

AFAIK .jar executions invoke Java which envelopes your application => task manager shows java.

If you package it as an EXE, it will show the name, icon and whatever else as it'll run as a self-contained applicaiton which invokes the VM through java.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM