本帖最后由 air 于 2013-10-6 00:47 编辑
今天换了新笔记本,path里有java程序的路径,自己也新建了个classpath,路径没错,每次在dos命令行中能在任意目录调用javac,就是不能在任意目录javac编译java文件,可是进去文件目录又能用,如果是我路径写错了,我看也没问题啊,半工半学好费脑子,经常困得睡下去,早上起来电脑没关,又想争取一些学习的时间。也有一定可能是我脑袋最近昏不好使犯下的初级问题,请大家帮忙看看。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Windows\System32>javac IfDemo.java
javac: 找不到文件: IfDemo.java
用法: javac <options> <source files>
-help 用于列出可能的选项
C:\Windows\System32>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Air\AppData\Roaming
asl.log=Destination=file
classpath=E:\myJavaDemo ((((((((这里)))))))))
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMMPath=C:\Program Files\Lenovo\Communications Utility
COMPUTERNAME=AIR-PC
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Air
LOCALAPPDATA=C:\Users\Air\AppData\Local
LOGONSERVER=\\AIR-PC
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=E:\myJavaDemo\Demo1;E:\JAVA SE\bin;E:\JAVA SE\jre\bin;C:\Program Files (x86
)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\P
rogram Files\Intel\iCLS Client\;C:\Program Files\Broadcom\Broadcom 802.11 Networ
k Adapter\Driver;;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Win
dows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Progra
m Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\OpenCL S
DK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Fi
les (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2
.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\P
rogram Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x
86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel
\Intel(R) Management Engine Components\IPT;C:\Program Files\ThinkPad\Bluetooth S
oftware\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3a09
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
speed work=E:\JAVA SE\bin
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\Air\AppData\Local\Temp
TMP=C:\Users\Air\AppData\Local\Temp
TVT=C:\Program Files (x86)\Lenovo
USERDOMAIN=Air-PC
USERNAME=Air
USERPROFILE=C:\Users\Air
windir=C:\Windows
windows_tracing_flags=3
windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
C:\Windows\System32>
C:\Windows\System32>
C:\Windows\System32>set classpath
classpath=E:\myJavaDemo(((((((在这))))))))
C:\Windows\System32>path
PATH=E:\myJavaDemo\Demo1;E:\JAVA SE\bin;E:\JAVA SE\jre\bin;C:\Program Files (x86
)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\P
rogram Files\Intel\iCLS Client\;C:\Program Files\Broadcom\Broadcom 802.11 Networ
k Adapter\Driver;;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Win
dows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Progra
m Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\OpenCL S
DK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Fi
les (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2
.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\P
rogram Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x
86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel
\Intel(R) Management Engine Components\IPT;C:\Program Files\ThinkPad\Bluetooth S
oftware\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;
C:\Windows\System32>javac IfDemo.java
javac: 找不到文件: IfDemo.java
用法: javac <options> <source files>
-help 用于列出可能的选项
C:\Windows\System32>javac IfTest.java
javac: 找不到文件: IfTest.java
用法: javac <options> <source files>
-help 用于列出可能的选项
C:\Windows\System32>
E:\>cd myJavaDemo\Demo1
E:\myJavaDemo\Demo1>dir
驱动器 E 中的卷是 E
卷的序列号是 0612-5B5B
E:\myJavaDemo\Demo1 的目录
2013/10/05 02:52 <DIR> .
2013/10/05 02:52 <DIR> ..
2013/10/05 02:55 1,070 IfTest.class
2013/10/05 03:13 568 IfTest.java
2013/10/05 02:54 568 IfTest.java.bak
3 个文件 2,206 字节
2 个目录 91,895,521,280 可用字节
E:\myJavaDemo\Demo1>
E:\myJavaDemo\Demo1>cd..
E:\myJavaDemo>dir
驱动器 E 中的卷是 E
卷的序列号是 0612-5B5B
E:\myJavaDemo 的目录
2013/10/05 01:30 <DIR> .
2013/10/05 01:30 <DIR> ..
2013/10/05 02:52 <DIR> Demo1
2013/10/05 01:11 694 IfDemo.class
2013/10/04 23:58 542 IfDemo.java
2013/10/04 02:57 536 IfDemo.java.bak
2013/10/05 01:27 560 IfTest.java
2013/10/05 01:14 560 IfTest.java.bak
5 个文件 2,892 字节
3 个目录 91,895,521,280 可用字节
E:\myJavaDemo>
|
|