[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?)
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.
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
Re: CLASSPATH & .jar files
Command prompt in windows doesn't use forward slashes you'll have to use the backslash
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!!
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)
Re: [RESOLVED] CLASSPATH & .jar files
just add the folder not the jar files. I don't know if your way works though