Trouble compiling over network
Posted: Thu May 01, 2003 8:04 am
It took me awhile to figure this out, but here's the problem I was having:
I could compile a Java program through Textpad, but when I tried to run it, I would get "Bad Command or Filename".
I tried many of the remedies suggested here, mucking with "Classpath" and PATH, adding new commands into the tool menu, looking at (but choosing not to play with) the registry, etc. Everything I did seemed to make matters worse in ways I won't bother to go into. Uninstalled, reinstalled, the same thing.
Finally, I tried running the batch file produced by Textpad...same problem, of course. But I finally caught on...
I have two machines networked together. I was trying to compile and run Java code on machine 1 from machine 2...this gets the unfortunately misleading "Bad Command or Filename" error...because the problem seems to be that the attempt to run DOS itself on the BAT file is the bad command. If I move the BAT file over to machine 2 and run it, I get real output (of course, error statements, since all the paths are wrong, but output that makes sense, at least).
In other words, Textpad compiles the Java file on machine 1 from machine 2, and creates a BAT file to run it, placing that BAT file on machine 1, but then cannot run (or maybe access) the BAT file.
So...is Textpad supposed to be able to run Java it compiles on machine 1 from machine 2? Is it unreasonable for me to expect Textpad to do this? If the output of the Java "compiler" was an executable, I could understand the problem...but assuming that I could figure out how to address a file on another machine from DOS, I would expect to be able to to run Java on machine 2 using a .class file on networked machine 1 from a CLI. It's just reading pcode into an interpreter.
(BTW, the pathname that Textpad generates does not work for DOS either; it produces
'CD "\\mach1\mach1 c\MyDocuments\Robert\java progs" ',
which won't get there, so its not a good guide on how to address files across a network from DOS. Even if I could work around the "Bad Command" error, I'd fail to find the directory).
This is on Win98, if it matters.
Ok, no big deal, I can work around it, moving the file back and forth as I work on different machines...but should I have to?
RobertC
I could compile a Java program through Textpad, but when I tried to run it, I would get "Bad Command or Filename".
I tried many of the remedies suggested here, mucking with "Classpath" and PATH, adding new commands into the tool menu, looking at (but choosing not to play with) the registry, etc. Everything I did seemed to make matters worse in ways I won't bother to go into. Uninstalled, reinstalled, the same thing.
Finally, I tried running the batch file produced by Textpad...same problem, of course. But I finally caught on...
I have two machines networked together. I was trying to compile and run Java code on machine 1 from machine 2...this gets the unfortunately misleading "Bad Command or Filename" error...because the problem seems to be that the attempt to run DOS itself on the BAT file is the bad command. If I move the BAT file over to machine 2 and run it, I get real output (of course, error statements, since all the paths are wrong, but output that makes sense, at least).
In other words, Textpad compiles the Java file on machine 1 from machine 2, and creates a BAT file to run it, placing that BAT file on machine 1, but then cannot run (or maybe access) the BAT file.
So...is Textpad supposed to be able to run Java it compiles on machine 1 from machine 2? Is it unreasonable for me to expect Textpad to do this? If the output of the Java "compiler" was an executable, I could understand the problem...but assuming that I could figure out how to address a file on another machine from DOS, I would expect to be able to to run Java on machine 2 using a .class file on networked machine 1 from a CLI. It's just reading pcode into an interpreter.
(BTW, the pathname that Textpad generates does not work for DOS either; it produces
'CD "\\mach1\mach1 c\MyDocuments\Robert\java progs" ',
which won't get there, so its not a good guide on how to address files across a network from DOS. Even if I could work around the "Bad Command" error, I'd fail to find the directory).
This is on Win98, if it matters.
Ok, no big deal, I can work around it, moving the file back and forth as I work on different machines...but should I have to?
RobertC