JDK 1.3 and Textpad ( setting classpath )

shinkansen

Member
Jun 15, 2000
46
0
0
Hi, I am a newbie at JAVA and I am learning JAVA with Core JAVA2 from SUN... but I am having a bit of trouble with setting classpath with JAVA in windows98. The following is the code...

/**
* @version 1.20 27 Mar 1998
* @author Cay Horstmann
*/

import corejava.*;

public class Calendar
{ public static void main(String[] args)
{ int m;
int y;
if (args.length == 2)
{ m = Integer.parseInt(args[0]);
y = Integer.parseInt(args[1]);
}
else
{ Day today = new Day(); // today's date
m = today.getMonth();
y = today.getYear();
}

Day d = new Day(y, m, 1); // start date of the month

System.out.println(m + " " + y);
System.out.println("Sun Mon Tue Wed Thu Fri Sat");
for (int i = Day.SUNDAY; i < d.weekday(); i++ )
System.out.print(&quot; &quot;);
while (d.getMonth() == m)
{ if (d.getDay() < 10) System.out.print(&quot; &quot;);
System.out.print(d.getDay());
if (d.weekday() == Day.SATURDAY)
System.out.println();
else
System.out.print(&quot; &quot;);
d.advance(1);
}
if (d.weekday() != Day.SUNDAY) System.out.println();
}
}


I know that I have to set classpath in order to import &quot;corejava.*&quot; files from a directory, but I haven't had much luck with this... I tried to add classpath in autoexec.bat like &quot;set classpath=path&quot; but no luck there...

Can anyone help me with this? Thanks in advance...
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Try doing this:

at command prompt, type:
C:\>homedrive=c:

then:
C:\>set homepath=\

See if that would solve your problem
 

shinkansen

Member
Jun 15, 2000
46
0
0
C:>homedrive=c:

This command did not work on DOS Prompt window... &quot;Bad command or file name&quot; error came up after entering this command.