bin\javac -d classes
bin\javac -classpath classes
bin\javac -sourcepath sources
and the full path:
bin\javac -d c:\jdk1.3\classes
bin\javac -classpath c:\jdk1.3\ classes
bin\javac -sourcepath c:\jdk1.3\ sources
What the heck am I doing wrong (aside from trying to do anything on Windows)?
I should point out that I know there are better developer tools. My
objective here is to better understand how the SDK works on Windows.
Thanks.
> bin\javac -d classes
> bin\javac -classpath classes
> bin\javac -sourcepath sources
> and the full path:
> bin\javac -d c:\jdk1.3\classes
> bin\javac -classpath c:\jdk1.3\ classes
> bin\javac -sourcepath c:\jdk1.3\ sources
> What the heck am I doing wrong (aside from trying to do anything on Windows)?
Java on windows is pretty much the same animal as it is on other platforms. I
think you have some conception in your head that things are different. From
your examples it does not look like you are commfortable using the -d -classpath
-sourcepath options on any platform. The only main differences are the backslash
vs the forward slash and the semicolon vs the colon.
Assume you are in the directory "c:\My Documents\My Java" with subdirectories
"classes" and "sources". The following command should work (executed in the current
directory):
javac -d classes -classpath classes -sourcepath sources com\example\MyTest.java
You should never be compiling your classes into c:\jdk1.3 directory nor
need to specify it in the classpath.
Paul
I have a conception in my head that on a Mac, when you drop a source
file on javac, you get a dialog where you can set all the paths, click
"Okay" and it compiles.
> From your examples it does not look like you are commfortable using the
> -d -classpath -sourcepath options on any platform. The only main
> differences are the backslash vs the forward slash and the semicolon vs
> the colon.
I'm basically not comfortable with command lines, especially when
they're so poorly documented. So far I've only used the Mac tools and
various IDEs.
> Assume you are in the directory "c:\My Documents\My Java" with
> subdirectories "classes" and "sources". The following command should
> work (executed in the current directory):
>
> javac -d classes -classpath classes -sourcepath sources com\example\
> MyTest.java
I don't understand this at all. I'm trying to set default paths, not the
path to a specific source file. Is that not possible? Do you have to
specify the directory, source and class paths evey time you compile?
Sounds like the parameters are just there for scripting or something.
> You should never be compiling your classes into c:\jdk1.3 directory nor
> need to specify it in the classpath.
Any particular reason? I must have missed something in the Sun tutorial.
They have you compiling and running things from the same directory that
javac is in. They didn't say to move it anywhere.
Thanks for your help.
i think these are pretty well documented in the Java tool documentation...
The reason you are uncomfortable would be because you are used to a
different environment... there are a zillion IDEs to choose from...
probably including the ones you might have used on Mac...
r
p.s: if you want to implement the functionality that you get on Windows, it
is pretty trivial to implement... necessity is the mother of invention...
:-)
"Dave Livesay" <dliv...@telocity.com> wrote in message
news:3A3ED93C...@telocity.com...