Classpath craziness!!!

This is just too wierd!
My classes are in c:\javaclasses
My java source files are in c:\java\FoodCoster
I'm not using packages.
From the command prompt, if I navigate to c:\java\FoodCoster and
execute java Driver2 -classpath c:\javaclasses
I get 3 class not found exceptions.
Within my IDE ( JCreator ), the program runs with no problems.
Settings in the IDE indicate c\javaclasses as being prepended to the
CLASSPATH at run-time.
What is up with this?
I even downloaded JPadPro and the same scenario: fine in the IDE,
class not found exceptions from the command line.
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to [email protected]

First off, many thanks to Chuck Bing...I hope you slept well...;)
HOOORAYYY!!!! Finally got it running!!....and learned a lot about
class paths in the process...;)
OK...When I was getting the 3 "class not found exception" popups,
those were notices/JOptionPanes I had defined in the catch blocks for theSQLexception.
I got 3 because there are 3 SQL queries that are executed when the program loads. But I had worded them in such a way that they "sounded" like they were system generated!
Once I had determined that it was these "generic" error
notices/popups I had coded, what were confusing me I modified each
notice to tell me exactly where it was being generated, and in that
way i was able to determine that the JVM was not finding the mysql
jdbc driver, when launching from the command line. (Why it worked
within the IDE I'd love to know ).
So going back to the driver instructions I unpacked the files
placed them in my application directories where specified and removed
the classpath entry in the environment variables which pointed to the
driver binary .jar file.
( This also makes it easier to transport the application as I won't
need to mess with the users classpath )
I can't thank all of you enough, for your time, ideas, and patience.

Similar Messages

  • Classpath not found...

    Hello,
    this is driving me crazy, but it keeps saying classnotfound..
    So
    i try todo: Class.forName("./jars/file.jar/package/class");
    this is how the folder looks like where it is in:
    Folder contains:
    - the src folder, this is where my files are located and the class which calls the Class.forName()
    - the jars folder containing the file.jar
    Thanks in advance!

    jojo123 wrote:
    i try todo: Class.forName("./file.jar/package/class");The parameter for that method is simply the class name. Not the path to the class or anything like that, the method will automatically look throught the classpath to find the class. So you should have this:
    Class.forName("package.class");I believe you'll find the API documentation says the same thing; that's always a resource you can go to.

  • Setting my classpath in XP (pro)

    how do I set my classpath in XP Pro for my java software??
    i have got j2sdk1.4.1_01 and i rekon that the path should lead to the bin directory??
    This is obviosly very basic stuff, but I just cant get it right.
    I can compile (javac filename.java) without any problems, nut when i run (java filename), its saying that it can't fine java.dll and it couldnt find the Java 2 Runtime Environment!!!
    Please help, this is driving me crazy.
    Jim

    1. Right click My Computer on the desktop, select Properties
    2. Click "Advanced" tab
    3. Click "Environment Variables" button
    4. Select "Path" in "System variables" and click "Edit" button
    5. Enter "C:\j2sdk1.4.1_01\bin;" to the beginning of Path
    6. Select "OK" etc....it's done
    Depending on what applications you have on your system, you may have some classpath conflicts, but this should fix it for you.

  • Setting jdbc classpath in xp, completely stuck

    I must be going crazy cause i could swear i posted my msg but it never showed up later on, on the forum so here i go again
    Plateform: XP
    java file: ConTest.java
    I am trying to add a classpath to a jdbc drvier (lets calls it jdbcdriver.jar in d:\temp). I set it in environment variable. I create a classpath variable and set the value to d:\temp\jdbcdriver.jar
    java is already set in Path, so that part work. Now when i go to run my code, i get an error Exception in thread "main" java.lang.NoClassDefFoundError: ConTest
    now if i remove the classpath, i offcourse get "no suitable driver found" exception
    I've tested and made sure that my code works. It works fine and gets a db connection when i run in eclipse, since you can tell eclipse where the jdbc driver and eclipse creates its own classpath and stuff. so the code is fine, just a problem with setting the path
    I am completely stuck on this and i've spent past 3-4 hours on just trying to fix this stupid problem rather then working on my project.
    I'll really really appreciate if any of you kind :) people can help me on this. I am totally stuck on this and can't move on until i get this working
    thank you very much

    When you set your classpath you need to set ALL the classpath including in your case your working directory where your program is. You include the directory you launch your progam from with a .
    so something like...
    java -cp .;d:\temp\jdbcdriver ConTestshould work for you...
    Hope that helps you out.
    Yonge and Eglinton

  • ***lapi   getLocation Exception **please helpe***I am getting crazy*****

    Hi frnd
    Recently I am working on a location based project on mobile.I have search the net and found many source code for get BTS CELL ID and coordinates and all the source code have the same code.
    but when I install on mobile I get *{color:#ff0000}location Exception{color}*{color:#ff0000}...
    {color}I have search the net and every where and yet not found the solution, even i am using Nokia N71 which supports location based api.
    guys Really i am getting crazy, there should be a solution .... please help me
    there is a program in simbian "celltrack", It easily shows the BTS information,
    if any body has Idea please help me... thankssssssssss
    ...piece of code ....
    LocationProvider lp=*null*;
    Location location=*null*;
    try
    Criteria cr = new Criteria();
    //cr.setHorizontalAccuracy(1000);
    //cr.setVerticalAccuracy(1000);
    //cr.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
    lp = LocationProvider.getInstance(cr);
    if(lp.getState()==1)
    message="provider! is valid" + "\n";
    //timeout
    {color:#ff0000}location = lp.getLocation(60); // Exception happens here
    ....{color}
    catch(LocationException e)
    btsInfo +="1:"+e.toString()+ "\n";

    Konapalli.Gopi wrote:
    i am using websphere application server to deploy the web application.
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
         class javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
    nested exception is:
         java.net.SocketException: Cannot find the specified class java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory
    I would guess
    com.ibm.websphere.ssl.protocol.SSLSocketFactoryis not on your classpath.

  • Why did eclipse add a CLASSPATH variable to my system?

    After recently installing eclipse I discovered that while I can still compile normally I was getting NoClassDefFoundError running java from my command prompt.
    After some puzzlement and wondering if I had gone crazy I noticed the new environment variable CLASSPATH.
    Two questions.
    1) Why?
    2) Can I get rid of it safely or will that give eclipse upset?

    I recently installed two things. Eclipse andiTunes
    (but only because I
    wanted QuickTime). So I guess it was iTunes. Howvery bizarre.
    Just out of curiosity: what was the value of that
    CLASSPATH variable?
    kind regards,
    JosUmm I already deleted it but it was pointing to
    something javaish. I think something in the lib/extActually I still had a command window open and env said this
    CLASSPATH=C:\Program Files\Java\j2re1.4.2_03\lib\ext\QTJava.zip

  • Yesterday, as today's deadline for filing tax returns approached, I was paralyzed by the inability to create new IRS PDF forms and to retrieve archived ones from a year ago. My computer went crazy. 24 hours later, I am still paralyzed. Can you help?

    My computer went crazy yesterday on two occasions involving PDF documents. One dealt with attachments to an email from a bona fide corporation. The other dealt with IRS PDF forms & schedules needed for today's submission.
    As both dealt with PDF and had nothing else in common, I suspected my PC had a virus. When I asked a local store technician, he agreed. I turned to Norton, which protects my PC from viruses, and after a few hours of really thorough searching, the computer was found to have no viruses.
    Before describing what I call "crazy" computer behavior, you need to know that I have long had IE8 as my default browser but a few weeks ago switched to Mozilla Firefox because IE8 had beome incompatible with some websites from which I get information.
    When I received the email from AT&T email service and clicked the first of four icons representing attachments, there was figuratively an explosion on my monitor: a series of new tabs, each called New Tab, burst onto the monitor--but no text or picture. The new tabs appeared faster than I coul kill them. I finally decided just to shut down the computer, hoping they would not reappear when I restarted. I was wrong. After 2 repeats, I decided to forget about the attachments and asked the sender to send them to me by regular mail.
    That was no solution for my IRS PDFs. I wanted to complete filling in the various forms and schedules that I had begun months ago so that I could mail them today to the IRS (without having to copy them all in ink). When I tried to open the first one, BOOM. The same thing happened: the blizzard of New Tabs atop blank pages; my IRS form or schedule did not show up. Did the same shutdown/restart routine with the same results.
    When I looked at the list of current forms that had to be completed, I noticed something very strange: the icons that began the listing of the documents' names were replaced one by one by Mozilla icons. When I moused over them, they said Firefox HTML. Why?
    Starting the day today, I had the same experience. What's more, when I started to retrieve 2012 IRS PDFs from a year ago, the same New Tab tabs appeared and had to be killed, and Mozilla icons replaced whatever icon was there before.
    Assuming that the problem arose with Adobe Reader's reading of the PDFs, I contacted Adobe but got no helpful phone number because PDFs are a free service and was directed to use this Forum to get help.
    What do I have to do to (a) read and use PDFs in the normal way and (b) remove the Mozilla icon from those that have appeared on icon documents. If Mozilla is the source of the problem, shall I go back to IE8? (In my 80s, I want eventually to replace my old computer but for the time being I must continue using it. It will not take an IE9. Anther possible default browser would be Google Chrome, but I have unfavorable impressions of it because of its intrusiveness, loading my PC with stuff I do not need.
    Can you help?

    The problem is absolutely not Reader. The problem is that FireFox has stepped in front of Reader and handles all the PDF stuff - wrongly in your case. FireFox is DESIGNED to take over PDF files. But it is not capable of doing IRS forms!
    To start with go back to IE for these forms. When you save them to disk DO NOT DOUBLE CLICK ON THEM until this is fixed. Just open the in the normal way - start Adobe Reader and use Open from the File menu.

  • Classpath error while building the web dynpro project

    Hi
    I have created an application in which on clicking the button on one view , next view opens and data is displayed in the tables. This data i am giving as static, and for that i have created a java file. this java file is located in the subfolder i have created in the package path i have given. While building the application, i get these two errors :
    1) The project was not built due to classpath errors (incomplete or involved in cycle).
    2) Missing required source folder 'BPOutageTable/BPOT'
    BPOutageTable is the application name, and BPOT is the subfolder in which java file is present.
    This application is similar to "The Master/Detail Viewer Application" example in the tutorials.
    Can anybody please help in this?
    Thanks & regards,
    Anupreet

    Hi,
       You have give your classpath in your "lib" folder of the Dynpro application.
       check your lib folder shows exact class path or not.
    if you wish to add any jar files import it to your lib folder so you will not have compilation problem.
    Hope it helps.If it is then close this thread.
    Regards,
    Guru

  • Crazy to install CS2 on Quad Core 64 bit Windows 7 notebook?

    I've been a video producer/director/editor since 1970 and have witnessed most all the progress and insanity of the "corporate wars" to dominate video production and later, video editing.  I no longer see any reason to differentiate between still photography, video production, editing, web authoring, print production, graphics, CGI, CAD etc...ad nauseum. My dream has long been to have one very powerful laptop that could do most everything that a creative person desired on location anywhere in the world.
    My new notebook is an ASUS Quad Core G71GX with 6 GB RAM - an Nvidia Geoforce GTX 260M - and 2 - 500 GB, 7200 rpm hard drives - Windows 7 Home Premium 64 bit OS. These days I shoot most video using a Canon SX1 IS at 1080 30p and the files are playing back beautifully on the 1920x1400 display at full frame rate. So for me that covers the basics. I will be upgrading from Windows 7 Home Premium to Ultimate shortly. Does anyone have issues/questions about the platform?
    As to the software . . . I have been using Adobe stuff for 20 years or so.but did not get into their video editing products until Premiere 6.5. Than I jumped in with both feet and became a beta tester for the CS2 video collection. I still have my complimentary Premiere Pro 2.0 and it still works on my older XP Pro notebooks.
    But now we are here in 2010 and all the major PC platforms are running 64 bit Operating Systems and I just figure that I should hold out for a true 64 bit Master Collection [which many people call CS5]. In the meantime I decided to install my CS2 Creative Suite and Premiere Pro 2.0 just so I could have the benefit of these programs while I am waiting for the 64 bit to release.
    I purchased my CS2 back in 2005 as a download and last night made the attempt to install it onto the ASUS. As expected the serial number did not work so I called Adobe Installation support and got started after they prompted me for the "challenge" code. When I entered it the installation began nicely UNTIL the first folder [CS_2.0_UE_Ret_D1] finished loading and UP POPPED a window saying "Please insert CD #2" with only an OK button. Well, I didn't have any CDs because the suite was delivered as a download way back when and there seems to be no way to get to Disk 2 folder.
    I finally decided to Quit the install when up pops a window that says [paraphrasing]. Your Photoshop program on Disc 1 has been verified and so try again to install. I said OK and up pops a window with all the various programs and the option to select Install. I selected each one [except GoLive because I now have Dreamweaver CS4] and proceeded. I sort of kluged my way through the transition from D1 to D2 to D3 to D4 folders and by all indications had a successfully installed, registered and activated CS2 suite on the ASUS notebook. Restarted the machine.
    Opened Photoshop and up comes an error message "Your Adobe Photoshop user name, organization or serial number is missing or invalid. The application cannot continue and must now exit" "OK", which I pressed and Photoshop closed. Checked the other CS2 programs and none of them would open.
    I would appreciate any pointers on how to get CS2 Creative Suite to install properly since Adobe Tech Support says such installation help is out of date and recommended this forum.
    BTW: I run Videography Lab and am the "seminal author of videography". OCT 1972 American Cinematographer. I have a different take on the meaning of videography than most folks. After 38 years of research and contemplation I believe "Videography means 'I know to write' or conversely 'writing my knowing'" The platform that I've been talking about is the technology tool that enables such communication in "the Age of Videography" [Miller Freeman Publishing - 1996].
    Call me crazy and than help me get this sorted out
    Bob Kiger - [url removed by host]
    PS: Does anyone beside me expect a sudden and dramatic shootout between Final Cut Studio & Adobe Creative Suite soon?

    Hi Michael--
    Upon continued research we found your statement "CS 2 isn't compatible with Windows 7 32-bit no less 64-bit." not quite true. We grant you that, in it's raw state, Windows 7 will not install, activate, register etc. CS2 programs. That's been the Adobe position for quite a while.
    Now that we have Windows 7 in hand and can play we found that if you have Windows 7 Professional or Ultimate edition you can acquire for $89.95 and download/install in an hour or so "Windows Virtual PC" and "Windows XP Mode".[Note: This feature is not available on Home editions].
    We purchased the platform and once it is installed we had a "Windows XP platform" on our Windows 7 machine. From that point forward the installation of CS2 and many other of our old favorite programs was a snap. We've opened and worked with Photoshop, Illustrator and InDesign etc. with no problems.
    And, by the way, Premiere Pro 2.0 intalled easily on Windows 7. We're testing it now with some sub-1080p projects.
    As to the long nagging problem of Adobe Installer not recognizing the downloaded CS2 CAB files during installation, we worked around by just saying OK when the installer asked for the next disc and immediately clicked on the desired disc in a seperate exlorer window which contained all the download files.
    So that's the workaround for us. Now we wait to see who wins the race to enchant users with 64 bit editing and imaging suites.
    Thanks for all your help.
    Bob Kiger - Videography Lab

  • Why WLS do not refresh the class in CLASSPATH?

    as title, and I have set development mode.

    Hi,
    due to classloader hierarchies, classes on the system classpath can not
    be refreshed (HotDeployment). If you want to use HotDeployment, you will
    have to load your application (and classes) through a WAR or EAR file.
    Hope that helps,
    Nils
    airwing wrote:
    >
    as title, and I have set development mode.--
    ============================
    [email protected]

  • Can not find xml file in classpath

    Hi,
    Can someone tell me how I can please or find a xml file in de webdynpro classpath: I have to place a xml and jar files in the classpath. The jar files are found in the application, but I get the following error: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Unable to read the License file, please verify that you have SyncExLicense.xml file and it exists in the classpath or under com/yash/license folder.
    How can I check if this file is available in the classpath.
    Richard

    hi,
    have you check that all jar files are present or not.
    because when u import par file in to nwds it wont include jar files in that manully you have to import them.
    jayesh talreja

  • Jar Files in a Jar File - Classpath Error

    Hi,
    I created a jar file that will have all the class files of the application. In the manifest file class path, I have the jar files the application is dependent on. The dependent jar files were kept outside of the application jar file. I was able to execute the main file in the application jar file. Then I created another jar file that holds all the dependent jar files the application is dependent on along with the application jar file into one super jar file. configured the main class attribute of the super jar file to that in the application jar file. When I try to execute it, I'm getting an error saying Class Not Found. Can someone guide me in setting the classpath for this super jar file in its manifest file.
    Presently my manifest file classpath variable in the super jar file is set as App.jar Depend1.jar Depend2.jar
    Thanks,
    E H

    Java's standard class loaders do not support jar files inside of other jar files, and will give the error you see.
    You can write your own customized class loader, use a 3rd-party solution (onejar at sourceforge is one), or remove the interior jars.

  • EFI update went well.  Am I crazy or do things seem snappier

    I just updated my iMac with the EFI update. Very smooth. Subjectively, the machie seems much more responsive and quick. Is this just me or have others noticed what appears to be this increase in responsiveness. For example, applications just seem to load much more quickly.
    Steve

    Hi Steve,
    You're not crazy AFAIK . I did the EFI update yesterday and, after a slight glitch which is described in this thread,
    http://discussions.apple.com/thread.jspa?threadID=1153464&tstart=15
    I was surprized by a 20 second bootup this morning. 20 seconds! It used to take about 25 to 30 seconds prior to the update. Hope this continues. And yes, everything does seem snappier as you report.
    Rick

  • Importing a photo folder just with references creates a photo library 2/3 of its size. crazy!

    after ignoring iphoto for many reasons over the last years i thought i give it a try with the new photo app.
    i imported a 70gb photo folder - turning OFF to copy it into the library first, just refering to them - and now it ate up all my space by creating a 41gb (!!!) photo library just with references alone. so now i have a 70gb folder plus an index file that is 41gb big. i am beyond baffled.
    am i doing something wrong here or are they crazy?
    they cannot possibly think this is a smart way to store photos with the small internal hard drives they give us nowadays can they?

    it gets even worse. "photos" has created empty subfolders of almost every photo in my original photo folder.
    thank you apple. good job.

  • Difference between path and classpath

    Difference between path and classpath?

    PATH - set of paths there executables will be found.
    CLASSPATH - set of paths and archives there class files will be found.

Maybe you are looking for

  • PO release workflow

    HI friends. PO workflow already configured and its type is define is SPRO as 9 (EXIT). I need to fill actor tab but here we think we can do searching users by profile tables...like adrc...etc. Problem is about profile/object fields like FRGGR and FRG

  • Photoshop (psd) files in FCP5

    Hello. Using a photoshop (.psd) layer file inside FCP5: I've done this before with wonderful delight, but this time here's the issue: the image looks excellent when I place it in the timeline. But then AFTER I render it it looks terrible. It becomes

  • Mounting USB Drive in Single user mode

    My Intel Imac fails to boot up. fsck -y fails too ... can't think of any other way to get my data out ... I am left with the only option to copy my data into my usb drive in the terminal mode . But I am unable to mount my USB drive. I also need to kn

  • Dreamweaver CS5 slow to open CFM files

    Carey, All, Our whole team has problems when opening our (.cfm) files. Like the original poster (peterallcdn) we think it's because of related files...? In our case, we think it's our includes (fyi - we're using ColdFusion). When we remove all the in

  • PAPI: Get processId of subflow process from Activity list of parent process

    Using PAPI or PAPI-WS how can I get the processId of the related process of a subflow activity? Specifically, I want to get the processId of all the subflow processes of a parent process provided I only have the parent process ID. For example, lets s