Results 1 to 7 of 7

Thread: [RESOLVED] CLASSPATH & .jar files

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Resolved [RESOLVED] CLASSPATH & .jar files

    Isn't there a more easy way to deal with all the .jar file paths you have to add to classpath?

    Beijing fairly new to Java, I find it kind of "weird" having to add so many .jar files to the classpath each time you add something (like WebDriver just now.)

    Another question (probably a stupid one):
    If you are told to : Add $WEBDRIVER_HOME/common/build/webdriver-common.jar to the CLASSPATH
    In this "instruction" do they mean replace $WEBDRIVER_HOME with the actual path to the webdriver home folder, or do you have to configure a variable $WEBDRIVER_HOME somewhere (maybe add it to environment variables?)
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: CLASSPATH & .jar files

    Yes there is an easy way. Copy the jar libs into a single folder and add that to the classpath instead. And about your second question... Both ways are right but it usually means to create a variable.
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: CLASSPATH & .jar files

    Thanks...will look into keeping all .jar's in one folder and do a wildcard to include them all.

    Right now I just messed things up, after deciding to reinstall my laptop. Worked fine before, but now cannot use the command prompt to navigate around as I should (like cd D:/Code/webdriver ... worked fine before reinstall and now not) uurgh
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: CLASSPATH & .jar files

    Command prompt in windows doesn't use forward slashes you'll have to use the backslash
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  5. #5

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: [RESOLVED] CLASSPATH & .jar files

    naah..i was stupid. only had to change to my D driver (d and then could carry on...
    Did not use the command prompt this much in many years.. learning learning!!
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  6. #6

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: [RESOLVED] CLASSPATH & .jar files

    Like this?
    Code:
    D:\Code\webdriver\build\webdriver-common.jar;D:\Code\webdriver\build\webdriver-htmlunit.jar;D:\Code\webdriver\htmlunit\lib\runtime\*.jar;
    The runtime folder only have .jar's (about 15) which all must be added to the classpath (see here)
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  7. #7
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [RESOLVED] CLASSPATH & .jar files

    just add the folder not the jar files. I don't know if your way works though
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width