|
You need to set your CLASSPATH. Like set CLASSPATH=C:\WDSC Then it can find the 'land' class. On 9/7/06, Ronald Newman <newmanr2002@xxxxxxxxx> wrote:
I am new to JAVA and this is my first class assigment. The following code compiles clean but when I run thr program I get a run time error listed below the code. Can you point to what I need to do to correct this? Thanks Ron Newman // Ronald Newman import java.text.NumberFormat; public class Land { public static void main(String [] args) { NumberFormat decimalA = NumberFormat.getInstance(); decimalA.setMinimumFractionDigits(0); NumberFormat decimalB = NumberFormat.getInstance(); decimalB.setMinimumFractionDigits(3); final int FEET_PER_ACRE = 43560; double tract = 398767, acres; acres = tract / FEET_PER_ACRE; System.out.println("\n\n A Track of land " + decimalA.format(tract) + " Square feet has " + decimalB.format(acres) + " acres. \n\n"); } // end of main } // end Land class <INACOMS8><INACOMS8>C: cd \WDSC\ java Land C:\wdsc> C:\wdsc> C:\wdsc>java.lang.NoClassDefFoundError: Land Exception in thread "main" C:\wdsc> --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. -- This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.