Thread: Java Trouble
View Single Post
Old 12-08-2006, 01:34 PM   #6 (permalink)
mediator
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default Re: Java Trouble

Simple!

Ur problem is related to classpath! java wont execute even if u try like "java filename" in its directory in which file resides.

U can solve it by
1. Setting up the classpath
2. executing by giving full path . Like u have ur java file named "Hello.java" in /home/Sykora ...then it will compile preety easily if u give javac in that directory.
But to execute it u need to give command like "java /home/Sykora/Hello".

To setup the classpath i.e the path of directory containing all the java file and compiled java class files.........open up ur ".bash_profile" file hidden in ur home fodler and add entry at the end
***********************************
CLASSPATH=$HOME/Sykora
export CLASSPATH
***********************************


Neways u shud try 1st method..!!

UR problem Solved!!

Last edited by mediator; 12-08-2006 at 01:41 PM.
mediator is offline