473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Package does not exist

2
frnds i have been working in java for 10 months ...

still a basic question is irritating me .....

i have a simple code like this .....

c:\jdk1.3\bin\pack>

package pack;

public class one
{
public void disp()
{
System.out.println("Welcome");
}
}

An another files contain

c:\jdk1.3\bin\pack1>

package pack1;

import pack.one;
public class two
{
public static void main(String ar[])
{
one o = new one();
o.display();
}
}

c:\jdk1.3\bin\pack1>javac two.java

it display 4 Errors in stmt.....

1.Package does not exits----->package.pack
2. cannot resolve the symbol
3.cannot resolve the symbol

please help me...
and ..thanks
Mar 13 '07 #1
8 7272
MMcCarthy
14,534 Expert Mod 8TB
Question is being moved to the Java forum.

ADMIN
Mar 13 '07 #2
r035198x
13,262 8TB
frnds i have been working in java for 10 months ...

still a basic question is irritating me .....

i have a simple code like this .....

c:\jdk1.3\bin\pack>

package pack;

public class one
{
public void disp()
{
System.out.println("Welcome");
}
}

An another files contain

c:\jdk1.3\bin\pack1>

package pack1;

import pack.one;
public class two
{
public static void main(String ar[])
{
one o = new one();
o.display();
}
}

c:\jdk1.3\bin\pack1>javac two.java

it display 4 Errors in stmt.....

1.Package does not exits----->package.pack
2. cannot resolve the symbol
3.cannot resolve the symbol

please help me...
and ..thanks
I have seen this before. Why are you storing your programs in the java directories? You can store your programs in My Documents or anywhere else and be able to run them by specifying the classpath.

Did you compile one first? Have also set up the correct directory structure for the classpath?
Mar 13 '07 #3
akas
2
Thanks for ur Reply....
Please help me..
Same errors occur in other Dir....

how to set classpath....
Mar 14 '07 #4
r035198x
13,262 8TB
Thanks for ur Reply....
Please help me..
Same errors occur in other Dir....

how to set classpath....
Just search for it here on TSDN. The question has been asked many times before.
Mar 14 '07 #5
Ndia
1
frnds i have been working in java for 10 months ...

still a basic question is irritating me .....

i have a simple code like this .....

c:\jdk1.3\bin\pack>

package pack;

public class one
{
public void disp()
{
System.out.println("Welcome");
}
}

An another files contain

c:\jdk1.3\bin\pack1>

package pack1;

import pack.one;
public class two
{
public static void main(String ar[])
{
one o = new one();
o.display();
}
}

c:\jdk1.3\bin\pack1>javac two.java

it display 4 Errors in stmt.....

1.Package does not exits----->package.pack
2. cannot resolve the symbol
3.cannot resolve the symbol

please help me...
and ..thanks
i have a project in designing the programme that execute exactly as microft wordprocessing
Apr 2 '07 #6
r035198x
13,262 8TB
i have a project in designing the programme that execute exactly as microft wordprocessing
Start your own thread for it but read the guidelines first.
Apr 2 '07 #7
frnds i have been working in java for 10 months ...

still a basic question is irritating me .....

i have a simple code like this .....

c:\jdk1.3\bin\pack>

package pack;

public class one
{
public void disp()
{
System.out.println("Welcome");
}
}

An another files contain

c:\jdk1.3\bin\pack1>

package pack1;

import pack.one;
public class two
{
public static void main(String ar[])
{
one o = new one();
o.display();
}
}

c:\jdk1.3\bin\pack1>javac two.java

it display 4 Errors in stmt.....

1.Package does not exits----->package.pack
2. cannot resolve the symbol
3.cannot resolve the symbol

please help me...
and ..thanks
WHERE U MENTION TWOCLASS
Apr 2 '07 #8
1. Create a directory structure outside JDKs dir structure, as JDKs dir structure has a certain format and the JVM reads it for certain reasons (like bootstrap and java extensions classloading etc)
(FYR-Take a look at:
http://java.sun.com/docs/books/tutorial/ext/basics/load.html)

2. Include the parent dir. of your package in the classpath, for example if you have your class that follows the package structure as myjava.util.MyClass

and the myjava directory is under C:\java\testcode, then in the classpath include C:\java\testcode, so that all packages under it are available.

3. It will help you if you use the right coding conventions from the beginning, for example, start the Class name with a Capital letter (e.g MyClass and not myclass), and use your method names starting with a small letter (e.g getData() and not Getdata() )

Happy learning, and enjoy!
Rommel Sharma.
Apr 3 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bob Walpole | last post by:
I am somewhat a novice with vb6 however I have completed a program which needs to be shared by several people if it is to be of major use. I have used the Package and Deploymnet Wizard so that I...
1
by: Onder Kaya | last post by:
Hello everyone, We are trying the compile this package but we get this error. PACKAGE BODY APPS.XNC_BOM_PVT On line:32 PLS-00358:'ASSEMBLY_ITEM_ID' exists in more than one table, use...
21
by: CBFalconer | last post by:
I released this under GPL some time ago, (2003-May) and have been advertising it occasionally here, where it seemed applicable. I have received no bug reports. I have just gotten around to...
5
by: Ray Tomes | last post by:
Hi Folks I am an old codger who has much experience with computers in the distant past before all this object oriented stuff. Also I have loads of software in such languages as FORTRAN and...
0
by: dashprasannajit | last post by:
package djvusearching; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.lucene.analysis.cjk.CJKAnalyzer; //import...
0
by: rameshpi | last post by:
iam developing a j2me application using midp2.0fcs api .in this api ,i did not find sql package.i want to connect to ms access from j2me application.i also imported javax.sql package(this package is...
0
debasisdas
by: debasisdas | last post by:
SAMPLE PACKAGE EX#3 ==================== PACKAGE SPECIFICATION -------------------------------------------- CREATE OR REPLACE PACKAGE MYPACK AS PROCEDURE SHOWENAME(EMPID IN NUMBER); FUNCTION...
1
by: shalini jain | last post by:
Hi all, I am very new to java and have a very limited knowledge about this. i am stuck at one problem which is really druving me crazy.. The problem is : I have written a code wherein I...
0
by: Mathieu Prevot | last post by:
2008/9/24 Jaime Huerta Cepas <jhuerta@cipf.es>: IMHO this is too complex to commit. Macport is a way to do what you want, but packages may not be up to date enough. Maybe the easiest and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.