-classpath is the bane of my existence

I think I was born without the portion of the brain that comprehends the -classpath argument. Because I can do everything else just fine, but I don't think I've ever gotten that to work. Usually I resort to sticking jarfiles in the jre/lib/ext directory, but I know I shouldn't have to do that.
I've got 2 jarfiles:
someapp.jar
utilities.jar
someapp is a packaged application. utilities is a packaged set of utilitites.
If I put utilities.jar in jre/lib/ext, someapp.jar works fine.
Right now I've got utilities.jar in the same directory as someapp.jar and another copy in a com\foo\bar subdirectory that corresponds to the utilities package.
None of the following works:
java -classpath . -jar someapp.jar
java -classpath utilities.jar -jar someapp.jar
java -classpath utilities -jar someapp.jar
java -classpath .\utilities -jar someapp.jar
java -classpath .\utilities.jar -jar someapp.jar
java -classpath com\foo\bar -jar someapp.jar
java -classpath com\foo\bar\ -jar someapp.jar
java -classpath com\foo\bar\utilities -jar someapp.jar
java -classpath com\foo\bar\utilities.jar -jar someapp.jar
java -classpath .\com\foo\bar -jar someapp.jar
java -classpath .\com\foo\bar\ -jar someapp.jar
java -classpath .\com\foo\bar\utilities -jar someapp.jar
java -classpath .\com\foo\bar\utilities.jar -jar someapp.jar
So I have systematically eliminated any reasonable command-line I can concieve of. What's the right one, and am I a complete idiot for not knowing it, or is the classpath system inherently confusing even to veteran java developers?

What's the right one, and am I a complete idiot for not knowing it, or is
the classpath system inherently confusing even to
veteran java developers?Options -classpath and -jar don't work in conjunction.
When using -jar you need to set the Class-Path property of the Jar's manifest file.

Similar Messages

  • Canon ImageRunner C3200, the bane of my existence

    So in a small office of about 10 macs, we have an imagerunner C3200 from canon. There are some older macs like emacs, and some newer macs like mac minis. Most are on 10.4, but some are on 10.3 and even 10.2. These guys don't like to buy new things until old things break. So anyway.
    So here's the download page:
    http://www.usa.canon.com/html/download/cir3200.html
    Its a complete mess of unclear info. So I download all of the OS X stuff. Heres the thing. Sometimes you install a driver, and you'll get a full printer dialog when you add the printer. It lets you store on the printer instead of printing directly (so you can then print however many copies you want from the printer). It lets you set finishing things like binding or staples etc. But sometimes you don't get these things.
    Also, in the 'add a printer' browser, the printer shows up twice, C3200_S and C3200_D.
    On newer computers I'm trying to set up (on tiger) D doesn't seem to work at all. S works but we can't store things on the printer.
    Canon doesn't offer any tech support for commercial printers, you have to go to an authorized service provider. All of the service providers turn dumb the minute you mention Mac OS X.
    I need to figure out what the trick is here. I need to get all the tiger machines printing to this printer, with full abilities to do all of the finishing options, and the option to store things to the printer instead of printing directly.
    This is so frustrating, no one seems to know anything about this. I'm this companies Mac guy, but theres only so much I can do before I need to talk to a Canon person and have them explain to me what the trick is here. But I can't do that, all Canon would do is give me a list of other companies to call. These other companies only service through a service contract when you buy a printer. They did get a service contract from the company they bought the Canon through, but they don't know anything about Macs. And all we have in this office is Macs.
    There is one 10.4 mac that has the full print dialog, so I know it's possible, but I can't recreate it at all on any other 10.4 Macs. This is making my head spin.

    Reading through your original posting I think I have some answers for you.
    The two printer names you see in the printer browser are the queues, S is for spool and D is for direct. If you want to send print jobs to the machines mailbox, so that jobs are held in memory and can be re-printed when required, then you would need to use the spool queue.
    In order to print to the mailbox, you need to use Canon PS driver. This is the driver that gives you a graphical view of the copier and all the machine finishing features. However, the PS driver does not support AppleTalk. If you want to print via AppleTalk, you need to use the Canon PPD installer, but this will not give you all the features you have seen on the 10.4 Mac.
    So to get the features you want you need to get the Canon PS driver, version 1.80 or 1.81. Don't download the Canon PS v2.0x driver. This does not support the iR C3200.
    With the PS driver v1.8x installed, you add the printer via the More Printers > Canon IP (PS). This window lets you enter the ip address of the iR C3200 and a queue name of LP, SPOOL or DIRECT (in your case you want either LP or SPOOL). When you click Add, the driver software queries the printer, selects the correct ppd and configures the paper tray and finisher options.
    To print to the mailbox, you change the Copies & Pages menu to Special Features. Then in the Job Processing menu, you select Store. Then when you select Print, a window appears prompting you to select the mailbox number.
    HTH
    PaHu

  • IE the bane of my existence...

    Newbie here having issues with IE. I've got the initial
    layout of this site displaying perfectly fine in Fire Fox and
    Safari, but not IE5 or IE6 (haven't checked IE7).
    Dreamweaver tells me I'm experiencing the "three pixel text
    jog." However, i've tried various hacks that I've found online (one
    of which is still in the code for the 'about us' page), and they
    don't seem to fix the problem.
    I even laid out the left half of the page in a Dreamweaver
    template that has various If IE hacks already in it, and had the
    same problem.
    here is the link:
    http://www.thewerm.com/villagebeerbeta.html
    I'm also realizing that besides the 3 pixel issue, my main
    problem may be with text sizing (currently set in pixels). No
    matter what i do the my text doesn't fit the page in IE as it does
    in "modern" browsers. A bit less copy fits per line in IE, causing
    everything to wrap further down the page -- thus knocking the
    navigation div and following paragraph out of place.
    I realize this is probably a rather elementary problem, but
    this newbie is at a loss to solve it.
    Any help would be greatly appreciated.

    Thanks Paevo, I'll be running by the local Barnes & Noble
    at lunch today.
    I found the Total Training Dreamweaver DVD a great resource
    to learn to use Dreamweaver to create CSS box model layouts,
    however, there was no great detail on browser compatibility. Other
    Dreamweaver books I've used so far seem inadequate on this subject
    as well.

  • (Help) system classpath  -Vs-  the place where weblogic looks for classes

    The following is my app's hierarchy.
    myapp
    |
    |__myjsp.jsp
    |
    |__WEB-INF
    |
    |__classes
    |_ MyClass.class
    I am not able to use MyClass within myjsp.jsp
    i.e. a scriplet like that shown below gives an error stating that MyClass isnt found
    <% MyClass obj; %>
    I've tried setting the system classpath, but to no avail.
    Is there a difference between the system classpath and the place where weblogic looks for classes?
    (I am running my app by creating a myapp.war file and placing it in autodeploy folder)

    Try moving your class to a named package and use the appropriate import statement in your JSP. Loading it from WEB-INF/classes/packagename should be fine so you might want to remove the other classpath mods you made to eliminate that uncertainty.
    Here's a snippet from http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rweb_jsp_migration.html:
    "As of JSP 2.0, referring to any classes from the unnamed or default package is not allowed. This can result in a translation error on some containers, specifically those that run in a JDK 1.4 or greater environment which will also break compatibility with some older JSP applications. However, as of JDK 1.4, importing classes from the unnamed package is not valid. See Java 2 Platform, Standard Edition Version 1.4.2 Compatibility with Previous Releases for details. Therefore, for forwards compatibility, applications must not rely on the unnamed package. This restriction also applies for all other cases where classes are referenced, such as when specifying the class name for a tag in a Tag Library Descriptor (TLD) file."
    HTH,
    Mike
    Weblogic/J2EE Security Blog: http://monduke.com

  • How to setup classpath for the beans?

    My packaged beans reference classes in other jars. Right now I have to set up the classpath in the Windows user variables. I think that is not a good way.
    Is there a better way to do it? Thanks.
    Anthony

    Matthew,
    Thanks for the advice. Unfortunately the way you sugguested will not work for me because the beans bridge stuff is just a small piece of the system that I will deploy. And I can't ask all the needed jars put into the Java plug-in's directory.
    I know there is another way to setup the classpath just for the plug-in's. It is by using the Java Plug-in's console. But this looks work only in a development environment. I don't know how I can automate it as part of a product installation process.
    I will deploy an enterpise applicaiton. So far I haven't found a better way to set the classpath than setting the environment variables (which is kind of rude).
    Anthony

  • Setting the classpath of the JVM for OC4J

    Is there any way to add a path to the classpath when the embedded OC4J is run? Although the OC4J is finding my classes, the Oracle JDBC driver isn't. Here's a bit more info:
    I've been having a bit of a problem getting database java objects ("CREATE TYPE...EXTERNAL NAME...LANGUAGE JAVA USING SQLData") instantiated on the client.
    - I have an object table of type t_my_type with Java class "mypackage.MyType".
    Code sample:
    ResultSet rs = myStatement.executeQuery(
    "SELECT VALUE(p) FROM my_type_table p" );
    rs.next();
    rs.getObject( 1 );
    Exception in thread "main" java.sql.SQLException:
    Inconsistent java and sql object types:
    ClassNotFoundException: mypackage.MyType
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
    at
    oracle.sql.JAVA_STRUCT.toJdbc(JAVA_STRUCT.java:108)
    ... ad nauseum
    And yet when I add "-classpath /path/to/mypackage" it works fine. HOWEVER, I don't know how to add it to the OC4J startup classpath (marked "HERE" below? -- not application.xml, the one that you see in the "Log" window in jDeveloper):
    java \
    -server \
    -Xdebug \
    -classpath /path/to/oc4j/oc4j.jar:<HERE> \
    Incidentally, I'm also interested in having the Database send me the bytecode for the class ITSELF instead of having to also have a copy of the .class/.jar on the client side as well.
    Any help would be appreciated. Thanks.

    The simplest way to do this is to copy classes12.zip to the WEB-INF/lib directory. The JSP should then find this automatically.
    As a side note, that is an ancient JDBC driver - you might want to upgrade to something from this millennium.

  • Setting classpath from the command prompt

    each time i try to set the classpath from the command prompt it is not always well done . can someone give a good format
    i.e set classpath = ;c:\document and settings\ luke

    each time i try to set the classpath from the command
    prompt it is not always well done . can someone give
    a good format
    i.e set classpath = ;c:\document and settings\ lukeThe best way is not doing it at all.
    Anyway, try:
    set classpath = ".;c:\document and settings\luke"

  • Define the classpath in the debugger!

    I know how to set the classpath for the internal/external compiler and it works fine.
    but when I tried to debug my application, it could not find the classes for the Database driver.
    I tried to do the same thing I did when I defined the classpath for the external compilation, and point the class path to driver jar. and it works fine.
    but I could not find a place where I include the drivers in the class path for the default debugger.
    Can any one help!?
    if not. thanks in advance anyway :)

    " Within the IDE, your classpath is defined by the filesystems mounted in the Filesystems tab of the Explorer. If you need additional libraries mounted, you can mount them and set various properties to determine whether they're visible in explorer, whether they're used for execution, compilation or debugging (for example, one does not want to recompile all of Swing, but it's quite useful to mount the sources and be able to trace into them when debugging).
    To set these capabilities, right click on the root of a mounted filesystem and choose Customize from the popup menu. You will see a property sheet where you can determine how the classes will be used. "
    http://forte.sun.com/cgi-bin/WebX?[email protected]@.ee7401e
    -M

  • Classpath in the FORTE

    Hello,
    knows where I configures classpath of the FORTE?
    I am trying to compile a program in the FORTE and receive the following message:
    java.lang.ClassNotFoundException: to org.postgresql.Driver
    When I compel using javac this error does not appear.
    I thank any suggestion.
    Darcy

    If you add the JAR file containing the required packages & classes to the project, the Forte compiler should see the classes, IIRC.
    Bhav

  • I can not install adobe creative standards because the install icon has the symbol of the ban. What can I do?

    I can not install adobe creative standards because the install icon has the symbol of the ban. What can I do?

    Its a possibility that the product is not supported on your machine hence the BAN sign on the product icon. You can share the product name and your system configuration so that we can confirm the same.

  • The asterisk(*) was attached to the search string when perform search from the baner.

    I run into a strange behavior with performning a search from the baner (top right). For example, I enter the string called "test" and click search. The asterisk will be attached to the string make it "test*". because of this, it come back with incorrect search result. have you run into this before. Thanks!

    Right click the Back/Forward buttons to get the list of sites you visited.
    There is an add-on you can install which displays that arrow on either button, but it's only cosmetic. See https://addons.mozilla.org/en-US/firefox/addon/backforward-dropmarker/

  • ITunes 7 is the bane of my music video existence

    I started this as part of someone else's thread and decided to be "courteous" and start my own. I'm not an Apple fan & I don't own an iPod - I have the 30GB Creative Zen M:Vision mp3 player. I bought iTunes so I could purchase and watch videos, which aren't transferrable to anything but an iPod...my mistake. I recently upgraded my computer from a Dell Dimension 8200 series to an XPS 410. Since I got my new computer, iTunes has not worked. I try to open it and I get the infamous "iTunes has encountered a problem and needs to close" message, which is extremely infuriating. I have installed it, uninstalled it & reinstalled it more times than I care to remember. b noir asked if I installed a K-Lite Codec Pack & I hace the Basic 2.76 Pack on my machine. It doesn't seem to make an ounce of difference. Please help me!
    Dell XPS 410   Windows XP   Intel Core 2 Duo Processor E6600 (2.4GHz,1066FSB) with 4MB cache, 2GB DDR2 SDRAM at 667MHz

    I sympathize and I just started my travail with iTunes. I think the worst part is that these messages just circulate in the ether with absolutely no one from Apple even making an attempt to help out. This is a very Kafka-easque situation. Sorry I can't be of more help than to sympathize.

  • Can Apple fix the ban on laptops with Virgin Airlines?

    Virgin has banned Apple and Dell laptops on all flights unless the battery is removed...which of course makes it inoperable unless you are a millionaire passenger in their premium uberclass (then they'll give you an adapter to plug into). I guess they are afraid they'll catch on fire. Gimme a break!
    This is huge affront to Apple customers. Apple: you should have someone parked in their offices trying to straighten this out. 5, 6 or more hours of downtime on a flight is ridiculous. Plus my 17" Powerbook ISN'T EVEN part of the battery recall.
    Since most of us have registered our books with Apple we should be able to log in and get a certificate to print out with our name, model number and waiver to present to our lovely friends at Virgin. You should be able to put this together relatively quickly. Help fast. I'm traveling soon!!!

    You can always ask for a refund, or see if they are willing to give you a free upgrade given the extenuating circumstances, or fly someone else. And if they won't give you a refund, tell them of your situation and that you need to use your machine for business. Honestly, the problem here is Sony's manufacture of the batteries wasn't that good for either Apple or Dell. Tell them they might as well ban Sony laptops too and walkmen. And if Virgin Atlantic won't give you a refund, see about arguing the matter with whatever you used to purchase the tickets. Hopefully you used a credit card.
    Remember be firm yet polite when you discuss the matter with Virgin Atlantic or your travel agent.
    Good luck! I know I'll not fly Virgin Atlantic.

  • Setting the CLASSPATH for the derby.jdbc embedded class

    I am new to Java and am trying to connect a simple (hello world simple) terminal app to a javadb embedded database - I am using the classFor to load the jdbc - but when I run my app I get an error saying the class can't be found. I think I just need to add the jdbc to my classpath. I've tried using
    export CLASSPATH=...
    but I still get the same error.

    Thank you SO much for your response! I have tried the following (this is where I found the derby.jar):
    javac -cp /usr/lib/jvm/java-6-sun-1.6.0.07/db/lib/derby.jar test.java
    But I am still getting the same error:
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
    Here is my code - so far it doesn't really do anything, I just want to get it connected, then I'll start adding some simple db code and go from there:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    class HelloDave
        public static void main(String[] args)
            try
                Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
            catch (Exception e)
                e.printStackTrace();
            System.out.println("Hello, Dave");
    }

  • Packaging files outside of the classpath in the Air Install Badge

    Perhaps I am just missing it, but I notice when you bundle a
    Flex app into an Air container, you don't have an option to package
    assets that are outside of the src classpath? I see that the
    packaging process allows you to navigate to files under the /src
    tree but what about files outside of that structure?
    Suppose I want to distribute assets outside of the swf and
    have then distributed along with the application. Is this native
    functionality or will a commercial installer be a necessity?

    There is an option in the project settings to add additional
    source folders to the project. And if none of the built-in Flex
    Builder features do what you need, you can certainly package other
    assets using the underlying ADT tool (which Flex Builder uses). The
    only thing you can't do is install assets outside the application
    directory or run other installation programs -- although you could
    copy files elsewhere on the first run of an application.

Maybe you are looking for

  • Confuse on PR & PO data migration approach new to MM module

    Hi All, I'm pretty confuse with the PO data migration approach when it comes to PO is GR or partial GR or GR&IR. I'm hoping that someone can enlighten me. i understand that we typically don't migrate PO when it is GR & IR, FI team usually will bring

  • Logical System for RFC-Business system?

    Hi, I want use RFC adapter for my scenario like File to RFC. The query is like, is there any importance to use Logical system for my Business System which is using for my RFC Adapter in my communication channel. Regards Gopi

  • Regarding function module CUD0_GET_CONFIGURATION

    Is the function module CUD0_GET_CONFIGURATION obsolete in ECC 5.0 version. Can anyone tell me the replacement for this and also why this fn module is used? Thanks Sai

  • UIX form will not refresh data within session

    I have some UIX forms to view a table, they displays data fine but when the underling table data changes (from another user session or an update trigger from different table) the forms will not show refreshed data, unless I delete my browser session

  • Problems with Adobe digital editions

    I tried to authorize Adobe digital edition in my new Tablet, but I received an error message, so I decided to authorize with another personal email account. Now, the problem is that I can not download those books I had bought previously. How can I re