Error Package Org.jdesktop.application Does Not Exist
Contents |
here for a quick overview of the site Help Center Detailed answers org.jdesktop.application.application jar to any questions you might have Meta Discuss the workings
Org.jdesktop Jar
and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up org.jdesktop.application package doesn't exist up vote 3 down vote favorite I was building a java desktop application from few days and all was going well. But today, when I opened the Netbeans and compiled a file, the following compilation error occrured: Compiling 9 source files to C:\Documents and Settings\Administrator\Desktop\EMS\build\classes C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSAboutBox.java:7: package org.jdesktop.application does not exist import org.jdesktop.application.Action; C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSApp.java:7: package org.jdesktop.application does not exist import org.jdesktop.application.Application; C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSApp.java:8: package org.jdesktop.application does not exist import org.jdesktop.application.SingleFrameApplication; C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSApp.java:13: cannotfind symbol symbol: class SingleFrameApplication public class EMSApp extends SingleFrameApplication { C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSView.java:7: package org.jdesktop.application does not exist import org.jdesktop.application.Action; C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSView.java:8: package org.jdesktop.application does not exist import org.jdesktop.application.ResourceMap; C:\Documents and Settings\Administrator\Desktop\EMS\src\ems\EMSView.java:9: package org.jdesktop.application does not exist I was using the same code before but no error occured like this. When I checked the libraries, then the org.jdesktop.application package is there and when we import that package, the netbeans show the "application" package in suggestion. Then why the error is there when the package is already the
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges http://stackoverflow.com/questions/2070428/org-jdesktop-application-package-doesnt-exist Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Java Importing org-jdesktop-layout in Netbeans up vote 5 down vote favorite 2 I have http://stackoverflow.com/questions/14094566/java-importing-org-jdesktop-layout-in-netbeans added the org-jdesktop-layout.jar to my libraries in my netbeans in my project. I found this .jar file in: C:\Program Files\NetBeans 7.0.1\platform\modules However the following line of code is still not recognized: org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); I think I am missing the right import statement. What is the right import statement? If there is any other information that would be useful, let me know! Also what determines the prefix for an import statement? EDIT: The following code seems to be from an older GUI library. I have two options, convert to newer GUI standards or access old GUI standards? I have never done anything like this before. What can I do? org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jButton1) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel1) .add(jLabel2)) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(capFormattedTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 69, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(wtFormattedTextField, org.jdesktop.layout.Grou
NetBeans Forums -> NetBeans Users View previous topic :: View next topic Author Message jshannonJoined: 07 Jan 2009Posts: 5 Posted: Wed Jan 07, 2009 3:48 am Post http://w.planetnetbeans.org/topic7285.html subject: org.jdesktop.application does not exist Just downloaded Netbeans 6.5 and created a https://ubuntuforums.org/archive/index.php/t-789430.html Java Desktop Application Project. All is going well until one day I start Netbeans and now my main Frame class shows import failures and says 'package org.jdesktop.application does not exist'. The Swing Application Framework Jar appframework-1.0.3.jar, which contains this package, is contained in the Libraries section of my Project (as it error package has always been). So I scratch my head, restart Netbeans and the problem goes away. The next time I start Netbeans the same issue has returned and restarting won;lt resolve it. The project will still clean and build fine, so I believe it is the IDE that doesn't see the jar; it appears that the ant build can. Google suggests that I am not error package org.jdesktop.application the first person to see this behavior, but I have not found a workable resolution. I have also imported my project into CVS, but I don't believe this behavior was time coincident with that activity. Please help! Back to top jshannonJoined: 07 Jan 2009Posts: 5 Posted: Sun Jan 11, 2009 1:10 pm Post subject: Pull them out of the Libraries Folder I pulled those Swing Application Framework Libraries out. I.e. Removed them from the Project's configures libraries (I was going to experiment with adding them back in) and my problem went away. Doesn't make sense to me?.?.? Back to top Peter B. WestPosted via mailing list. Posted: Mon Jan 12, 2009 7:51 am Post subject: org.jdesktop.application does not exist jshannon wrote: Quote: Just downloaded Netbeans 6.5 and created a Java Desktop Application Project. All is going well until one day I start Netbeans and now my main Frame class shows import failures and says 'package org.jdesktop.application does not exist'. The Swing Application Framework Jar appframework-1.0.3.jar, which contains this package, is contained in the Libraries section of my Project (as it has always been). So I scratch my head, restar
just installed NetBeans 5.5 to learn how to write GUI programs. So far I am having a lot of fun. There is one thing that bothers me, however. I put together a program that runs successfully inside NetBeans but when I try to compile the .java file on the command line I get lots of error messages that all look like this: AddCheque.java:137: package org.jdesktop.layout does not exist org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); And even when I try to just run the class file on the command line that NetBeans produced without a hitch I get the following error message: Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group What's happening and how can I make these programs work on the command line (where obviously I need them if I want to use them elsewhere)? NormR2May 10th, 2008, 10:36 PMYou need to set the -classpath option to point to the jar file that contains the missing file/classes such as: org.jdesktop.layout.... Sorry, I don't know netbeans to help you find where it hides the jar files it uses. Norm evaristegaloisMay 12th, 2008, 06:15 AMAll right. I searched for the jar file (org-jdesktop-layout.jar) and found it in /usr/share/netbeans/5.5/platform6/modules/. I ran the command CLASSPATH=/usr/share/netbeans/5.5/platform6/modules/; export CLASSPATH to add the jar files to my CLASSPATH. echo $CLASSPATH now renders /usr/share/netbeans/5.5/platform6/modules/ The error messages remain as described above. package org.jdesktop.layout does not exist org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); TomosaurMay 12th, 2008, 11:41 AMI just installed NetBeans 5.5 to learn how to write GUI programs. So far I am having a lot of fun. There is one thing that bothers me, however. I put together a program that runs successfully inside NetBeans but when I t