A
Ahmad
I am not a Java programmer. Several years ago I got VisualCafe and tried to
write an applet. I put it on the a web site. I use it every so often and it
is working when I try it from my 2 machines. But my friend told me that it
is not working on his. So I try it on his and for sure I get the Java icon
and nothing else. In the Java console I get:
Using JRE version 1.4.2_03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\user
Proxy Configuration: No proxy
..
..
java.lang.IllegalArgumentException
at sun.util.calendar.ZoneInfo.getOffset(Unknown Source)
at MyDate.initDate(MyDate.java:44)
at MyDate.<init>(MyDate.java:34)
the portion of code in MyDate.initDate is:
TimeZone TZ;
Today = new GregorianCalendar();
TZ = Today.getTimeZone();
Day = Today.get(Calendar.DAY_OF_MONTH);
Month = Today.get(Calendar.MONTH);
Year = Today.get(Calendar.YEAR);
TimeOffset = TZ.getOffset(Today.AD, Year, Month, Day, 0, 0);
What's wrong and why it is working on some machines?
Since I am not a Java programmer, I'll appreciate it if you post the right
code to work on all/most/more machines.
write an applet. I put it on the a web site. I use it every so often and it
is working when I try it from my 2 machines. But my friend told me that it
is not working on his. So I try it on his and for sure I get the Java icon
and nothing else. In the Java console I get:
Using JRE version 1.4.2_03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\user
Proxy Configuration: No proxy
..
..
java.lang.IllegalArgumentException
at sun.util.calendar.ZoneInfo.getOffset(Unknown Source)
at MyDate.initDate(MyDate.java:44)
at MyDate.<init>(MyDate.java:34)
the portion of code in MyDate.initDate is:
TimeZone TZ;
Today = new GregorianCalendar();
TZ = Today.getTimeZone();
Day = Today.get(Calendar.DAY_OF_MONTH);
Month = Today.get(Calendar.MONTH);
Year = Today.get(Calendar.YEAR);
TimeOffset = TZ.getOffset(Today.AD, Year, Month, Day, 0, 0);
What's wrong and why it is working on some machines?
Since I am not a Java programmer, I'll appreciate it if you post the right
code to work on all/most/more machines.