This content has been marked as final. Show 8 replies
Can you please send the value of your path and classpath from windows command promt?
CLASSPATH = "C:\Program Files (x86)\Java\jdk1.7.0_21\bin";"C:\Program Files\Java\jdk1.7.0_21\bin"
Path = C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;"C:\Program Files\Java\jdk1.7.0_21\bin";"C:\Program Files\Java\jdk1.7.0_21\jre\bin"
and my class in :
when i execute :
javac -d C:\java\apprentissage\bin\ C:\java\apprentissage\src\Main.java (it works)
java C:\java\apprentissage\bin\Main (Doesn't work :'( )
i repeat i have this problem only on windows 8 :( , on windows xp it works fine :)
Edited by: La VloZ on 31 mai 2013 20:39
CLASSPATH = "C:\Program Files (x86)\Java\jdk1.7.0_21\bin";"C:\Program Files\Java\jdk1.7.0_21\bin"Both incorrect. There are no class files at either of these locations.
java C:\java\apprentissage\bin\Main (Doesn't work :'( )Also incorrect. The argument to 'java' is a class name, not a filename.
Add your current directory where .class file is present in CLASSPATH and then try to run it. I hope it will help your
Remove CLASSPATH completely! You should have no such environment variable.
It's ok i found the solution :)
I must add in the classpath variable environnement the dot : classpath=.
Thank u all :)
No, you don't have to do that at all. That's equivalent to not having one at all, as you were already recommended.1 person found this helpful
I suggest you read the documentation for the tools you are trying to use. Clearly you have never done so. Evidently you are relying on the Google search engine to complete your education. It isn't sufficient.
It is also impossible to understand why you post here at all, when you clearly don't even read the responses you get.
The Class also called Main :)