Adding .class files to your project and making them work.

Ok, im fairly new to java and having trouble understanding how to make importing of .class files work. Im using eclipse 3.2
I have the files in a directory and I have gone to project->properties->java build path->libraries->add external class folder and pointed it to the correct place.
Now, I am trying to use some of the classes it provides. I get no errors when creating the object with this code:
com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
Before I did the add external class folder that code would error cause it didnt know what com.ECS was. Now it works fine. My problem is that when I try to use a class, it does not recognize it as a class. After doing the above code I have:
itemRequest.setSearchIndex("Books");
its giving me an error on the period, saying: "Syntax error on token(s), misplaced construct(s)". Its not seeing that it is a class, so I can't use it. But when I am creating the object I get no errors. For reference, here is the chunk of code:
com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
itemRequest.setSearchIndex("Books");
the second line of which errors. So my question is, how do I get it to recognize that the itemRequest is a class when I have imported the .class files to my project already?

It's working fine. It's just that you have to put your code in a method.

Similar Messages

  • Decompiling Class Files, re-building project and redeploying

    Hi
    I need to make changes to an existing customized iview.
    I have downloaded the par file, but src.core is empty.
    I have then downloaded the jar file which I proceeded to decompile with DJ Java Decompiler.
    Pls can somebody explain to me how I now include these files into a project and rebuild the par file so that I can make changes and test.
    thanks in advance
    Anton Kruse

    hi,
    Check the par file structure here:
    http://help.sap.com/saphelp_nw70/helpdata/en/bb/1bb8428e05c86ae10000000a155106/frameset.htm
    You have jar file in folders:
    lib -- Contains all application library files (JAR) that can be referenced by other portal applications
    private/lib -- Contains all application library files (JAR) that are used exclusively by the application.
    So all <b>src.api</b> classes are put in <b>lib</b> folder, and src.core into private/lib.
    If you are decompiling a jar, you should check from where you got it. (<b>lib</b> or <b>private/lib</b>). So place it back from where you took it.
    Greetings,
    Praveen Gudapati

  • Adding a class file to JCOP project

    I'm trying to add a class file a JCOP project, I'm using a class folder.
    After the load commands I'm getting the following error:
    Error code: 6985 (Conditions of use not satisfied)
    Offending APDU: 6985
    Wrong response APDU.
    Is there any special configuration that I'm missing?
    Thanks,
    Uri

    Thank you very much for your help.
    >Where are you getting the error ?
    I'm getting the error at JCOP Shell after entire load (I think?):
    RefLocation.cap loaded (27 byte)
    Load report:
    434 bytes loaded in 0.9 seconds
    effective code size on card:
    + package AID 8
    + applet AIDs 15
    + classes 27
    + methods 129
    + statics 62
    + exports 0
    overall 241 bytes
    Error code: -4 (Malformed response APDU)
    Offending APDU: 69859000
    Error message: Invalid response length. Expecting delegated operation response
    jcshell: C:/Program Files/eclipse/plugins/com.ibm.bluez.jcop.eclipse.targetpack_1.0.3.3/lib/scripts/sim-simul-capfile-autoinstall.jcsh[58]: Wrong response APDU.
    jcshell: C:/Program Files/eclipse/plugins/com.ibm.bluez.jcop.eclipse.targetpack_1.0.3.3/lib/scripts/sim-simul-capfile-autoinstall.jcsh[58]: Unexpected error - script terminated!
    >Did you authenticate to the CM first?
    I think the shell does it automatically at the beginning of the script .
    > Is your class an applet?
    Yes, my class is an applet, but I�m trying to use(import) a regular class.
    >are you trying to perform any crypto?
    No
    >Is there a PIN required to perform any operation?
    I don�t think so.
    I got the applet and this class from third party. The strange thing is that when I compile and convert it using DOS prompt, I can load it successfully on a SIM, but it doesn�t work in JCOP, does it make any sense? I�m probably doing something wrong�
    Thanks again,
    Uri

  • Recently I tried adding disc menu to my project and an error occurs and system shuts down using pre9

    Recently I tried adding disc menu to my project and an error occurs and system shuts down using pre elements 9 on mac how can this be repaired

    From the Premiere Elements Information FAQ http://forums.adobe.com/thread/1042180
    •What version of Premiere Elements? Include the minor version number (e.g., Premiere Elements 9 with the 9.0.1 update).
    •What operating system? This should include specific minor version numbers, like "Mac OSX v10.6.8"---not just "Mac".
    •Have you installed any recent program or OS updates? (If not, you should. They fix a lot of problems.)
    •What kind(s) of image file(s)? When talking about camera raw files, include the model of camera.
    •If you are getting error message(s), what is the full text of the error message(s)?
    •What were you doing when the problem occurred?
    •What other software are you running?
    •Tell us about your computer hardware. How much RAM is installed?  How much free space is on your system (C:) drive?
    •Has this ever worked before?  If so, do you recall any changes you made to Premiere Elements, such as adding Plug-ins, brushes, etc.?  Did you make any changes to your system, such as updating hardware, printers or drivers; or installing/uninstalling any programs?
    And some other questions...
    •What are you editing, and does your video have a red line over it BEFORE you do any work?
    •Have you viewed the tutorial links at http://forums.adobe.com/thread/1275830 page?
    •Which version of Quicktime do you have installed?

  • How to add class file to the project in netbean

    Hi,
    I am not sure if it is the right place to put the question. I just cannot find the way to add my existing java class file into the project in net bean.
    Anyone can help?
    Thanks a lot

    Look at the "classpath" entry on the Index tab in NB's Help. There are entries there that explain how to add existing classes and libraries to a project.

  • How do I prevent Adobe from taking my jpegs and making them pdf files? I have had to uninstall Adobe to access my photos as jpegs.

    How do I prevent Adobe from taking my jpegs and making them pdf files? I have had to uninstall Adobe to access my photos as jpegs.

    I would suggest you change your file associations so that jpgs open in a program other than Acrobat.  Assuming you have a Windows machine, just go to the Start, and search for "file associations" ... it's part of the Control Panel.
    Scroll down to the file type jpg, and set it to open with whatever graphic preview or editing program you have that you want to use as the default.  From that point on, when you click on a jpg, it should not open Acrobat and instantly try to convert it to a pdf.

  • I have photoshop CC. I cannot open two files such as Tiffs and view them side by side. When I open the second file it overrides the first. Do I need to do something with preferences?

    I have photoshop CC. I cannot open two files such as Tiffs and view them side by side. When I open the second file it overrides the first. Do I need to do something with preferences?

    What happens when you try to use the clone stamp tool?
    It should work with the images side by side.
    You can setup photoshop cc to be like photoshop cs2 was on your other mac, by going to Photoshop>Preferences>Interface and unchecking
    Open Documents as Tabs and Enable Floating Document Window Docking
    And also going to Window and unchecking Application Frame

  • Hi, i purchased a 2 dvd digital set. i cant just download it straight to my ipad. they said i have to down load it to my i tunes, then can transfer to i pad. im not seeing how to click the files from my email, and get them into the i tunes acct... ugh.

    hi, i purchased a 2 dvd digital set. i cant just download it straight to my ipad. they said i have to down load it to my i tunes, then can transfer to i pad. im not seeing how to click the files from my email, and get them into the i tunes acct... ugh.
    i do not have a mac home pc. just a regular pc

    I had the same problem after I gave my old iPad to my parents and tried to install Netflix. This is what you have to do:  Open iTunes on your computer, the one you sync your iPad to. Then go to iTunes Store and search for and download Netflix app. After you download it, if your iPad is set to download new purchases it may start downloading on your iPad. If so, tap and hold to delete the app (because it is trying to install the new version on the iPad) Next step, go to the App Store on your iPad and find Netflix and it should say install since you already purchased it on the computer. Tap to install, and it will say the version is not compatible, tap to download a previous version. Click that and it will install the older version!    One more thing, if and when you sync to your computer again it will say something like " Unable to install Netflix on your iPad" Just click the box to never remind you again, because it's trying to sync the newer Netflix app to your iPad, but it doesn't work so it displays the message. The old app will remain on the ipad. Hope this helps, good luck

  • There is a problem with my apple watch.it is not working well .There is a problem in its charging .The repairers says that contact to your company and ask them to provide you its software. Please help me.

    There is a problem with my apple watch.it is not working well .There is a problem in its charging .The repairers says that contact to your company and ask them to provide you its software.
    Please help me.

    Please be aware that you are not communicating with Apple when you post in these forums. These are user-to-user support forums, so in almost all cases the only people who will reply to your posts are, like me, your fellow users.
    As to your issue, Apple does not and never has made a wristwatch as such. The only thing close to a watch that they have made was the 6th-generation iPod nano:
    http://support.apple.com/kb/ht1353#iPod_Nano_6G
    which has a clock feature and which some people have worn as a wristwatch. Is that what you mean?
    Message was edited by: varjak paw

  • Outlook Web Access is currently unavailable. If the problem continues, contact technical support for your organization and tell them the following: No Client Access servers of the appropriate version can be accessed from the Internet

    Good Morning,
         We are getting this error 
    Outlook Web Access is currently unavailable. If the problem continues, contact technical support for your organization and tell them the following: No Client Access servers
    of the appropriate version can be accessed from the Internet
    We installed a new Exchange 2007 CAS on Windows 2008R2. Got rid of old CAS on Exchange 2007. Now seeing this error. Does anyone have an idea??

    Hi,
    If the issue persists, I recommend you install Exchange 2007 SP3 RU7 and check the result. Also, ensure that Exchange 2010 SP2 RU1 or later version is installed. Old Exchange version may lead to the CAS-to-CAS proxy incompatibility.
    What's more, here are some helpful blogs for your reference.
    Exchange 2010 SP2 RU1 and CAS-to-CAS Proxy Incompatibility
    http://blogs.technet.com/b/exchange/archive/2012/02/17/exchange-2010-sp2-ru1-and-cas-to-cas-proxy-incompatibility.aspx
    OWA Coexistence With Legacy Versions
    http://blogs.technet.com/b/sjimmie/archive/2010/07/09/owa-coexistence-with-legacy-versions.aspx
    Hope this can be helpful to you.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Can I become a sponsor, unbox your products and send them back to you describing on youtube to people what the pricing and availability are. Thank.

    Can I become your sponsor on youtube? I can unbox your products, and give them back to you when I'm done. Thank You

    The ASA doesn't really support EEM.  Yes, there is a now a feature called EEM in 9.2, but it is quite limited compared to IOS.  In IOS, what you want would be possible, but on the ASA, you'll need to do all of your CLI commands off box using something like Expect.  I'm not sure how you're automating this now, but perhaps you are already using Expect.  That would be what I'd likely do in this situation.

  • Adding the wrong file into your project.  How do i recover

    Did you ever work on a project and for some reason store audio files in the wrong location or move so your project does not play back correctly.
    I just did that.
    Basically I found the right files and where there located but one of the files I found and added back, seems to be the wrong file. The problem is now that I told logic were to locate the file it saves it automatically. How do I click on a different audio file from another location, and put it in place (same location) of where the change need to be made.
    Hope i didn't confuse anyone.

    You are using 'Save As Project' aren't you? If not, you should, and set the copy options to taste, but certainly your unique files for that project. Also check out the manual about 'Consolidate' Projects.
    Having done that, if you have a region in your arrangement with the wrong audio file, then delete it, and pencil tool-shift-click where you want it to be. A file dialog will open from which you can pick the correct file. It will load where you clicked.
    Be careful when you clean up projects, or select-delete unused from the audio window, in case you delete a file used in another song. Always better to have too many copies than not enough…

  • Adding music files to iDVD project

    Hello All,
    Sorry if this has been asked before... I didn't seem to find anything in my "search" of past posts...
    A friend of mine recently passed away & I am (trying to) putting together a dvd to send to his brother that includes some home video of us ..... and I would like to include some music (files) from an old band he was in.... (he did a hme made cd)...
    I'd like his songs to be in a separate folder and be able to select from them with the menu (like Toast sets up a "music dvd)...
    All I have been able to figure to do is to include an iTunes playlist but that way one cannot jump from song to song... I even tried to do a seperate iMovie project with chapters for each song then export into iDVD & that (sort of) worked but I then couldn't figure out how to "combine" those "scenes" into my main project with the movies too...
    Now I am going the looong way around and saving out individual clips of each song as full quality dv and then will try to add them into a folder in my main project....
    My short question to all this long wind is:
    is there a way to create a "slide show" of individual music files the same way that slide show of photos works... so that you can move around between them with the menu.... all I have found is that a play list can be added into the sound "well" but then you cna't skip from song to song like you can with a what Toast does when it sets up a music dvd
    any ideas?
    thanks & regards to all for a great holiday
    from the coast of Maine
    -Larry

    Well...I'm not sure if my suggestion or ideas will help, but you could certainly use iMovie to organize and edit the movie portion of your DVD, then for the music portion, first add your songs to iTunes, then go back to your iMovie project, select the songs you want to add to your DVD project, and drag each song into the timeline. Now, you can add chapter markers at the beginning of each song. This might not give you a separate folder to open (folders are for data DVDs), but at least your audience will be able to see each song title and skip through the songs as neededce they are chapters. Other than this, you might want to wander over to the Toast discussion forum on the Roxio.com site where users of Toast may have a suggestion. With Toast, you might be able to drag your video and audio portions of your project into Toast separately, that way you only have two chapters: Video and Audio.

  • EJB:Error in adding class file in JAR

    Hi im doing project in EJB
    when i add class files to JAR this type error occurs
    Pls help in need of help

    Generally WEB-INF\classes\ is for compiled classes.
    You should move your java source files to say SecondWap\src\com\hclasses to match up with your package name in your ajva file.

  • OTL time card: Which ldt file for US Project and Payroll

    Hi,
    I am trying to figure out which ldt file needs to be used to customize US Project and Payroll time card.
    Appreciate your response.
    Thanks
    Prasad

    Hi
    Shorten the name of ltd file XXHCC_EXT_014_hxczzhxclayt0073.ldt, because you can only have 30 characters for the name.
    Hope this helps!
    Thanks
    Gaurav

Maybe you are looking for

  • Multiple row column-sharing with GridBadLayout does not work as expected

    I was trying to figure out why I could not initially accomplish the following with a GridBagLayout: Row0: 0000011111 Row1:      1111122222 Row2:           2222233333The above is supposed to be 3 JLabels on three different rows: The 1st row has a sing

  • HT6208 How to update my iOS 7.1.1 they are asking for password ?

    How to update my iOS 7.1.1 they are asking for password ?

  • Cookies...I need alternatives to using them...

    I need to create a text only version of the portal to meet requirements of the Federeal Gov't's Disabilities Act... So, I'm scraping the content of the Portal Pages (pages from v1.0.2.2) by basically creating another middle tier (db -> application se

  • ParserCallback iFrame question.

    Hi, Im using the HTMLEditorKit Parsercallback class. After creating connection with the URL given. I did this. HTMLEditorKit htmlKit = new HTMLEditorKit(); HTMLDocument htmlDoc = (HTMLDocument) htmlKit.createDefaultDocument(); HTMLEditorKit.Parser pa

  • Yoga 11s Recovery DVD

    I have a big problem and hope you can help me! I installed Windows 10 Tecnical Preview on my Yoga 11s for a try, but it's not ok yet. So, when I tried to restore the factory settings (and Windows 8), I discovery that Windows Technical Preview replace