JAR using another JAR

Hi,
I have created in Eclipse simple class Blah.class:
public class Blah {
     public Blah() {
          System.out.println("Inside blah");
Then I made a JAR file: C:\Blah.jar
Then I made in Eclipse another project with a simple class BlahBlah.class and linked Blah.jar file in this project:
public class BlahBlah {
     public BlahBlah() {
          System.out.println("Inside BlahBlah");
          Blah b = new Blah();
     public static void main(String arg[]) {
          BlahBlah bl = new BlahBlah();
Then I made another JAR file C:\MyJar\BlahBlah.jar from this project as an executable JAR.
But when I tried to run the second JAR from command line bad things happened. This is the output:
C:\MyJar>java -jar BlahBlah.jar
Inside BlahBlah
Exception in thread "main" java.lang.NoClassDefFoundError: Blah
at BlahBlah.<init>(BlahBlah.java:5)
at BlahBlah.main(BlahBlah.java:8)
Java execution started, but first JAR (C:\Blah.jar) was not found. In CLASSPATH variable I have following value: C:\Blah.jar
So, what am I doing wrong?
Thanks in advance. Lokutus.

When executing a jar, that jar has a personal classpath if I'm not mistaken, the CLASSPATH variable is ignored (which is logical, because only your system has that classpath. When executing the jar on another system you want the jar to execute without any environment variables being needed).
I know that in the META-INF/MANIFEST.MF file inside the executable jar you can list jar files that the executable jar depends on. The line would look like:
Class-Path: jar1.jar jar2.jar
and so forth (seperate by a space). What I don't know is how to make the mkjar tool create this line... google is probably your best friend.

Similar Messages

  • Is mx4j-admb.jar required if using another JMX implementation?

    In Appendix F, the documentation states that neither mx4j-jmx.jar nor
    mx4j-tools.jar are required if using another JMX implementation. However,
    I'm wondering if mx4j-admb.jar also is not required if using another JMX
    implementation. Could someone clarify this?
    Thanks.
    ;ted

    Hi Ted,
    It depends on what version of Kodo you're using. Older versions (pre
    Kodo 3.2.0) do still require the mx4j-admb.jar. Newer than 3.2.0 do not
    require any mx4j-* jars to work with other JMX implementations.
    Thanks,
    Greg
    Ted M. Young wrote:
    In Appendix F, the documentation states that neither mx4j-jmx.jar nor
    mx4j-tools.jar are required if using another JMX implementation. However,
    I'm wondering if mx4j-admb.jar also is not required if using another JMX
    implementation. Could someone clarify this?
    Thanks.
    ;ted

  • Could i use another database

    Im wondering if i can use another database for the workflow engine. I mean it comes with a database managment by default i want to know if a can use another one (SQL server)

    Hi,
    We have been using jtds driver , which is free and the fastest and without any bugs until now, we have been using it for 4 months now.
    The part below explain how to set up your mssql server with jtds driver.
    create a db lets call is bpel
    then run these queries on it. basically to create the tables, these files are
    domain_sqlserver.ddl
    server_sqlserver.ddl
    workflow_sqlserver.sql
    sensor_sqlserver.sql
    located at
    /OraBPELPM_1/integration/orabpel/system/database/scripts
    After that download the jtds driver for sql server.
    We do not use the microsofts jdbc driver for mssql, although we have tried it.
    It doesnt work properly, with the bpel process manager, basically it has some problem with select image and blob types from DB.
    Anyways, the best one we found was for jtds, it works great and is the fastest I beleive.
    We used data direct's jdbc driver but its not free and after doing some benchmark tests we found jtds was the fastest.
    mkdir -p jdbc/jTDS/unzip
    cd jdbc/jTDS/unzip
    download the jtds-1.2-dist.zip from
    wget http://surfnet.dl.sourceforge.net/sourceforge/jtds/jtds-1.2-dist.zip
    unzip jtds-1.2-dist.zip
    cd unzip
    cp jtds-1.2.jar OraHome_1/integration/orabpel/system/appserver/oc4j/j2ee/home/applib/
    You will now have to configure MsSQL in your data-sources.xml file.
    Microsoft SQL Server Database Configuration
    Oracle Bpel now needs to be configured to use Microsoft SQL Server, using the JDBC drivers.
    cd OraHome_1/integration/orabpel/system/appserver/oc4j/j2ee/home/config/
    vi data-sources.xml
    You must then place the following xml within the file:
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="BPELServerDataSource"
    location="jdbc/BPELServerDataSourceWorkflow"
    xa-location="BPELServerDataSource"
    ejb-location="jdbc/BPELServerDataSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="BPEL_user"
    password="bpeluser!">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="AdminConsoleDateSource"
    location="jdbc/AdminConsoleDateSource"
    xa-location="AdminConsoleDateSource"
    ejb-location="jdbc/AdminConsoleDateSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="user_name"
    password="password">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    <data-source class="net.sourceforge.jtds.jdbcx.JtdsDataSource"
    name="BPELSamplesDataSource"
    location="jdbc/BPELSamplesDataSource"
    xa-location="BPELSamplesDataSource"
    ejb-location="jdbc/BPELSamplesDataSource"
    connection-driver="net.sourceforge.jtds.jdbc.Driver"
    username="user_name"
    password="password">
    <property name="serverName" value="server_name"/>
    <property name="databaseName" value="database_name"/>
    <property name="portNumber" value="1433"/>
    </data-source>
    Run the BPEL server and everything should work fine.

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • My weather app in my iphone4 is suddenly using another location than mine, one from another state. Tried resetting my location, but no go.

    The factory installed weather app on my iphone suddenly has started using another state as my location. I tried resetting my location several times, but no go. Any ideas how to fix this?

    Have a look at this it may help
    http://support.apple.com/kb/TS4148
    please confirm
    You did purchase your unlocked iPhone4S from an Apple Retail store and I mean the Apple Store no where else sells unlocked iPhones in the UK regardless of their claims

  • Firefox seems to be my only browser that puts ads on my Facebook page. How can I stop this? I love Firefox but hate the ads and will use another browser until it's solved.

    Whenever I open Facebook through Firefox I get pop up ads and such. I do not seem to get this when using other browsers like Safari or IE. It's sooo annoying!!! I will use another browser until it's solved.

    Since you have encountered the problem at other sites, not just Firefox, I'd bet that it is an Internet Explorer problem, not the web sites. Actually, I am sure it is an IE problem.
    Try running Windows Update, perhaps there are some updates for Internet Explorer that might resolve the problem. If you don't know how to run Windows Update, use the Help on your system to look for information on Windows Update.
    If that does not help, use Google to search for information on IE9 locking up when downloading.
    Stan

  • Tried charging my 2009 MacBook Pro but the green light won't turn on and now my computer won't turn on (it was working right before I attempted to charge it!) what do I do????? Even tried using another charger I had for it and nothing! Help

    Tried charging my 2009 MacBook Pro but the green light won't turn on and now my computer won't turn on (it was working right before I attempted to charge it!) what do I do????? Even tried using another charger I had for it and nothing. No green light. Computer turn on. Now what??? Help!

    QUOTE: "No green light. Computer turn on."
    What? so were you able to turn on the computer with the new plug? does it give you any other light? amber/orange light?

  • Black Screen - Get Chime - Can Boot off HDD using another Mac - iMac 24in.

    Hope someone can help me here, as I'm at my wits end.
    I've got two issues, one with my MacBook Pro 17in, 4GB RAM, 160GB 7200rpm (2008) and another with my iMac 24in. 4GB RAM, 500GB 7200rpm (2009).
    Firstly the MBP, left work on Thursday last week, got home, powered up the MBP and got a black screen!!! Tried resetting PRAM, SMC, booting in safe mode, removing and re-installing RAM, removing battery and mains power and leaving off overnight etc etc, yet nothing happens. Benn all over the forums and have not found any solution to get my beloved MBP working on it's own. I can boot off the HDD using another MBP 15in, re-install Snow Leopard and as far as I can tell the HDD is fine, as I have run disk utility and it tells me the HDD is OK.
    I can't figure this out and it's doing my head in, as I use this laptop for business use and just can't afford to go out and buy another Mac. I should point out that this MBP never had any issues when running on Leopard, but ever since I upgraded to Snow Leopard, I have had nothing, but trouble. I did a clean install, in fact I have done it at least twice, even erasing the HDD securely, both at 7pass and 35pass, yet I have had permissions issues regularly and on the odd occasion, I have also had the problem of the HDD not being recognised.
    The iMac is nearly the same, but the screen is working, although the iMac doesn't see the HDD no matter what way I do, again, reset PRAM, SMC, safe boot etc etc. In truth the iMac has been a lot more unreliable, but with the screen working, if I can get any solutions here, then I'll be working to work on that without the need or hassle of working via another.
    I think that the MBP is only just still under warranty, but the iMac definitely is, but I need at least one working for business use, so really only want to let Apple have one at a time to look at/repair etc.
    Ideally, as the HDD is working in the MBP, if I could get a solution to the black screen issue, then I could do without the iMac for whatever time it takes, so if there is anyone out there that can help, I'd be so grateful.
    One last thing, when I bought the iMac 24in., I also bought an iMac 20in., but I never upgraded the 20in. to Snow Leopard and to this day, it has worked flawlessly, without a single issue ever.
    Perhaps, I'm getting paranoid here, but there seems to me to be a link between the ongoing and regularly occurring problems with both Macs ant the upgrade to Snow Leopard. Why also, or is it just pure unadulterated coincidence that both the MBP and the iMac 24in have failed at pretty much the same time??!!!!
    I'm going mental here, so I hope someone out there has a better fix, then me overdosing on Prozac!!
    PS
    I'm not a mac expert, not good with a soldering iron either, but I'm capable of following good instructions.

    Using Snow Leopard forum is probably your best bet.
    I don't care if someone has 20+ yrs, I still like having a good troubleshooting book/manual handy.
    Mac: can't get by without bootable backups, even if you use TimeMachine, clone your system. Save you all this fuss and work.
    Then invest in high quality disk repair and maintenance program.
    Disk Warrior / TechTool Pro 5 / Drive Genius 3 - top 3 probably
    There are always going to be normal items you just ignore with Repair Permissions. Useful to do once in a while but not magic. Same with SMC and the rest. Running disk repair is one of those things that it seems should be done before there is trouble, not after, and a weakness in HFS file system and disk directory.
    Apple Support is a good place to start looking and then hardware category.
    http://www.apple.com/support
    http://www.apple.com/support/imac /macbookpro etc
    Make sure all your software is current, don't install anything you are unsure of or can do without.
    Run Apple Hardware Test off your OEM DVD specific to the Mac.
    Now, have you Googled for this?
    have you looked at reports about 500GB drives used in some Macs that had issues and were offered firmware update for the drive?
    Considered just using another drive connected to iMac?
    You can overheat a hard drive with needlessly running 7 and 35-write pass, besides which the best way to map out bad blocks is not Disk Utility.
    http://www.bing.com/search?q=imacblackscreen
    http://www.bing.com/search?q=AppleiMac+firmwareupdate
    I'd direct your replies to iMac and MacBook Pro as well as to Using OS X Snow Leopard areas.

  • Safari won't open pictures on imgur. To test used another browser and it showed them

    Safari won't open pictures on imgur. To test used another browser and it showed them
    Here is the page was trying to surf  http://imgur.com/gallery/n9Bjm

    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.

  • How can i use another icloud account in my iphone? can i pay one?? where?

    how can i use another icloud account in my iphone? can i pay one?? where?
    My phone has reached the maximum number of free accounts activated where can I buy one to use?

    You can't buy another one.  You have to reuse one of the accounts previously set up on your phone, or create a new one to use on another iOS device (running iOS 5 or higher) or Mac (running OS X 10.7.2 or higher), if you have one.

  • How to use another java program to stop this running prpgram???

    Dear Sir:
    I have following code and I run it success,
    import java.util.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.*;
    public class CertainAndRepeatTime{
      public static void main(String[] args) throws IOException{
        int delay = 1;
        Timer timer = new Timer();
        ActionListener actionListener = new ActionListener() {
            public void actionPerformed(ActionEvent actionEvent) {
              System.out.println("Hello World Timer");
        System.out.println("What do you want (Certain time or Repeat time)?");
        System.out.print("Please enter \'C\' or \'R\' for that: ");
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ans = in.readLine();
        System.out.print("Please enter  ans=" + ans  + " IsTrue=  " + (ans.equals("R") || ans.equals("r")) +"\n");
        if (ans.equals("C") || ans.equals("c")){
          //System.out.println("This line is printed only once start...");
          timer.schedule(new TimerTask(){
            public void run(){
              System.out.println("This line is printed only once.");
          },delay,1);
        else if(ans.equals("r") || ans.equals("R")){
            timer.scheduleAtFixedRate(new TimerTask(){
              public void run(){
                System.out.println("This line is printed repeatedly.");
            },delay, 1000);
          while(true){
               //System.out.println("Charles print This line is printed repeatedly.");          
          } //This will make your main thread hang.
        else{
          System.out.println("Invalid Entry.");
          System.exit(0);
        System.exit(0);
    }But I hope to use another java program to stop it when it is running instead of pressing CRTL + C to stop it.
    How to do it??
    Any example??
    Thanks a lot!!

    Sorry, I think i did not express cearly. It is my fault.
    I re-write my requirements again:
    I have
    Class AAA1.java,
    Class AAA2.java,
    Class AAA3.java,
    Class AAA20.java...
    etc
    they all look like the program I posted first time,, once executed, they will run for ever, and they will be stopped until I press CRTL + C;
    Now I hope to use another java class StopProgram.java to stop them 1 by 1 or at once instead of pressing CRTL + C;
    In this case, how to code this StopProgram.java ??
    Thanks

  • How to use another panels in status line

    Hi Everyone:
    Can anybody tell me how can i use another panels in the
    Console's status line, I'm using the message line but i need to
    show the user's name and Date-Tiem in another section of the
    status line and not in display controls as i'm already doing it.
    Thanks.

    Do you really need a JSF component for that? You can use h:panelGroup and some JS. But a simple div with some JS is also sufficient.

  • I have an icloud email account that my spouse used and he is gone now, can I delete this one and use another or will this delete information?

    I have an icloud email account that was set up by my spouse and I am trying to get rid of everything with him on it due to the nature of the split and want to make sure he can never access the childrens and my photots, music, etc. 
    In this I wanted to change the email address in icloud so that I no longer get his emails from his contacts, friends, etc.  I made an alias but is there anyway to delete this icloud email address and use another or will this delete all of our data?
    New at this icloud and its real cool but afraid to lose all my information. 
    Help!

    Welcome to the Apple Community.
    Deleting the account from the phone will do only that! it won't affect any other information on any other device.

  • Can I buy final pro using a Mac in one State and then install it in other State using another Mac?

    Can I buy final cut pro x , using  my mac and then install it in other State using another Mac?

    Yes, as long as both Macs meet the system requirements for it.
    (112783)

  • Using another web browswer until you get rid of Firefox 4. What a disaster! When do you plan to fix it.!!!

    What a nightmare Firefox 4 have been. I have warned everyone else not to upgrade to this horrible browser. Which is sad, since I used to recommend it to everyone. I don't like IE or Safari, but I like them better than Firefox 4 so I will be using another browser until you fix whatever it was you did to the new update. Very inconvenient to have to change all my bookmarks and info that I have used on Mozilla since it first came out. I hope you are working on it since there is page after page of similar responses. When can we expect this to be fixed?
    Lori
    Why do I have pop-up everywhere now, my home page changed, I have some stupid mp3 toolbar installed(which I will get rid of). What were you guys thinking?

    Hello,
    You'll have to be more specific. Do you know the name of it? If not, go to your '''about:support''' page by entering it in your address bar and pressing enter, or going to:
    * Help (or [[Image: New Fx Menu]] > [[Image: Help-29]]) > Troubleshooting Information
    Then click "Copy Text to Clipboard" and paste that information here.
    If you don't have many extensions and don't mind going to download them and setting them up again, you can '''Reset Firefox'''. The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your bookmarks, history, passwords, cookies, and other essential information.
    '''''Note:''' After resetting Firefox, you will lose any extensions, toolbar customizations, and some preferences.'' See the [[Reset Firefox – easily fix most problems]] article for more information.
    To Reset Firefox:
    #Click the menu button [[Image:New Fx Menu]], click help [[Image:Help-29]] and select ''Troubleshooting Information''. A new tab containing your troubleshooting information should open.
    #*If you're unable to access the Help menu, type '''about:support''' in your address bar to bring up the Troubleshooting Information page.
    #At the top right corner of the page, you should see a button that says "Reset Firefox" that looks like this: [[Image:Button reset]]. Click on it.
    #Firefox will close and reset. After it is done, Firefox will show a window with the information that is imported.
    #Click Finish and Firefox will reopen.
    Did this fix the problem? Please report back to us!
    Thank you.
    EDIT: How did you update your Firefox? If you downloaded a new copy but didn't download from the official Mozilla website:
    * https://www.mozilla.org/en-US/firefox/new/
    * https://www.mozilla.org/en-US/firefox/all/
    Then you will need to uninstall and reinstall Firefox by downloading a new copy from one of those two links.

  • Using another number for an upgrade for a phone online

    Okay, so I'd like to use another phone number in my plan to get an upgrade online. So does anyone know if that is possible and how I could do that. Thanks.

    Thanks, Rignu217 and lewisr13, for your replies.
    Hello JBerg,
    I'm glad to hear you'll be taking advantage of an alternate upgrade on your lines.  As previously mentioned, this can be done directly from My Verizon, where you can compare up to five devices and decide which device is perfect for you. Keep in mind you'll first select the line that is eligible for an upgrade.  Once this is done you will get an option to choose the line where the device will be activated. I'm sure you'll find this information useful. Thanks for being part of Verizon Wireless.

Maybe you are looking for

  • Changing order of sort categories...

    I have 5th gen ipod - not sure if i can do this? Whenever I search via "Genre", the next search category is "Artist". I want to try to change it so that the next search category is "Album" instead. Anyone have any ideas?

  • How do i get my iphone 4s to stop lagging?

    My iphone is lagging and turning off randomly. How do I fix this?

  • JDBC to MS SQL Server....

    Hello everyone! Does anybody tryed to estblished direct connection form Java application running on Linux to MS SQL Server database running on Windows NT? I just started to dealing with this problem, and find out that i need to install JDBC driver ty

  • Daylight Savings Time Change Mar-2007

    Is this years new date for DayLight Savings Time going to affect my WRT54G v3.1 router?  My firmware is 4.30.5. Also, does anyone know why the opening admin page for my router say I have a WRT54GL?

  • Why is my iphone 4s not holding its charge for very long

    why is my iphone 4s not holding its charge for very long i hardly it but still have to charge it every day