|
-
Jun 19th, 2003, 02:51 PM
#2
Dazed Member
It is not necessary that you put your .java files in the bin directory. You can place your files in any directory that you choose as long as you specify the directory where the file is located that you wish to compile. ie... C:\jdk1.3\bin javac C:\Java\MyFile.java
Now to compile you have to be in the bin directory unless you change that so you can compile your .java files from outside of that directory.
From the DOS command line type set. A whole bunch of stuff should be listed. The second to last entry should read path = Now at the command line type in path = C:\jdk1.3\bin. Now when you go back by typing set you should see that the path will now say C:\jdk1.3\bin. This enables you to compile with out having to be in the bin directory.
As for being able to run files i dont think that the class path can be set from dos itself. The usual method is to set the CLASSPATH environment variable to point to the directory where the .class files reside that you want to run. But remember that once you change the autoexec.bat file a system reboot is needed for the changes to take effect. You can always run using C:\jdk1.3\bin -classpath C:\MyPath; MyProgram
Last edited by Dilenger4; Jun 19th, 2003 at 10:27 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|