P
paul_fraser2005
I am on windows XP and i can't even run hello world.
I've set up the classpath alright (see below) but when I run a program
it doesn't recognise the classname (see below).
I've tried uninstalling/re-installing java with the same result.
I'm running java 1.4.2_05
C:\>type hello.java
public class hello {
public static void main(String[] args)
{
System.out.println("hello world");
System.out.println("hello world");
System.out.println("hello world");
}
}
C:\>javac hello.java
C:\>java hello
Exception in thread "main" java.lang.NoClassDefFoundError: hello
C:\>ver
Microsoft Windows XP [Version 5.1.2600]
C:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Registered User\Application Data
classpath=c:\java
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=DGNV5R0J
ComSpec=C:\WINDOWS\system32\cmd.exe
HOME=C:\jbase4\home
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Registered User
JBCGLOBALDIR=C:\jbase4\4.1
JBCRELEASEDIR=C:\jbase4\4.1
JREDIR=C:\jbase4\4.1\jdk\jre
JRELIB=C:\jbase4\4.1\jdk\jre\bin\classic;C:\jbase4\4.1\jdk\jre\lib
LOGONSERVER=\\DGNV5R0J
NAVROOT=C:\jbase4\4.1\jDP
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=C:\jbase4\4.1\MinGW\bin;C:\jbase4\4.1\jDP\bin;C:\jbase4\4.1\bin;C:\jbase4\4
..1\jdk\jre\bin\classic;C:\jbase4\4.1\jdk\jre\lib;C:\jbase4\4.1\config;C:\jbase4\
4.1\jdk\jre\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Progr
am Files\ATI Technologies\ATI Control Panel;C:\Program
Files\Sonic\MyDVD;C:\Prog
ram Files\Common Files\Adaptec
Shared\System;c:\j2sdk1.4.2_05\bin;c:\qb45;c:\bat
ches
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 7, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0207
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\REGIST~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\REGIST~1\LOCALS~1\Temp
USERDOMAIN=DGNV5R0J
USERNAME=Registered User
USERPROFILE=C:\Documents and Settings\Registered User
windir=C:\WINDOWS
C:\>
I've set up the classpath alright (see below) but when I run a program
it doesn't recognise the classname (see below).
I've tried uninstalling/re-installing java with the same result.
I'm running java 1.4.2_05
C:\>type hello.java
public class hello {
public static void main(String[] args)
{
System.out.println("hello world");
System.out.println("hello world");
System.out.println("hello world");
}
}
C:\>javac hello.java
C:\>java hello
Exception in thread "main" java.lang.NoClassDefFoundError: hello
C:\>ver
Microsoft Windows XP [Version 5.1.2600]
C:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Registered User\Application Data
classpath=c:\java
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=DGNV5R0J
ComSpec=C:\WINDOWS\system32\cmd.exe
HOME=C:\jbase4\home
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Registered User
JBCGLOBALDIR=C:\jbase4\4.1
JBCRELEASEDIR=C:\jbase4\4.1
JREDIR=C:\jbase4\4.1\jdk\jre
JRELIB=C:\jbase4\4.1\jdk\jre\bin\classic;C:\jbase4\4.1\jdk\jre\lib
LOGONSERVER=\\DGNV5R0J
NAVROOT=C:\jbase4\4.1\jDP
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=C:\jbase4\4.1\MinGW\bin;C:\jbase4\4.1\jDP\bin;C:\jbase4\4.1\bin;C:\jbase4\4
..1\jdk\jre\bin\classic;C:\jbase4\4.1\jdk\jre\lib;C:\jbase4\4.1\config;C:\jbase4\
4.1\jdk\jre\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Progr
am Files\ATI Technologies\ATI Control Panel;C:\Program
Files\Sonic\MyDVD;C:\Prog
ram Files\Common Files\Adaptec
Shared\System;c:\j2sdk1.4.2_05\bin;c:\qb45;c:\bat
ches
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 7, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0207
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\REGIST~1\LOCALS~1\Temp
TMP=C:\DOCUME~1\REGIST~1\LOCALS~1\Temp
USERDOMAIN=DGNV5R0J
USERNAME=Registered User
USERPROFILE=C:\Documents and Settings\Registered User
windir=C:\WINDOWS
C:\>