compile fail


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: compile fail

  1. #1
    Join Date
    Nov 2002
    Posts
    3

    Question compile fail

    Dear

    I have problem on Java program compile. When the program compile on JRE1.3X. The program can compile successful but the program compile on JRE1.4X. The program will have some error. Like below:
    Code:
    C:\ass1\Payroll.java:60: cannot resolve symbol
    symbol  : method CalcPay  (double,double)
    location: class Payroll
    	 wages = CalcPay(payRate, hours); // Compute wages
                     ^
    C:\ass1\Payroll.java:90: cannot resolve symbol
    symbol  : variable outDisplay  
    location: class Payroll
         outDisplay.addWindowListener( new WindowAdapter( )
         ^
    2 errors
    
    Process completed.
    Please help
    John

    [ArchAngel added CODE tags]

  2. #2
    Join Date
    Dec 2003
    Posts
    4
    Note: I'm a java newbie

    For the wages error. Did you make sure that wages is properly declared as the object type you're trying to assign to it?

    Also if you're using a helper program like NetBeans, if you didn't follow it's instructions for creating all your documents it will most likely totally screw up the inheritance between your classes. To get around this, I just used 'javac' from the msdos command prompt. In order to do this you'll have to make sure you have the proper path in your autoexec.bat file.

    Here's what mine looks like (easily adaptable to your system)

    PATH C:\j2sdk1.4.2_01\BIN

    Hope this helped a bit.
    I wish I was asleep

  3. #3
    Join Date
    Dec 2003
    Posts
    4
    Have to agree with Loki, the problem is with class Payroll and the classpath.

    Make sure it is in the proper directory.

  4. #4
    Join Date
    Mar 2003
    Posts
    834
    hmm...I'm not so sure...please post your code....
    ArchAngel.
    O:-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center