NoClassDefFoundError: if project created in IDE...

First let me say that I'm a total Java beginner. I know C/C++ pretty well, so I'm not a programming newbie. I don't know what the deal with this is, but it's driving me batty. Not wanting to use notepad because of its lack of assistance, I've tried using the Netbeans IDE to do so and every time I compile a program inside Netbeans it works just fine in the IDE. However as soon as I try running it outside the IDE I get the following message:
Exception in thread "main" java.lang.NoClassDefFoundError: firstpr
ong name: firstprogram/Main)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Sou
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Meth
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sour
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Now, there is a package created in the project by default and as such, the command I'm using to call it is java firstprogram/main from the directory below where main.class is located. If I try to execute that command from the directory main.class is in, it can't find the class file, which doesn't surprise me.
However, if I type a bare version of this program in notepad, without all the fancy stuff that Netbeans tosses in there for you when you first create the project, it compiles just fine with javac and runs fine with the command line. Netbeans must be doing something to cause this problem, but I'm at a total loss to figure out what it is. Please help!

Now, there is a package created in the project by
default and as such, the command I'm using to call it
is java firstprogram/main from the directory below
where main.class is located. If I try to execute
that command from the directory main.class is in, it
can't find the class file, which doesn't surprise me.If firstprogram is a package name, you should be using
java firstprogram.main to execute.
BTW, it is better to use first letter in uppercase for a class name. It helps in distinguishing a class name from a method/variable name. :)

Similar Messages

  • Viewing standard projects created by SAP on IDES server

    Hello,
    I am working on IDES server ECC 6.0. cProject suite 4.5. I am not able to see the sample projects created by SAP because of Authorization problem. Is there any way(Admin Role etc..) by which I will be able to see projects created by SAP?
    Regards,
    Milind Dumbre

    Hi Milind,
               Are you taking about R/3 or cProject projects?
    If it is cProject, if projects are already created and not shown, the mentioned below are few solutions:
    1) You nees have this role in portal-SAP_CPR_PROJECT_ADMINISTRATOR along with SAP_CPR_TEMPLATE_ADMINISTRATOR for template projects and also SAP_CPR_USER.
    2) Incase the roles mentioned above are already maintained for the user, check the browser you are using, it it is firefox-it is not compatible, if you are using Windows Internet Explorer- may be a cache problem.
    3) To resolve the cache problem, go to - SICF t-code--> execute the transaction, in the services field type cprojects and click on filter, system will show you the service, Right click on the service anc click on Test service, enter the login id and password and login to your system.
    4) Next by maintaining that, open one more tab in the explorer and mention the URL and login to the portal.
    5) Now you can see the projects already created in the dropdown.
    Note: Make sure you are noting using the Firefox.
    If you need futher clarification revert back.
    rgds
    Sudhir Reddy.

  • Export release build fails with project created by Launchpad

    When I try to export a release build (using Flash Builder 4.5) of a project created in Adobe Air Launchpad (p8_3-0-1_081911) I get the following error message:
    "error occurred while saving the project settings: 'default' build target cannot be found for the selected project"
    Is this a bug or am I doing something wrong? Any help/ideas would be greatly appreciated!
    Rob

    I solved this by creating a new project and copying everything across. But it was time-consuming work - especially creating all the new value objects and data services. Air Launchpad is a great concept and has helped me a lot, but this particular forum is dead.
    Rob

  • Moving existing project to an IDE

    I am considering moving an existing, 12-year old, java [url http://r0k.us/graphics/SIHwheel.html]hobbyist project to an IDE. Up to now, development has been with the Textpad text editor, the msWindows cmd tool, and the CVS version system. Before starting, I'd like to get some opinions on what kinds of things should be considered, and the current strengths and weaknesses of the various IDEs. I've heard good thanks about Netbeans, Eclipse, and Intellij.
    Here are some of the parameters involving the project:
    1) two project directories
    1a) ntc, with 3 java files
    1b) sihwheel, with 5 java files, and some resources (5 properties files, 2 html files, and a PNG image)
    2) 33 classes get created, then jar'red along with the resources of 1b
    3) application normally runs as an applet, but can run as program
    4) open source project
    5) no build support (ant, etc) yet
    Hmm, should I implement build support first, or do at same time? The distributed pieces of the build would be SIHwheel.jar, SIHwheel.html, and SIH_source.zip. Since they can run stand-alone, I also distribute, from the ntc project, NTC.java ColorName.java, and Hilb.java.
    Some of my desires for an IDE are:
    1) not complex to learn or use
    2) easy import of the above "raw" project without forcing major reconfiguration of directory structure, etc.
    3) ability to still make q&d changes with Textpad, javac, and jar
    4) debug support
    5) multi-platform supprt (I normally run Windows 7, but can boot into Ubuntu Linux)
    Consider those to be more of a wish list than requirements. I'm flexible ;) and would like the IDE to be flexible as well.
    -- Rich

    Just focusing on that point (the rest are answered already I think)
    Hmm, should I implement build support first, or do at same time? The distributed pieces of the build would be SIHwheel.jar, SIHwheel.html, and SIH_source.zip.Note that both Eclipse and NB have "single-target" builds by default (htey build a jar, or, in the case of a J2SE app in NetBeans, a 'dist' folder with a main jar and dependencies). Building several targets will require manual configuration on your part.
    In the case of NetBeans, whose build system relies on Ant (generated Ant build files, which you can manually edit afterwards), building several targets (one jar, one HTMl page, one zip) will require to customize the generated build script, so you'll have to learn Ant anyway.
    In the case of Eclipse, I know you can "use" an Ant build script, which you create and edit through the text editor, but it does not natively generates it (there are probably plugins that do that). I think there are wizards to request the creation/copy of so-and-so (Jar file I'm sure, copy too, zip I don't know), which you can customize at least per source folder, but this customization won't propagate automatically to the Ant build script.
    The last time I used that, Jar generation was "manual" (a menu item somewhere trigerred a "generate jar" build), but this may have evolved.
    I can't comment on IDEA, never used it.

  • Java Dictionary Project + create autonumber for KEY field?

    Hi there,
    I would like to create a Java Dictionary project that has a table with an AUTONUMBER as the key field.
    I know exactly how to do this in SQL Server using the IDENTITY field but cannot see an option when using the Java Dictionary project?
    Any ideas?
    Thanks for the help
    Lynton

    Has there been an update to this recently?  I am in need of exactly the same information.  The FAQ lists this:
    <i>Can I deploy a Java Dictionary table along with the table content?
    Yes. You can deliver the Java Dictionary table along the table content. There are two possibilities:
    Export from a reference database
    Specification of the table entries in an XML file (since SP5)
    Note that there is no modification support for table entries that are delivered in this way. Therefore, you can deliver table entries with program character or for examples, but not for templates or customizing data.</i>
    Now, I may be reading the note incorrectly, but it makes it sound like if you do populate a table with a XML file, the records cannot be modified thereafter.  Is this true?
    I'd also like to know how to develop the XML and where to put it, etc.  I've had no luck searching for this information.
    Thanks!

  • How can I build an existed project into eclipse IDE?

    Hello, all,
    I did not use eclipse IDE before. Someone gave me an completed directory which
    was a project (including all classes and source code) built by eclipse IDE. I
    want to rebuild it into eclipse on my computer. But eclipse only has "new" item
    to generate new project, class, etc. How can I rebuild the exist project in
    eclipse IDE?
    I appreciate your help or any suggestion!
    Thanks
    John

    Easiest way:
    Copy the folder into the Eclipse Workspace folder
    Create the "new" project with the same name as that folder.
    Eclipse should detect an existing project with the same name, inform you of this, and proceed from there.

  • I am trying to connect a second monitor on my system so that I have one to work on and the other that I am projecting. Any ideas on how to do that?

    I am trying to connect a second monitor on my system so that I have one to work on and the other that I am projecting. Any ideas on how to do that?

    connect, then in SystemPreferences/Displays you can set the two as you want.

  • I have a MacBook Pro , Model Identifier MacBook Pro8,2 , MAC OX S 10.7.4 I noticed that if I open Final Cut Projects created on other/older models MacBook Pro Laptops or MacPro Desktops, the fonts used in the previously created FCP projects, change their

    I have a MacBook Pro , Model Identifier MacBook Pro8,2 , MAC OX S 10.7.4
    I noticed that if I open Final Cut Projects created on other/older models MacBook Pro Laptops or MacPro Desktops, the fonts used in the previously created FCP projects, change their font spacing! which distorts the look of the Text that was written, by oevrlapping on other things that were put & present on the screen.. Another similar probelm is that the Vector shaped used for example to highlight certain words or shapes, also change their position on the screen so that they no longer highlight exact things that we once used these vectors to highlight or outline... Anyone knows how to solve this problem please?? I made sure that the same fonts are available in the Library in both old and newer computers...
    thanks in advance..

    You might want to take your question to the FCP forum - if you copied all fonts to your Library>Fonts folder and restarted they should be recognized by all applications. I know that this works for Adobe products, anyway.
    Clinton

  • Problems using projects created in older versions of iMovie

    I have a few projects created in older versions of iMovie, as far back as version 2 as well as more recent versions. Most of those projects are finished and I want to burn them to DVD again, but a couple of them could bear a little touch up editing. These projects are precious movies of our kids and hard to replace. Although I could probably find the original video, I put many hours of work into creating these projects.
    In any case, when I open up an old project, I get a warning that goes something like this: "The project was saved with an older version of iMovie. Opening it in this version will cause it to be upgraded, which will make it unreadable by older versions. Are you sure you want to open it?"
    I clicked okay, thinking "sure, I don't need to play it in an older version. I have iMovie HD."
    However, now when I play my old iMovie project, there are a few problems. For example, one original movie's title was over black. When I play the movie, I get a completely white screen and no title. Also, in another movie, when viewing the movie in full screen, the transitions were replaced by a black screen (although the transitions were there when I viewed the movie in the iMovie window). Basically, there are problems cropping up here and there.
    I need to do some more experimenting with all this to more fully understand how many problems there are. I don't know if the projects I opened in iMovie HD are now "broken" since I "upgraded" them with iMovie HD (when prompted to save the project's changes when quitting, I said NO, don't save changes).
    I don't know if I should use older versions of iMovie to view and burn to DVD these projects. (I still have iMovie 2 and 3, but not 4 or 5. I don't know if older versions would even work on my Quad G5 with OS 10.4.7.) I also don't know if the older versions of iMovie would work with the current version of iDVD. How can I tell which version of iMovie was originally used for a given project? How can I find iMovie 4 or 5 if I need it?
    I also wonder if projects I make with iMovie HD can be opened by future versions of iMovie, or if I should export them as Quicktime or something to be safe.
    As I start to look into this further, I would appreciate any comments, suggestions, and experiences that you may be able to offer. I need to get these movies back to their former selves, when they looked good!
    Message was edited by: Anthony M Kassir MD

    (when prompted to save the project's changes when
    quitting, I said NO, don't save changes).
    Excellent! That should leave you in pretty good shape. More below.
    I don't know if I should use older versions of iMovie
    to view and burn to DVD these projects. (I still have
    iMovie 2 and 3, but not 4 or 5. I don't know if older
    versions would even work on my Quad G5 with OS
    10.4.7.)
    The old versions of iMovie will run just fine in today's OSX. (But not iMovie 2 if it was the version that ran in Classic instead of Mac OSX.)
    I run versions 2,3,4,5 and 6 today. Problems are minimal.
    I also don't know if the older versions of
    iMovie would work with the current version of iDVD.
    That's not a problem unless your old iMovie projects contain chapters. If you tell iMovie 3 to create a new iDVD project, it might not work. You might not be able to transfer the chapter information to the newer version of iDVD.
    (I just tested iMovie 3 to iDVD 6 and everything worked just fine.)
    Except for iMovie 2, all old versions of iMovie stored a small QuickTime reference movie in the project folder. If you can't get an old version of iMovie to play nice with iDVD, drag that movie into the iDVD window.
    How can I tell which version of iMovie was originally
    used for a given project?
    Drop the project file (discussed below) onto the TextEdit icon in the Dock. The version of iMovie that last saved the project is shown in the first few lines of the project file.
    iMovie 5 used an entirely different project file format, the pList format. The top of the project file will look like this in TextEdit:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    How can I find iMovie 4 or
    5 if I need it?
    eBay?
    I also wonder if projects I make with iMovie HD can
    be opened by future versions of iMovie, or if I
    should export them as Quicktime or something to be
    safe.
    We can never assume any new version of iMovie will be able to understand all features of a older project. It's always smart to make a backup.
    There can be problems Apple can't anticipate. There may be third-party software used to create titles, transitions and special effects, plug-ins not installed with the new version or (more often, incompatible). The fonts installed on our Mac may have changed too. There's lots of features that can't be anticipated. I've never had a problem converting projects, but I never use third-party add-ons and special fonts.
    As I start to look into this further, I would
    appreciate any comments, suggestions, and experiences
    that you may be able to offer. I need to get these
    movies back to their former selves, when they looked
    good!
    My guess is it should be possible to restore the projects back to their original state.
    Note that when imovie 5/6 converts an older project, it does NOT create a true iMovie HD project. Instead of creating an iMovie package, it retains the project FOLDER format. It places new iMovie HD elements inside the old project folder instead of converting it to a package.
    When converting the project it changes the old project file name to "Sample Project Name.iMovie2Project", then creates a NEW project file with the plist format, having the name "Sample Project Name.iMovieProj". (There may NOT be the .iMovieProj extension.) When you save the new project, it adds a new project file "Sample Project Name.~iMovieProj". Note the tilde. The tilde file is a backup of the project file as it was when last saved in iMovie HD.
    For our purposes, ignore the iMovie HD project files. We'll use the file ".iMovie2Project" to restore the project. (The extension is the same for all old versions of iMovie, not just iMovie 2.)
    • In the Finder, Duplicate the entire project folder. Work on the copy.
    • Open the project folder in the Finder.
    • Discard the "Cache" folder, the "Shared Movies" folder, the "Audio Waveforms" folder and the two iMovie HD project files. (Some of those items may not yet exist yet because you didn't save the converted project.)
    • Drop the "Sample Project Name.iMovie2Project" file onto the TextEdit icon in the Dock to get the version. Close it.
    • Remove the ".iMovie2Project" extension, if you want.
    • Launch that version of iMovie. Drop the "Sample Project Name.iMovie2Project" file icon on the iMovie icon in the Dock. With luck, the project should open normally. It's possible any third-party plug-ins used to create the project may not be available. If they aren't available, there might still be problems.
    • Move your unconverted projects to folders that say which version of iMovie created them. To open them in the future, drop the project icon on the appropriate version of iMovie.
    If all this fails, there is another way to do the editing you want. That is to import the project.mov file that's inside the converted project folder to a new iMovie HD project. That will deliver the video and audio of the original project as a single clip. Use that to re-edit the project. The name of the movie is "Sample Project Name.mov".
    (The movie is a QuickTime reference movie, with no video and audio of its own, just pointers to the files in the Media folder. So long as the Media folder hasn't changed, it can play the original project as last saved.)
    Importing the project.mov won't work with iMovie 2 projects, however, for iMovie 2 didn't store a project.mov file in the project folder.
    Even if you end up importing the project.mov, you still may want to "unconvert" the project as described above.
    Hope I haven't skipped a step. Let me know if you bump your head on something.
    Karl

  • Cannot Open New Projects Created in Premiere 8

    My software is Premiere Elements 8
    My system is a Dell Studio 17, i7-720QM, 6MB Cache, 8GB DDR3 SDRAM.
    I ran into a third problem using PE8:
    1.  After I open a New Project in the PE8 Welcome Screen, sometimes the work area refuses to pop up on my screen; no Monitor, no Timeline, no Task pane.  When I relaunch PE8 and try to open the New Project I just created I get a message "...cannot open projects created with Premiere Pro"
    Has anyone experienced this?  Do I simply reload the software?  I recently downloaded the PE8.0.1 patch.
    Thanks for any assistance.

    I too had the same issue - along with an inability to (re)open video projects.  I did a few things.
    As long as I created the project using the DV - "Standard 48kHz" setting, it worked.  Selecting "Widescreen 48kHz" allowed me to save the project but I was unable to open it, receiving the error you are getting about needing to use Pro.
    The second issue is an inability to open an existing project.  Premiere launches, a progress bar shows "loading....1%...100%" - then nothing happens.  The workspace is empty and all menu options are disabled.
    First - install 8.01, and reboot!   The installer doesn't indicate that you need to.  I continued to have the same problems until I rebooted.
    Second - upgraded the ATI drivers from the Dell website.  Apparently my 2-week old Dell XPS-16/i7 laptop came with drivers from 2009 - go figure.
    To recap, 8.01 (+reboot) fixed the "need Pro to open" issue
    Updating ATI driver from Dell website fixed the "can't open existing project" issue.
    And while on the Dell website you'll notice lots of drivers that need updating.  I did them all.
    -Mike

  • Save project created with trial version in Captivate 5.5 with license

    I have a project created with Captivate6 trial version. Now I have a license for Adobe Captivate5.5. The content of my project with Captivate6 will expire when the trial period is over and will not be accessible. I cannot open the .cptx file with Captivate5.5. How can I save my work from the trial Captivate6 to the licensed Captivate5.5? This is the last day of my trail version. Please help as soon as possible.

    Hello and welcome to the forum,
    I'm so sorry, but there is no backwards compatility beteen 5.5 and 6. You cannot copy slides, objects from 6 to  5.5. You can try to export what is available in the Library, some objects you will hopefully be able to reuse in 5.5. But the project will have to be recreated from scratch.
    Lilybiri

  • Projects created in IDVD 5 now complains of missing files in IDVD 6

    Hi,
    I just installed ILife 06. Now when i try to open dvd projects created in IDVD5 it now complains of missing files. It can no longer find photos for the slideshows i have created.

    Have you run the new iPhoto? Did it "upgrade" your library when you opened it?
    the iLife apps are linked, and it is best to open them in the following order:
    iTunes, iPhoto, iMovie, and then iDVD.
    and you might check this too:
    http://docs.info.apple.com/article.html?artnum=75491

  • How do I get my Mac to recognize external drive filled with 5 projects, created at Apple Store?

    How do I get my Mac to recognize external drive filled with 5 projects, created at Apple Store? I created 6 hrs worth of projects on computer in apple store with my external. came home my computer did not recognize it at all. went back to apple, they said oh click the news reel bottom left that will do it, came back home and nope....not recognizing it, in fact it says no events exist on this disc. I want to get the 5 projects and put up on vimeo tonight. ugh.

    Hi Tom,
    I'm so impressed with how you help everyone solve their problems. I will do my best here, but my husband will be home soon and knows how this large external is formatted.
    How late do you all work there? I'm on east coast. Is the screen shot you wanted? I opened up external and
    this is what I see.
    Drive is connected to usb in back of computer. N

  • Cant open projects created in Beta1

    hi, ive just installed the 2nd beta FC.
    installation was completed successfully. however i cannot open any of my previous saved FC projects (.fxp)
    it just comes up with an error message saying: 'Flash Catalyst cannot open this project because it was created by an incompatible version of Flash Catalyst'.
    so does this mean that all projects created in the 1st beta are rendered useless?
    what should i do
    cheers
    mudd

    Sorry, but in order to support new features and functionality, we have had to make changes to the Flash Catalyst project files that are not backwards compatible. The new beta cannot open files created with earlier prerelease versions.
    I don't know how much use this will be to you: You can use an unzip utility to uncompress your .fxp file and then use a text editor to inspect many of the files within the project. From there, you can try to copy and paste some of your code into (for example) a Flash Builder project and salvage some of the old project.
    -Adam

  • Can I work in Premiere 12.0 with projects created in Premiere 8.0

    Can I work in Premiere 12.0 with projects created in Premiere 8.0?

    Chris4105
    Maybe.
    You should be able to open the version 8.0/8.0.1 project in 12,  but there are no guarantees. The classical recommendation is to finish the project in the program that it was created.
    When determining if you can or cannot, I suggest that you work with a copy of the Premiere Elements 8.0/8.0.1 project.
    Several of the Title templates of version 8.0/8.0.1 used graphics with .tga file extension. The .tga format is not supported in Premiere Elements 12.
    That is just one feature that would not be expected to translate from 8 to 12.
    Are two different computers involved here? Where are the media for the version 8 project?
    More later.
    Thanks.
    ATR

Maybe you are looking for

  • Error while recording bdc for F-02...........

    Hi,      I m doin BDC recording for tcode F-02, i m getting a pop-up screen stating as, Coding Block ...asking  Transaction type....       This pop-up apperas only while recording,  if i extend G/L without recording i m not getting this pop-up and th

  • My iMac 5.1 with Windows XP can't connect with Time Capsule

    The iMac can connect with Mac OS but not with Win XP. Can see the signal, but can't connect.

  • Can I change a pre-order from a 6 to a 6+?

    Wondering if anyone has changed their order.  Buyers remorse!  Should have went with my gut and ordered the plus.

  • What are the advantages..

    Hi friends,       can you please tell me <b>what are the advantages of using MVC?</b> because <b>i can use ABAP Objects without using MVC.</b> Thanks in advance, Regards, Kannan.

  • Wml in jsp

    I written my wml in jsp. However, when i use nokia simulator to test. It give me a error saying mime type not supported. I had written: <% response.setcontentType="text/vnd.wap.wml"; %> Do anyone know why??? Please help me. I need to rush my project.