Execute a Jar with Wildcard in Path
jar, java, selenium
Solution
Not sure about windows, the best you can do here is to write a minimal batch file that greps the file name and puts it right there
for unix: you could do something like
java -jar *.jar
this works well in unix
Problem
I have an application that launches a jar file. However, the jar has the version number in the name and will change every few months. I'm looking to write this so I don't have to update the application's code every time the jar is changed. I've tried using * for a wildcard, but I get: ``` Error: Unable to access jarfile C:\Selenium\vendor\selenium-server-standalone-\*.jar ``` The command I'm running is: ``` java -jar C:\\Selenium\\vendor\\selenium-server-standalone-*.jar ``` When I put in the version number, the jar launches successfully. Is there anyway to use a wildcard here?