One more for the classpath experts

Hi there,
I am having classpath trouble. Have made a little example of my problem. I have a simple HelloWorld program called Test. Here is what I do...
First, I try to run it with no CLASSPATH or �classpath info and naturally it fails because it can�t find the Test class.
[~/mainwebsite_html/core]$ java Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test Then I put the classpath info in to allow it to find the test class and it is fine. This also works with the full path info.
[~/mainwebsite_html/core]$ java -classpath . Test
Hello WorldThen, I move the class file into another directory.
[~/mainwebsite_html/core]$ cp Test.class otherdir/Test.class I execute the file with the correct classpath info but now it no longer works.
[~/mainwebsite_html/core]$ java -classpath ./otherdir otherdir/Test
Exception in thread "main" java.lang.NoClassDefFoundError: otherdir/TestI have tried all sorts of combinations of full path directories, using ./ and not ./ etc.
It seems so simple that I just don't get why it wont work...
All answers appreciated.
regards
Andrew

thanks Kayaman - but I don't get it.
This Test program is not in a package. All I want to
do it run it. Does that mean I need to cd to that
directory to run it? (Might be a solution I suppose)No. He's saying that you specified otherdir twice. You only need to specify it in the classpath, not in the class name. If you do combine a directory with the classname, then it refers to the class' package.
How do I run a java program somewhere else in the
system (even assuming I get the classpath right?)Just like he showed you: java -classpath theParentDir TheClass
Side note: You really should put your classes into packages.

Similar Messages

  • Can we have more than One DC for the sales organization and Plant combo?

    Can we have more than One DC for the sales organization and Plant combination?
    If yes can you please site a practical example to clear the picture

    Hi
    First of all in SAP sales orgs are assigned to distribution channels and the combination of sales org and distribution channel which is called distribution chain is assigned to plant
    There is  no direct link  between sales org  and plant or distribution channel and plant
    So  sales org  and plant combination doesnot exists and
    it is only sales org and dist channel combination which is  called as distribution chain only exists
    Nowhere in SAP we are assigning sales org to plant
    It is because sales org alone doesnot make sense and its combination with dist channel only makes sense
    because sales org is a selling org and the distribution channel is the route to sell and this combination has only to pick the material from plant to process sales to customers
    The relation between sales org and distribution channels is many to many and also vice versa
    Multiple sales orgs can be assigned to one distribution channel and
    Multiple distribution channels  can be assigned to one sales org
    Similarly the relation ship between Distribution chain (sales org+dist channel) to plant is also many to many and vice versa
    Similarly plants from other company codes can also be assigned to Distribution chain to facilitate intercompany processes
    In whatever way look at it the multiple distribution channels can be fit anywhere
    Regards
    Raja

  • Thank you guys for helping me out now I can now access my IPad. But there is one more challenge, the iPad is showing negative view so I can not see the true color of things

    Thank you guys for helping me out now I can now access my IPad. But there is one more challenge, the iPad is showing negative view so I can not see the true color of things

    Settings>General>Accessibilty and turn off white on black.
    Matt

  • Please begin to work more for the future dear Canon.

    I love Canon and I am a Canon guy for long time, but dear Canon, you lose so much time brush up models that in short time would be overwhelmed (EOS models), please take a look at the New Pentax 645D Medium Format, Hasselblad and Phase One which is the future photography format. Please begin to work more for the future dear Canon. Sincerely George.

    Hmmm..    20Mpix DSLR gives pin sharp A1/A0 prints.    How much more do people want?
    How much more can people use!
    I'll take great AF, great light sensitivity, Auto-ISO with exposure compensation in Manual, all sorts of usability features, but frankly the thing holding back my photos isn't the resolution...   and I only have 8Mpixels.
    Perhaps Canon are working on a layered colour sensor that wouldn't need a bayer matrix, so buying 2 stops of sensitivity..   Now that I would buy!
    Perhaps they'll bring back the eye-controlled AF/AE point selection..    oh yes pleeeese!

  • Enter at least one number for the business partner

    Hi Experts,
    SRM 5
    Classic scenario
    R/3 4.6c
    I am trying to execute users_gen transaction for integrating the user with the org. structure. However upon doing so I get an error message "Enter at least one number for the business partner"
    Please provide pointers on the cause for this and how it can be rectified.
    Thanks.
    Regards,
    Amish

    Hi Muthu,
    I am integrating a single user at a time - through users_gen.
    Infact I am getting the same error message while moving the users within the org. structure.
    Steps -
    1. Execute users_gen
    2. Select the user to be integrated
    3. Click execute check mark
    Please provide any pointers.
    Regards,
    Amish

  • TS1702 We use one ID for  the Apps store for 2 iPhones. In the second profile on the Macit is impossible to update apps there is a mistake. What is the decision?

    We use one ID for  the Apps store for 2 iPhones. In the second profile on the Macit is impossible to update apps there is a mistake. What is the decision?

    This happens when you both use the same Apple ID for iMessage.  To fix this you have two choices:
    On one of the phones go to Settings>Messages>Send & Receive, tap the ID, sign out, then sign back in with a different ID.  Note: you can still share the same ID for purchasing in Settings>iTunes & App Stores; or
    On both phones go to Settings>Messages>Send & Receive and uncheck the email address(es) shown under "You can be reached by iMessage at".  Also uncheck the other phone's phone number, if present.

  • WHY ARE THE UK USERS PAYING MORE FOR THE CLOUD SERVICES????

    WHY ARE THE UK USERS PAYING MORE FOR THE CLOUD SERVICES????
    OR IS IT JUST LAZYINESS THAT YOU CHANGE THE DOLLAR SIGN FOR THE POUND?

    it obviously doesn't, but then again some people or organisation only care about price when it comes to purchasing their laptops, and it is hard to justify making a special model for a selected few.
    Sure everything can be done if there is a market for it, but Lenovo won't know how large the market is before hand, as such they are hedging a bet by not moving with the market (which Lenovo have done on many occasions). I guess the finanical return is not the worth the risk for Lenovo to keep the 4:3 or 16:10 screens.
    But this debate has been going back and forth for a long time, so no point bringing it up again and again.
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Is there a MS Office application that can be downloaded to the Ipad. Im aware that the software is available for the Mac, but is one available for the Ipad?

    I just purchased an Ipad 2 and I was wondering if there was an app that would allow me to create MS office docs (Word, Excel) using my Ipad.  I know that there is software for the Apple Mac. Does anyone know if one exists for the Ipad? Thanks!

    Ms Office won't work on iPad, try Quickoffice Pro or Documents To Go from the App Store.

  • In Cover Flow, a compilation album shows different covers for each song.  How do I make it show one cover for the whole album?

    In Cover Flow, a compilation album shows different covers for each song.  How do I make it show one cover for the whole album?

    Also in the first page of Get Info for all tracks set the Album Artist to be Various Artists.
    If you select all the tracks and right click to get info then you can do all the tracks in one go

  • HT204053 i am having iphone3gs and ipod4s, is it possible the application that i have purchased in my iphone can be available in my i pod by doing payment only one time for the same application in my i phone...if yes,plz let me know hw it is possible

    i am having iphone3gs and ipod4s, is it possible the application that i have purchased in my iphone can be available in my i pod by doing payment only one time for the same application in my i phone...if yes,plz let me know hw it is possible..

    Open the App Store on your device.
    Make sure you are signed in with the same account used for the original purchase.
    Tap on Purchased from the bottom navigation bar.
    On iPhone or iPod touch, tap Updates from the bottom navigation bar, then tap Purchased.
    Locate the app in your Purchased tab.
    Tap the download button (cloud symbol)
    See also: http://support.apple.com/kb/HT2519?viewlocale=en_US&locale=en_US

  • Can there be more than one port for the same logical system

    Can we have more than one TRFC port for tranferring data from one logical system to another?
    The requirement is to transfer same basic idoc type from one logical system to another through two different ports. Is it possible?
    For eg. some specific data (country specific) for the same basic idoc type can be sent through a separate port and the other data through a different port inorder to distinguish between the two.

    Hi Shital,
    I don't think so. Because of that what i told you. There would be a dirty trick (back routing) to solve your issue. But its quite difficult and not standard. You create two http receiver services  and two http sender services. You route your message depending on payload to the one or the other http receiver channel. The receiver is in both cases: THE XI! Now you have a second message, which you  can route to IDoc adapter. But in this case you have different sender and in the receiver determination you can put the sender, so you will be able to use different communication channnels and so different ports / destinations.
    Advantage: Your task would run, no performance problem (http: very good, asynchron)
    Handicap: You see every message double in the monitoring, the scenario is not easy to understand and it is a big task 4 other people to change it.
    Regards,
    Udo

  • OT One for the msSQL experts - getting the database to do the work

    I need a little advice on how to use either a function or
    stored procedure
    to handle some update work.
    Basically I am building an application where customers are
    assigned points
    values based on the products that they have bought. In the
    Orders table a
    value is assigned to each order and I can get the total
    points per customer
    by running the following Select statement
    SELECT Cust_ID, SUM(Order_Points) as PointsTotal
    FROM tblOrders
    WHERE Status_ID in (3,5,6)
    GROUP BY Cust_ID
    What I then want to do is the take the number for each
    Customer and update
    the value in a field called Cust_Points in tblCustomers.
    I could simple write this to a dataset on the page, loop
    through it and run
    an update statement for each customer, but given that I am
    using msSQL I am
    sure that there is some way to write this whole action inside
    of a stored
    procedure or function and then just call that to handle the
    work.
    I am using ASP.Net C# for the pages.
    Any help gratefully received.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net

    "Paul Whitham AdobeCommunityExpert"
    <[email protected]> wrote in message
    news:es8q3e$rle$[email protected]..
    > I could simple write this to a dataset on the page, loop
    through it and
    > run an update statement for each customer, but given
    that I am using msSQL
    > I am sure that there is some way to write this whole
    action inside of a
    > stored procedure or function and then just call that to
    handle the work.
    Good instinct. :)
    What you need in this case is a trigger.
    You'll need to add an INSERT and/or UPDATE trigger to your
    tblOrders table.
    Which one you need (or if you need both) depends on your
    workflow. I notice
    you're only counting orders with certain status values. If an
    order can be
    inserted with one of those values, then you need an INSERT
    trigger. If an
    order gets one of those values on a later update, you need an
    UPDATE
    trigger. If either could be the case, you need both.
    Your basic outline is:
    INSERT trigger: if status is in (3,5,6) then add points to
    tblCustomer.
    UPDATE trigger: if status has changed from something other
    than (3,5,6) and
    is in (3,5,6), then add points to tblCustomer. If status has
    changed from
    something in (3,5,6) to something NOT in (3,5,6), then
    subtract points from
    tblCustomer. If status has not changed or does not change
    "groups" (for
    instance, was 3 becomes 5 or was 0 becomes 2), then do
    nothing.
    Here's some good resources on the basics of triggers in SQL
    Server. These
    should get you the knowledge you need. If you've got specific
    questions
    about the trigger afterward, then I'd suggest opening a new
    thread just so
    this one doesn't fall off.
    Basics:
    http://www.aspfree.com/c/a/MS-SQL-Server/Triggers/
    That should be all you need this time around. Here's the rest
    just for
    completeness' sake:
    Specifics:
    http://www.aspfree.com/c/a/MS-SQL-Server/Trigger-Specifics/
    Managing:
    http://www.aspfree.com/c/a/MS-SQL-Server/Trigger-Management/

  • Sourcing: Creating more than one PO for the same BID

    Hello,
    We are using the sourcing functionality in SRM 5.0 (classic escenario).
    On the basis of an acepted bid, we generate a Purchase Order in the R/3 Backend system.
    We noticed that in the standard, SRM lets us create for the same position of the bid, another Backend PO, without warning or error.
    We would like to manipulate this escenario in such a way that this PO repitition of the same Bid position is not possible.
    Anyone already found a way around this problem? May be we need to activate an error message?
    Thanks for any reply.
    Aart

    I agree that
    SRM lets us create for the same position of the bid, another Backend PO
    but it does give warning that I have seen.
    would recommed to work with yr ABAP team to see whether you can convert this message to type "Error".
    one more suggestion is for ..... PO_NEW badi
    hope you would have implementation of this exit.
    then you can check whether for current BO BUS2200 whether ECC PO is already created
    if yes
    then do not create again
    BR
    Dinesh

  • Users have more than one profile for the same role

    Hello,
    As I said in my earlier post I'm rather new to SAP.
    I'm doing now the security audit of my SAP system. In particular, I'm checking whether business users have access to DEBUG functionality.
    I have run report 'Users by complex selection criteria' and found certain number of such users. Then I looked further and discover that all these users have role X assigned to them. The profile P2 of the role X displayed in PFCG has DEBUG functionality deactivated. After second look I discovered that all these users have earlier profile P1 for the same role X assigned to these users. This profile P1 contains the functionality in question.
    I solved the issue by revoking the role X from the users and assigning it again. Both P1 and P2 profiles were removed from the users and only P2 was reassigned again.
    I used to think that role may have only the profile that is displayed in PFCG? Also, I used to think that if the role profie is regenerated the newly generated profile automatically replace the old one assigned to users. Am I wrong?

    Hi Pavel
    In simple and short ..
    Role contains authorization objects..
    Maximum limit of authorization objects for a role is 150 .
    So a role can accommodate 150 authorization objects.
    New Profile ABC is created , when ever you create a new role. 1-1 relation.
    But if a role has more than 150 authorization objects .. then automatically a new profile ABC01 will be created and it will also be aligned to that role .
    if role has 400 auth objects, then profiles will be ABC ,ABC01 ,and ABC02
    i hope this helps you
    Cheers
    Pavan M

  • Can i create more than one attributes for the custom class created using java API

    Hello everyone,
    I have been creating class and its attributes programatically using java APIs, I want to know that is there any way to create multipal attributs for the same class in just one call of API with all the options for each attributes,
    thanks

    You can create a new class and define all of the Attributes at the time the class is created - this is the preferred way of creating classes. Use the addAttributeDefinition() method on ClassObjectDefinition. If you need to add attributes to existing classes, you can only add them one at a time (using the addAttribute() method on ClassObject).
    (dave)

Maybe you are looking for

  • How do I use a MessageSelector with application-specific properties

    According to a couple of JMS references (Sun, Oreilly) and the oracle documentation (under the heading "Using Oracle Java Messaging Service (JMS) to Access AQ", page 102 of 1082 , Application Developers Guide - Advanced Queuing, Release 2 (8.1.6)) St

  • Corrupt User - Permissions problem

    I seem to be having a chronic permissions problem with my primary user account. Each time I restart or turn on my machine, I cannot get Mail or Safari to start without first running the Disk Utilities - Permissions repair first (from another account)

  • How can I force a specific content size in a ScrollPane -- Repost   from actionscript group

    Haven't gotten any answers in the actionscript group, so maybe I will fair better here... See http://www.seanberry.com/scrollPaneInTheAss.html for reference Have an interesting situation here. I am using a scrollpane to hold a loaded movieclip (scrol

  • Inc tax prices not showing??

    I have a strange problem, for some reason the tax inc prices are not showing where they should. see site eg product: https://simona01.worldsecuresystems.com/simona/tops/black-and-white-spot-oversize-top In the large product page the inc tax price is

  • Starting with J2ME

    I'm trying to start with J2ME, and am completely puzzled by the whole thing. And Sun doesn't help much either. I'm trying to make a game, where lines fly by in the screen. The user must avoid these lines, by moving the ship around with the stylus. Is