placing and compiling a .java file in working directory -


just started learning java, i'm looking save .java file (textio.java) working directory. (which file makes working directory exactly?)

and run through cmd eclipse can use class.

i tried doing saving (and running thru cmd) file in folder containing programs (yah right) have written already. eclipse still cant find class.

can this?

thanks

you have create eclipse java project first. can copy file file system explorer window , paste on eclipse package explorer tree. eclipse projects compile files in source folders automatically default.

the textio.java clas mentioned has javadoc saying: ... textio provides set of static methods reading , writing text... means use toolkit rather executing application. given textio.java , class textioutilizer both in root of classpath (source folder in eclipse), here how call textio method:

public class textioutilizer {  /**  * @param args  */ public static void main(string[] args) {     // code     textio.skipblanks();     //code } 

}

now run textioutilizer java application - has main method. hope helps.


Comments