Netbeans and JavaFX

I am new to Netbeans and am only using it for the JavaFX integration (IntelliJ user) so I am not sure if I am dealing with my ignorance of Netbeans or some JavaFX idiosyncrasy.
However, when I try to organize my JavaFX code into package structure (rather than using a single default package) and go to run it I get NoClassDef exceptions on my main class. It looks like netbeans automatically packages up the files into a jar and runs it from a jar. I took a peek inside the generated jar and Netbeans is not maintaining the package structure inside the jar it is just putting all the classes at the root of the jar (hence the NoClassDefs).
How can I get Netbeans to maintain the package structure inside the jar?
Does JavaFX use the "package" keyword the same way as Java does?

Yep, after I was able to get my classes in a package structure (rather than default package) I discovered that.
I couldn't at first get my classes out of the default package. I am spoiled by IntelliJ which changes/adds package statements when you move classes. Netbeans did not automatically add the package statement when I moved from the default package to a package structure. Nor did it warn me that the classes were missing a package statement and/or the package statement didn't match its package location.

Similar Messages

  • Netbeans version and JavaFx

    Hi guys
    It's a bit unclear at this stage as to what to do to get Netbeans and Javafx updated correctly.
    Do I need to still be downloading the Development version of Netbeans or have the plugin fixes been applied to Netbeans 7.01 now?
    The new development Netbeans indicates that it supports JavaFx as part of the package.. so does that mean you still need to install all of the plugins?
    It's confusing and slowing down development a lot - especially with updating javafx across multiple machines and the documentation is not covering
    how best to move from one build of Javafx to the next and how to also ensure Netbeans is setup correctly.
    -- some history since build 42 we could not package our app with netbeans. So we installed the development netbeans and had to muck around with the platform
    manager to get it to work with javafx. It has been somewhat inconsistent across several machines also - some with win7 and some XP.
    I understand that being part of a beta requires some patience but some guidance in how others are keeping their windows based development environments working properly
    would be great!

    You need to use the latest beta of NetBeans 7.1. I suspect the older version you downloaded is using JFX1.x.
    See this:
    Regarding your threading model, there is a new API for threading but I wouldn't say it's much simpler or easier - at best, more powerful.
    There doesn't seem to be any good official docco on this however (seems like a big important topic so this is weird - maybe I just missed it). The closest is this slightly outdated article:
    You may also find this useful: Thoughts on best practices for busy/wait and threads?
    If you have further questions on this stuff, probably best to start a new forum topic (or reply to the threading one above) - this thread is starting to lose relevance to it's original topic.

  • Netbeans 7 and JavaFX plugin

    Am I the only one who cannot get the JavaFX plugin to work with Netbeans 7?
    Have downloaded NB 7
    Have installed Javafx 2.0 runtime
    Have downloaded and installed javafx 2.0 nb plugins according to the installation instructions.
    Then restarting gives errors about NB plugins - which have to be disabled before continuing.
    Have tried on two PCs and had the same problem. The nb plugins seem to destroy basic functionality in Netbeans (cannot create new projects)

    Hi guys,
    can any one tell me where to find .NMB files .
    i installed Javafx run time and javafx 2.0 net beans plug in. but later i tried to add plugin in netbeans 7.0 but i couldn't find any .nmb files.
    please let me know how to overcome this issue.

  • JavaFX Netbeans AND Maven

    Anyone know of an easy approach to getting a JavaFX maven project working in Netbeans ?
    I've got JavaFX+Maven working and JavaFX+Netbeans ... but not all three together...
    Any tips/pointers apprectiated...
    Given the Netbeans has fantastic JavaFX and Maven support - surely they could make both work together ?

    I hope it's ok if I reuse this thread since I have the same question. I'm using FEST's JavaFX Maven plugin. I'll happily take any solution anyone can offer, but, ideally, I'd like to see some official support for Maven:

  • Is it possible to have java and javafx project types combined ?.

    Today, in NetBeans (not sure about the eclipse world) one has to decide between a "Java" project or a "JavaFX" project.
    Why can't these two be combined ?.
    For e.g, when I try to add JavaFX files (script, classes) to a Java Project it fails to compile. I poked around Netbeans and googled a bit and could'nt find any answers.
    The only way that I can make it work is to create a JavaFX project and Java code to it.
    In situations where one is attempting to "add" JavaFX to an existing Java/Swing app the current approach is too weird and abnormal.
    For e.g Amy Fowler's excellent guide should be such that I should be able to "simply" add JavaFX code and NetBeans should take care of the plumbing. (calling javafx compiler, adding the right jars for runtime ...)

    I'm not sure how JavaFX works, but it is built rather differently from "normal" Java (Single threaded, high level of abstraction from the actual implementation, etc). It is easy to use Java classes inside a JavaFX class, but the reverse is not true.
    Plus, though this part is technically fixable, some classes installed inside the JRE don't seem to work by default in a netbeans JavaFX project.

  • Build java and javafx applications

    Hello everybody! Currently, I am building a netbeans project that consist of java and javax applications and the questions are :
    1. How to call java object in javafx object or it reverse. Which one the better?
    2. How to compile and run the project that consist of java and javafx applications.
    Help me, please!Thank's

    Also, If you want to call JavaFX methods from Java you can use interface and have the JavaFX class extend it (interfaces are extended in JavaFX)
    For example, make interface
    interface FXAdapter {
         public void modifyLayout();
    }And in your FX class
    public class FXClass extends FXAdapter {
         public override function modifyLayout() : Void { /*Implementation*/ }
    }Now in your java class you can ask for FXAdapter as a parameter and pass a FXClass object

  • Communication problem between NetBeans and Tomcat

    i got a quite mysterious problem. here is what happens:
    - i start NetBeans 5.5.1 (the first time)
    - i want to debug my JSF-Project, the Debugger starts
    - After a few seconds the debugger waits for tomcat (it sais: "Waiting for Tomcat...") and tomcat starts
    - Again after a few seconds the tomcat-debugger-output sais "Tomcat startet in 3333 ms".
    when i enter http://localhost:8084/ in my browser i get the tomcat homepage, so the server has definitely started! But nothing happens in NetBeans and nothing happens with my project....
    In the lower-right corner i see this blue working-bar that sais "deploying project" but nothing happens. The Project-Debugger-Output still sais "Waiting for Tomcat..." but nothing happens...
    And after something around 3 minutes (i guess it's a timeout) i get the error "Starting of Tomcat failed." But is HAS started, i can login to the Administration-Area in my browser!
    so i guess there is a communication problem between netbeans an tomcat. Netbeans waits for a message from tomcat but tomcat doesn't send it..or netbeans doesn't understand it.
    But the story goes on:
    When i press the debug-button a second time it takes only a few seconds till i get the message: "Tomcat server port 8084 already in use". OF COURSE! Because Tomcat has already startet and can't be stoped by NetBeans.
    i'm trying to solve this problem for 4 days now, so i would be very happy if anyone has an idea where to start/continue the search...
    some system-info:
    - windows vista business 32-bit
    - no firewall is running
    - AntiVir Personal Edition IS running
    - Yahoo Widgets Engine IS running
    - no other software is running
    and finally the tomcat-log:
    Using CATALINA_BASE: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base
    Using CATALINA_HOME: C:\Program Files\NetBeans\enterprise3\apache-tomcat-5.5.17
    Using CATALINA_TMPDIR: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\temp
    Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_12
    Listening for transport dt_shmem at address: tomcat_shared_memory_id
    21.09.2007 18:27:50 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\cvsnt;
    21.09.2007 18:27:50 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:50 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1862 ms
    21.09.2007 18:27:50 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    21.09.2007 18:27:50 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    21.09.2007 18:27:50 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    21.09.2007 18:27:53 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:54 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /
    21.09.2007 18:27:54 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    21.09.2007 18:27:54 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    21.09.2007 18:27:54 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3626 ms

    As i wrote before, the same problem occured for me. I have found a solution which is : Go to tools menu and then select options . In the proxy info, select No Proxy.
    I hope this help you

  • NetBeans and JSP pages

    I'm using the netBeans IDE to develope my project and the project is web application. But I've a problems with this IDE.
    Q1. The default page is index.html and the default home for the project is say $HOME, when I write http://localhost:8084/$HOME/index.html the browser displace error message. I've to run this file from the netBeans. Do I need to run netBeans and run the file from the IDE to access the index.html file?
    Q2. The second problem is; once I run the index file from the netBeans and then use this address http://localhost:8084/$HOME i.e if I remove the index.html file form the URL the Browser displays all the files that I've in my project but I don't won't this to happend. Is there any means to avoid this problem?
    Thank you indavance.

    I'm using the netBeans IDE to develope my project and
    the project is web application. But I've a problems
    with this IDE.If you are new to application development, then I recommend not using any IDE - it is better to configure everything manually to understand what's going on under the hood.
    Once you understand what's going on, then it will be much easier to configure your IDE.
    Q1. The default page is index.html and the default
    home for the project is say $HOME, when I write
    http://localhost:8084/$HOME/index.html the browser
    displace error message. I've to run this file from
    the netBeans. Do I need to run netBeans and run the
    file from the IDE to access the index.html file?Check this with NetBeans User Mailing List
    Q2. The second problem is; once I run the index file
    from the netBeans and then use this address
    http://localhost:8084/$HOME i.e if I remove the
    index.html file form the URL the Browser displays all
    the files that I've in my project but I don't won't
    this to happend. Is there any means to avoid this
    Thank you indavance.

  • Using NetBeans and Eclipse to drag and drop forms, controls etc

    Hi, can you use NetBeans and Eclipse to drag and drop like say with C# in MS Visual Studio ?
    like forms and listboxes, textboxes etc ??

    And [this is a good place to start|]

  • NetBeans and Heap Size

    I'm trying to write a program using NetBeans and I keep getting OutOfMemoryErrors. I have 2GB of RAM and I've attempted to modify the netbeans.conf file to increase the heap size at startup. The changes I've made aren't being reflected in the memory manager tool (it still indicates a maximum size of ~50MB). The pertinent code from the config file is as follows:
    netbeans_default_options="-J-Xms512m -J-Xmx1024m -J-XX:PermSize=128m -J-XX:MaxPermSize=512m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:NewSize256m"
    Assuming my memory usage won't exceed these limits, any suggestions as to how to make sure the changes are being implemented?

    I would subscribe to the netbeans user mail list, and pose your question to that list. The Sun Netbeans gurus live there.
    I would also use a seperate email account to subscribe to the list as it generates alot of messages daily. If thats not an option, definatly try to set up a rule that seperates messages from the list from your regular email.
    The main netbeans top level mail list web page is here with all the instructions to subscribe and unsubscribe.
    Good luck,

  • NetBeans and Morena/Twain

    I am using NetBeans to develop a Windows graphics program. I am incorporatiing Morena/Twain code into it so that the program can scan images. I have included the Morena and ImageJ library JAR files in the program, and within the IDE, the program runs fine. But when I use the executableJAR file generated by NetBeans to run the program, the scanning capability doesn't work. I 've put the Morena/ImageJ library JAR files in the ClassPath I think by using Windows' System/Advanced commands. But I'm not sure that does it. What am I missing. Just putting these imaging files in the directory in which the NetBeans generated executable resides doesn't help either. I'd sincerely appreciate some help with this.

    Hi All,
    I'm obviously still not doing something correctly. I've added the Morena Jar files to the Manifest file and rebuilt the program. It seemed to work once. Then the same behavior appeared. The program initiates and everything but its scanning capability works fine. I"ve looked at the NetBean's generated Jar file. There is no reference to Morena/Twain in it. However, there is a folder called Morena Classes in the output directory of the generated program. I've also tried the other two methods described in the links you so kindly provided. Those don't resolve the problem either. I've tried putting the Morena files in the same folder as the generated Jar file. I've put the Morena class files in the build directory generated by NetBeans and rebuilt. And finally, I've tried incorporating the Morena Jars with the NetBeans program JAR into a new JAR file. Trying to run the last kicks a "Can't find a Main" message. The program still runs just fine within the NetBeans environment. Can you suggest a really good book that might cover this.
    J. Greyson

  • Netbeans and junit

    I am sorry if this is the wrong place to post this but I need a quick answer.
    I have developed a school project in netbeans and junit.
    How can I execute the junit tests externaly to the IDE?
    Where is the junit installed?

    JUnit is just a java library. Take a look at

  • Netbeans and DataProvider

    I have put an own DataProvider in an SessionBean and at first it worked when i bound it to a Table. I restarted my Netbeans and now this connection is lost.... I cannot attach my DataProvider to the Table. It is not in the drop down list from the Table Layout Bind to Data.
    Please help.

    You have to Close the Project and reopen it. Than the DataProvider is available.

  • NetBeans and other software not available in the main solaris repository.

    In the main(default) Solaris 11 Express repository we cannot find NetBeans and other software we could find in OpenSolaris in the extras repository,for example.Reading Solaris 11 Express release notes I find the main solaris repository and the support(for security and bug updates) repository,no other.Do we need to download directly in the NetBeans website,OpenOffice website etc.etc.,or are there any other repositories I did not see.

    I just wrote an blog entry based on this question - Bottom line, you can either download the software directly or add the repository and get the IPS version.

  • NetBeans and iText

    hi everyone,
    I am new to netbeans and iText. I have to do a project using them, so any one can help me about how to use iText in NetBeans, means how can I configure NetBeans for iText. I have downloaded iText.jar file from iText website.
    Thanks in advance

    Im not sure what do you want to do, but here is a more detailed code which u can see how to check or uncheck a radio button using itext:
    try {
    PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("radiobutton.pdf"));;
    PdfContentByte cb = writer.getDirectContent();
    cb.moveTo(0, 0);
    PdfFormField radio = PdfFormField.createRadioButton(writer, true);
    PdfAppearance tpOff = cb.createAppearance(20, 20);
    PdfAppearance tpOn = cb.createAppearance(20, 20);, 10, 9);
    tpOff.stroke();, 10, 9);
    tpOn.stroke();, 10, 3);
    PdfFormField radio1 = PdfFormField.createEmpty(writer);
    radio1.setWidget(new Rectangle(100, 700, 120, 720), PdfAnnotation.HIGHLIGHT_INVERT);
    radio1.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, "Off", tpOff);
    radio1.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, "MasterCard", tpOn);
    PdfFormField radio2 = PdfFormField.createEmpty(writer);
    radio2.setWidget(new Rectangle(100, 660, 120, 680), PdfAnnotation.HIGHLIGHT_INVERT);
    radio2.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, "Off", tpOff);
    radio2.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, "Visa", tpOn);
    PdfFormField radio3 = PdfFormField.createEmpty(writer);
    radio3.setWidget(new Rectangle(100, 620, 120, 640), PdfAnnotation.HIGHLIGHT_INVERT);
    radio3.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, "Off", tpOff);
    radio3.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, "American", tpOn);
    catch(DocumentException de) {
    catch(IOException ioe) {
    this is just a way to do it, if this not what do you want to do, just post again!

Maybe you are looking for