Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java programming

Status
Not open for further replies.

Johny5

Electrical
Oct 24, 2003
3
Hi,There.
I am a new to Java programming.I teach myself Java Programming.I learn from a book calls "Learn Java Now J++" By Stephen R.Davis and a Microsoft Visual J++ version 1.1 to write a program. My very first program as following...

public class Appl_1
{
public static void main(String args[])
{
System.out.println("Hello,world");
}
}

and I saved as Appl_1.java. When I compile it, It says error J0051: Undefined package 'lang' .I got stuck right here. I can not execute the program.

Could you help me to solve this problem ?.I am appreciate it very much.Thanks./.
 
Replies continue below

Recommended for you

What are your imported packages? Also are using the command line compilier or an IDE based compilier, nevermind I saw it's MS J++ so it's IDE. See if you could find the package paths, it's been a while since I used this, and make sure that package exists. Also when you set up the project what type did you pick, if I remember correctly J++ gives you the option to use WFC or JAVA, and the packages it defaults to will vary. Again it's been a while since I used J++ so take what I said with a grain of salt.

Ultimatly though you have a package imported that it can't find. Delete the import line or find the package and set the right path.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor