• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help please

 
arthy loganathan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im a beginner to java...i installed java6 from net...if i compiled using javac,the command prompt shows an error message...how to run the java program...how to set the path...
[ October 06, 2008: Message edited by: Bear Bibeault ]
 
Henry Wong
author
Marshal
Pie
Posts: 21517
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this JavaRanch FAQ...

http://faq.javaranch.com/java/JavaBeginnersFaq

This should get you started.

Henry
 
arthy loganathan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you sir...
 
ruban raj
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For running java program ,You have to set classpath and JAVA_HOME.


CLASSPATH:%JAVA_HOME%\lib\tools.jar

JAVA_HOME:here We have to give jdk path.For example: C:\program files\java\jdk1.6

Compile java program using following command:

javac classname.java

run java program using following command:

java classname

i hope this will help You

thanks and regards,

ruban
 
Campbell Ritchie
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you don't have to do anything with the CLASSPATH. There are instructions for setting the PATH on Windows on this "common problems" page. The PATH you want starts with / on *nix or the drive letter (usually C) on Windows and always ends with bin.

When the instructions say "optional" you pronounce o-p-t-i-o-n-a-l "absolutely definitely compulsory."
 
Rob Spoor
Sheriff
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, never include any JAR file in the Java home folder in your classpath. If one of those doesn't get recognized from the start, you've put it in the wrong place yourself. All the JAR files that are there when you install the JDK / JRE are right where they belong and are included automatically.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic