The problem is in the title – from my Desktop directory my jar file runs fine. From AppData/Roaming directory, it will not run at all and gives the error “cannot find main class”. I’ve verified that the manifest is correct.
Edit: My account has ‘full control’ permissions on both the directory the file is in and the file itself.
Finally figured it out; one of the project dependencies is a .dll file that was not there. Its absence probably led to an exception being thrown before the main class was called, which in turn produced the “cannot find main class” error. Despite the fact that the error message was misleading, including the project dependency fixed the problem..