Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 10-01-2006, 04:26 PM   #1
Baseband Member
 
Join Date: Oct 2006
Posts: 98
Question Making java work

I have installed java development kit onto this computer, but it doesn't work when I go into the command prompt and enter that javac etc. command that should make it execute my java programs in notepad.

I'm using windows XP, but the computer that is connected to the internet does not have service pack 2 because for an unknown reason downloading service pack 2 always stops the monitor from displaying all but 16 colours. Could not having the service pack stop java working? Are there any other programs or accessories I need to download or buy apart from the free java development kit? Is there any program that can make it possible for ALL the results of my work (including pictures) to be displayed? Are there any special preliminary instructions to be entered into the command prompt?

Thank you, any help on this is very much appreciated.
__________________

novahifi is offline   Reply With Quote
Old 10-03-2006, 07:58 PM   #2
Fully Optimized
 
rakedog's Avatar
 
Join Date: May 2004
Posts: 2,718
Send a message via AIM to rakedog
Default Re: Making java work

Download eclipse. IMO, best compiler/IDE for windows for Java.
__________________

__________________
hackthissite.org (criticalsecurity.net) | gentoo.org

The best argument against evolution are creationists themselves. They prove that life is devolving rather than evolving.
rakedog is offline   Reply With Quote
Old 10-03-2006, 09:01 PM   #3
Baseband Member
 
Join Date: Jul 2006
Posts: 53
Default Re: Making java work

Try looking into the environment variables for java...they may not be setup properly, so windows is unable to find the compiler.
falcon1 is offline   Reply With Quote
Old 10-04-2006, 01:36 PM   #4
Baseband Member
 
Join Date: Oct 2006
Posts: 98
Default Re: Making java work

On the site it instructs XP users to change the environment variables by clicking on the control panel icon for java and then clicking on the "advanced" tab and subsequently clicking the environment variable button - I checked on that "advanced" tab and there was NO environment variable button nor any type of button!
novahifi is offline   Reply With Quote
Old 10-05-2006, 01:39 AM   #5
Baseband Member
 
Join Date: Jul 2006
Posts: 53
Default Re: Making java work

Ok, give this a try:

In windows, open up your system properties window by going to "start" and right clicking on my computer and selecting "properties". You are now looking at general system information, right? From there, go the the advanced tab, where there should be performance, user profiles etc. At the very bottom, there is a button labeled "environment variables" - click it.

Once you are in the enviro window, edit the "Path" variable so that the first entry is something along the lines of C:\Program Files\Java\<java version>\bin;

Next, add a new variable called "CLASSPATH", and give it a value of "." (no quotes). Click ok to all the windows, reboot, and try compiling. Good luck - let me know if you have troubles.
falcon1 is offline   Reply With Quote
Old 10-07-2006, 05:23 AM   #6
Baseband Member
 
Join Date: Oct 2006
Posts: 98
Default Re: Making java work

Should that be adding the "C:\Program Files\Java\<java version>\bin;" variable at the start of the line or changing the first variable to it? It wants me to edit the value which is currently this "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\S ystem32\Wbem" for "c:\Windows\System32; c:\Windows;..."
To what extent does java work with SP2? Is it true that SP2 has java already and that the compiler compiles things automatically on such machines?

In the command prompt I see the message "Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp"

This is when I try to compile a program which says "Hello World" and is entitled HelloWorldApp.java
novahifi is offline   Reply With Quote
Old 10-07-2006, 08:34 PM   #7
Baseband Member
 
Join Date: Jul 2006
Posts: 53
Default Re: Making java work

Just add the "C:\Program Files\Java\<java version>\bin;" to the start of the variable, and leave the rest of the stuff after it.

Once that is in there, it should compile fine, assuming there are no errors in the code. If it starts to compile, but gives you an error, it means that something is wrong with your code, in which case you could try posting that here.
falcon1 is offline   Reply With Quote
Old 10-10-2006, 03:34 PM   #8
Baseband Member
 
Join Date: Oct 2006
Posts: 98
Default Re: Making java work

Yes, it works, thank you very much
__________________

novahifi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 08:49 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0