I set the path :
C:\jdk\bin ; %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
I can compile it easily and the compiler generates a class file but I
can not
run it,while I run it ,I get this message:
Exception in thread "main" java.lang.NoClassDefFoundError: c:\Welcome
Please don't tell me that you have a syntax Error.I just run Samples
of Core Java book .
In the book ,It's recommended that I run this command
jar xvf src.jar
while I do that normally,I get this message :
C:\jdk\bin>jar xvf src.jar
java.io.FileNotFoundException: src.jar (The system cannot find the
file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:64)
at sun.tools.jar.Main.run(Main.java:186)
at sun.tools.jar.Main.main(Main.java:904)
and this is the source code that I compile (Of course there's no bug):
/**
@version 1.11 2000-04-22
@author Cay Horstmann
*/
public class Welcome
{
public static void main(String[] args)
{
String[] greeting = new String[3];
greeting[0] = "Welcome to Core Java";
greeting[1] = "by Cay Horstmann";
greeting[2] = "and Gary Cornell";
for (int i = 0; i < greeting.length; i++)
System.out.println(greeting[i]);
}
}
In Core Java It's recommended that I unzip the doc file using jar
command in the end.
As there's to be some HTML document inside the doc folder,Is it quite
necessary in JDK installation?
========================================================================
Please tell me what to do...Thank you very much indeed!
Regards
Ramin Farhanian
<snip>
Please see the various responses in comp.lang.java.help, then read
http://www.pobox.com/~skeet/java/newsgroups.html
--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
This should work
>
> In the book ,It's recommended that I run this command
> jar xvf src.jar
> while I do that normally,I get this message :
Why ?
Look at:
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html