LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-11-2017, 08:37 AM   #1
cneric12lin0
LQ Newbie
 
Registered: Nov 2017
Posts: 6

Rep: Reputation: Disabled
simple Java program run time error


Dear advanced java program:

about static instantiation
------
shih@shih-PC ~/javaprogram/ch7/s7_4
$ /cygdrive/c/"Program Files"/Java/jdk1.8.0_152/bin/java Firm
Exception in thread "main" java.lang.NoClassDefFoundError: StaffMember/StaffMember
at Staff.Staff.<init>(Staff.java:22)
at Firm.main(Firm.java:15)

-----------------
Code:
     12 import StaffMember.*;
     13 public class Staff
     14 {
     15    StaffMember[] staffList;
     16
     17   // --------------------------------------------------------
     18   //  Sets up the list of staff members.
     19   //----------------------------------------------------------
     20   public Staff()
     21   {
     22      staffList = new StaffMember[6];
please help
 
Old 12-11-2017, 09:54 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
What has happened to your other topics?

Last edited by NevemTeve; 12-11-2017 at 12:40 PM.
 
Old 12-11-2017, 01:48 PM   #3
cneric12lin0
LQ Newbie
 
Registered: Nov 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
I follow up most of case to match book's expected result.
but this one is hard job; I search web, I don't see how to fix it.(i.e. how to add/modify or make sure my class path is on the right place)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
like to make (without main method) my simple graphic java code run(don't know it is program or not) cneric12lin0 Programming 3 12-08-2017 05:33 AM
[SOLVED] Help with fortran program--encountered run time error fu3lc3ll$ Programming 6 05-21-2011 06:25 AM
Help needed to run simple java program in linux pinga123 Linux - Newbie 7 05-06-2010 06:25 AM
Can't seem to run a simple shell script error command not found each time SimonT Linux - Newbie 5 10-29-2006 06:31 AM
error when run java program vanhelsing Programming 8 12-24-2004 02:23 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration