Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6183347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:21:00+00:00 2026-05-24T01:21:00+00:00

I’m developing a JavaFx 2.0 application using Netbeans 7. The main application references another

  • 0

I’m developing a JavaFx 2.0 application using Netbeans 7.
The main application references another class library project added by rightclicking the ‘Libraries’ folder and selecting ‘Add Project…’. Executing the application from netbeans works fine.

When deploying it to a jar file by ‘Clean and build’ and trying to execute it via console with

java -jar TestApp.jar

I get

Exception in thread "JavaFX-Launcher" java.lang.NoClassDefFoundError: net/pmoule/SomeClass
...

The dist/lib folder of my application contains the referenced library. So IMHO everything should be fine. Looking at the Manifest.MF contained in my application jar I get this

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_23-b05 (Sun Microsystems Inc.)
Implementation-Vendor: pmoule
Implementation-Title: TestApp
Implementation-Version: 1.0
Main-Class: com/javafx/main/Main
JavaFX-Application-Class: testapp.TestApp
JavaFX-Version: 2.0

Where is my class path? How do I get Netbeans to add the correct classpath?

I tried adding it manually to the Manifest.MF by editing the one contained in the jar

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_23-b05 (Sun Microsystems Inc.)
Implementation-Vendor: pmoule
Implementation-Title: TestApp
Implementation-Version: 1.0
Class-Path: lib/MyLib.jar        //THIS IS NEW
Main-Class: com/javafx/main/Main
JavaFX-Application-Class: testapp.TestApp
JavaFX-Version: 2.0

No success and same error.

All samples delivered with the JavaFX 2.0 SDK work by doubleclicking in WindowsExplorer or from the console by entering e.g.

java -jar PathAnimation.jar

But not any of these examples makes a reference to an external jar.

Some research lead me to this question: Netbeans JavaFX 2.0 Application
But without any solution so far.

Thanks for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:21:00+00:00Added an answer on May 24, 2026 at 1:21 am

    Found a working solution by myself.

    All the external libraries in the dist/lin folder had a size of 0kb. So the exception was correct, of course.

    To get my application running I did the following in the project’s jfx-impl.xml:

    Add the classpath to manifest.mf

    <fxjar destfile="${jfx.deployment.dir}/${jfx.deployment.jar}" applicationClass="${main.class}" >
                 <fileset dir="${build.classes.dir}"/>
                  <manifest>
                   <attribute name="Implementation-Vendor" value="${application.vendor}"/>
                   <attribute name="Implementation-Title" value="${application.title}"/>
    <!-- NEW -->   <attribute name="Class-Path" value="${jar.classpath}"/> <!-- NEW -->
                   <attribute name="Implementation-Version" value="1.0"/>
                  </manifest>
        </fxjar>
    

    Create an output dir for web deployment

    <property name="jfx.deployment.web.dir" location="${jfx.deployment.dir}/web" />
    <mkdir dir="${jfx.deployment.web.dir}" />
    

    Set output dir for fxdeploy task

    <fxdeploy width="${jfx.applet.width}" height="${jfx.applet.height}"
                  outdir="${jfx.deployment.web.dir}" <!-- NEW DIR -->
                  embedJNLP="true"
                  outfile="${application.title}">
            <info title="${application.title}"
                  vendor="${application.vendor}"/>
            <application name="${application.title}"
                         appclass="${main.class}"/>
            <resources type="eager">
               <fileset dir="${jfx.deployment.web.dir}"> <!-- NEW DIR -->
                  <include name="${jfx.deployment.jar}"/>
                  <include name="lib/*.jar"/>
                  <exclude name="**/jfxrt.jar"/>
               </fileset>
            </resources>
    </fxdeploy>
    

    Now, I can deploy my desktop application and execute ist via doubleclick from windows explorer or by entering

    java -jar TestApp.jar
    

    There still exists some issue with the content of my newly created web-dir.

    1. The TestApp.jar ist not copied zo dist/web
    2. The referenced external jars are not copied to dist/web

    This is fine for me and will be fixed some time later.

    Hope this helps anyone else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am using Paperclip to handle profile photo uploads in my app. They upload
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.