Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fits.bat file only works if launched from FITS installation directory #10

Closed
bitsgalore opened this issue Jan 29, 2014 · 2 comments
Closed

Comments

@bitsgalore
Copy link
Contributor

If I run the fits.bat file from any directory that is not the FITS installation directory (which I think is the most common case, at least it is for me!), this results in the following error messages:

The system cannot find the path specified.
Error: Could not find or load main class edu.harvard.hul.ois.fits.Fits

Part of the problem seems to be this line:

set PRGDIR=%~p0

Which strips away the drive letter (I can see this from the value of environment variable PRGDIR, which in my case reads:

PRGDIR=\fits\

I think it should really be:

PRGDIR=c:\fits\

This can be fixed by using %~dp0 instead of %~p0:

set PRGDIR=%~dp0

However even then I keep getting the error, so there's more to this (but I don't have time for an in-depth investigation now). The following line looks a bit wrong to me as well:

cd %FITS_HOME%

(Why would you want to do that?)

This might apply to the shell script as well (but I didn't test it).

Side note: I already reported this bug to Harvard late summer 2011 (and they replied they were already aware of this issue by then). So I'm a bit surprised to see that almost 3 years onwards this bug is still there (or maybe nobody's using the batch file?).

@spmcewen
Copy link
Contributor

Hi Yohan. I think this simply fell down the priorities list. I also don't have easy access to a Windows machine, nor am I all that familiar with Windows .bat files so there has definitely been less testing there.

@bitsgalore
Copy link
Contributor Author

Update: I think I already found a solution for this. Stay tuned ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants