Computer >> asp >> How to run a java program when a message "java.lang.........method cannot be found" appear

How to run a java program when a message "java.lang.........method cannot be found" appear

The progam can be compiled with java in my PC which has Windows XP.But it cannot be run.I can sole the problem temperarily by typing "set CLASSPATH" before giving the command to run.But I want to solve the problem permanantly.

How to run a java program when a message "java.lang.........method cannot be found" appears when running?

Using the CLASSPATH Environment Variable

If you use a particular set of classes from one or more jar files regularly, it is convenient to set your CLASSPATH environment variable once, log off, then any time afterwards, you just need to invoke javac or java without specifying the -classpath option (as illustrated in later sections).

* For Windows XP:

1. Right-click on the My Computer icon

2. Select Properties

3. Click on the Advanced tab

4. Click on the Environment Variables button

5. Create a new or edit the old CLASSPATH variable for your login account

6. Add this as a value:

.;PATH

where "." represents the current directory, and "PATH" represents the full path to the jar files you want.

7. Click on OK buttons until you have closed the Properties.

8. Log off, then log back on to ensure that your environment variables are set.

How to run a java program when a message "java.lang.........method cannot be found" appears when running?

Special Education refers to the provision of services to kids with disabilities. YOu might get better answers under another category. Report It

Reply:The above answer looks great! I did the same thing to be able to compile on Command Prompt.

Don't vote for this answer. Second answer added to bring question to a vote.

C++......................?
is there a less complicated c++ compiler than microsoft express 2008? i found it to complicated and hav found no other free program to make a fps. a t..
C++???????
I am trying to make a tic tac toe game for c++ but i dont know how to use an array to make the board. also after i make the board hiw do i code it so ..
C++???????????????
I HAVE NO IDEA WHAT C++ IS? and i have an exam tomorrow. I dont understand 1. character set 2.tokens. i also have the for statement program, if stat..
C++..........................?
where i find the best c++ programing books.C++..........................?AT www.esnips.com/C++..........................?Try doing a search. OReilly t..
C++????????
i need to know a simple program to concat two strings without using strcat inside operator overloading.plz help me with a program..............C++????..
...................c++?
How would I create a program that that displays the sum of a sales amount in each of 4 regions, during a 3 month period, which would also display the ..
"Smitfraud-C. Toolbar888&..
I am a webmaster, and I am trying to build my website, but my computer keeps acting weird and seems to be going into random hybernation for no reason ..
C programme...?
I wrote a programme of calculator in C language. And it has two or three error so pl do correct them. And send me correct answer. Prog. is: #includest..
C programme...?
I wrote a programme of calculator in C language. And it has two or three error so pl do correct them. And send me correct answer. Prog. is: #includest..
C programme...?
I wrote a programme of calculator in C language. And it has two or three error so pl do correct them. And send me correct answer. Prog. is: #includest..
data computer viruses trojans
1 2 3 4 5 6 skin care 7 8 9 10 11 12 13 14 15 16 17 18 web hosting 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 pets 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100