Trouble compiling over network

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
RobertC

Trouble compiling over network

Post by RobertC »

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
Garrett

Post by Garrett »

I actually do precisely that all the time. I've got my source files and class files in the same directory, and I've got to maintain 3 different computers, (2 servers and my workstation.) So I open a source file on a server, from my workstation, and then run compile, and it seems to run fine for me.

That's why I strongly suspect one of two possibilities:

1. I run XP Pro and 2000 exclusively. Since their networking capabilities are much more robust than the steaming pile of Windows 98, I'd guess it's possible it's Microsoft's fault.

2. It's also possible you have your network set up differently. I don't know a whole lot about networking protocols, but the question is whether you've TCP/IP running, or are you running some other protocol, such as the proprietary Windows Networking, or perhaps somthing really old, such as IPX? I really can't tell you much more.

I'd strongly suspect your best bet is simply just to copy the resultant .class files from the local drive to the remote one, unless what I just told you is especially helpful, which I rather doubt that it is. :(

Good luck.
Guest

Post by Guest »

Well, thanks for trying. :-)

I am using TCP/IP, so that's not the issue.

You said:

>So I open a source file on a server, from my workstation, and then run >compile, and it seems to run fine for me.

Just to be clear, compiling is no problem for me, either. Its at runtime that I have the problem.

Maybe its win98; maybe I'm doing something stupid. Wouldn't be the first time. :-) But if it is Win98, then Textpad's solution isn't a good solution along the whole line of OS's. It does say it supports win95 and up, I think...

RobertC
Post Reply