Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 05-09-2008, 12:14 PM   #1 (permalink)
Broken In
 
virus_killer's Avatar
 
Join Date: Jul 2006
Posts: 144
Default can't compile a java program.


Guys,

I have got a java program. its about multi threaded server. i am getting an error message while compiling this program. i have installed JDK 6.0 in my laptop.

here how i compile the program.

c:\Users\me> javac WebServer.java

and this is an error message what i am getting.

' javac' is not recongnized as aninternal or external command, operable program or batch file. '

Am i doing anything wrong here?

please help me guys, here is the code http://rafb.net/p/vUXfk953.html, please compile this code and tell me if its working fine or not.
__________________
Device: T-Mobile G1(black)
ROM: JF ADP1.5 Apps2sd
104 apps with 69 MB remaining
virus_killer is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 05-09-2008, 12:17 PM   #2 (permalink)
Think Zen.
 
ray|raven's Avatar
 
Join Date: Dec 2005
Posts: 1,498
Default Re: can't compile a java program.

Your path doesnt contain javac.

Refer this : http://java.sun.com/j2se/1.5.0/docs/...classpath.html
__________________
Do what you will; but not because you must. -- Zen Quote
ray|raven is offline  
Old 05-09-2008, 12:30 PM   #3 (permalink)
Broken In
 
virus_killer's Avatar
 
Join Date: Jul 2006
Posts: 144
Default Re: can't compile a java program.

^^ please check your inbox.
__________________
Device: T-Mobile G1(black)
ROM: JF ADP1.5 Apps2sd
104 apps with 69 MB remaining
virus_killer is offline  
Old 05-09-2008, 07:40 PM   #4 (permalink)
Broken In
 
Join Date: Aug 2008
Location: Mumbai, India
Posts: 169
Default Re: can't compile a java program.

Quote:
Originally Posted by ray|raven View Post
Your path doesnt contain javac.
His problem is not the CLASSPATH. He has to set his PATH correctly. Your link talks about CLASSPATH

I could download your code and compile it successfully. Refer my screenshot for how to set the PATH variable.



^The error "Der Befel... blah blah..." reads the same as yours, but in German.

I am not sure about XP or Vista. I am using Windows 2000 (in office). Here, you can permanently modify your PATH to point to the Java installation\bin folder. All I do is go to Environment settings, Environment variables, and Edit the PATH variable. Must be something similar on XP / Vista.

Regards,
Bandu.
Bandu is offline  
Old 06-09-2008, 04:21 AM   #5 (permalink)
Right Off the Assembly Line
 
Join Date: Oct 2005
Location: Calicut
Posts: 11
Default Re: can't compile a java program.

yes, bandu is right .. in winxp, environmental variables has to be set,
right click my computer-->properties--> advanced tab --->environment variables button @ the bottom. --> in tat edit the 'path' in system variables. i.e just add the location of the /bin folder of your java folder after a semicolon of watever is there. ..
sanprince is offline  
Old 06-09-2008, 04:45 AM   #6 (permalink)
Wahahaha~!
 
Faun's Avatar
 
Join Date: Dec 2006
Location: Pune/there
Posts: 7,676
Default Re: can't compile a java program.

Here is a step by step click and clickty way i wrote in my blog:
http://visio159.com/2008/01/03/a-beg...raoch-to-java/

Its the same method but the GUI way
__________________
Blog | Flickr | Battlelog
Spoiler:
Asus Z68 V-Pro|i5 2500k|TRUE Black|Ripjaws X|U2311H|N560GTX|D7000|XONAR STX|RE272|RE0|CC51|XE200PRO Walnut| TD II V2| Ultraphile|N5800

Mono
Faun is offline  
Old 06-09-2008, 11:49 AM   #7 (permalink)
Broken In
 
virus_killer's Avatar
 
Join Date: Jul 2006
Posts: 144
Default Re: can't compile a java program.

Thanks guys, solved it.
__________________
Device: T-Mobile G1(black)
ROM: JF ADP1.5 Apps2sd
104 apps with 69 MB remaining
virus_killer is offline  
Closed Thread

Bookmarks

Thread Tools
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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java programming..how can I distribute java program....? Manojap Programming 5 16-05-2009 02:46 PM
Write and Compile C++, Java, PHP, and HTML source code on your phone! digit i am thinking Mobiles and Tablets 12 23-09-2007 03:56 PM
How to compile Java and C++ programes in opensuse 10.2 mahendraraut Open Source 3 26-02-2007 06:14 PM
Cannot compile java program in Ubuntu. mehulved Open Source 19 08-03-2006 01:19 AM

 
Latest Threads
- by soumya
- by Sujeet
- by clmlbx
- by Sujeet

Advertisement




All times are GMT +5.5. The time now is 11:11 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2