creating packages in java

creating packages in java

Hi everybody, I am Rupesh Narayan, i faces a problem while creating package in core java. I write two programs that are described below:-

1.PackageDemo.java package javaclass; import java.io.*; public class PackageDemo { private int n; public PackageDemo() { n=1; } public int getNumber() { return n; } }

2.Package.java

package javaclass; import javaclass.*; import java.io.*; public class Package { public static void main(String args[]) { PackageDemo obj=new PackageDemo(); System.out.println(obj.getNumber()); } }

the structure of files are as shown below

D:\Package | | | javaclass(folder) | | | PackageDemo.java | Package.java

Error :package javaclass does not exist import javaclass.PackageDemo ^ cannot find symbol symbol :class PackageDemo location : class Package PackageDemo p=new PackageDemo(); ^

   cannot find symbol 
   symbol :class PackageDemo
   location : class Package
   PackageDemo p=new PackageDemo();
                     ^

same thing working well with windows XP but cause problem with windows7

View Answers









Related Tutorials/Questions & Answers:
creating packages in java
creating packages in java  Hi everybody, I am Rupesh Narayan, i faces a problem while creating package in core java. I write two programs that are described below:- 1.PackageDemo.java package javaclass; import java.io.*; public
Java packages
Java packages  What restrictions are placed on the location of a package statement within a source code file
Advertisements
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
packages
packages  how to work with packages in java?   Have a look at the following links: http://www.roseindia.net/java/tools/master-java/java-package.shtml http://www.roseindia.net/java/master-java/java-package.shtml
java.net packages - Java Beginners
java.net packages  Tell me some impotant classes to used in java.net packages?  hi friend, import java.net.*; import java.io...., http://www.roseindia.net/java/network/index.shtml Thanks
util packages in java
util packages in java  write a java program to display present date and after 25days what will be the date?   import java.util.*; import java.text.*; class FindDate{ public static void main(String[] args
Java Packages - Java Beginners
Java Packages  how to write a package by getting the inputs from the user?(ex: student details and staff qualification in one package)and also to compile and run this program
Creating a memory leak with Java
Creating a memory leak with Java  Creating a memory leak with Java
JAVA PACKAGES - Java Beginners
JAVA PACKAGES  I HAVE A DOUBT. I CRATED A PACKAGE BUT I AM NOT ABLE TO IMMPORT ANY FILES TO THE ANOTHER PACKAGE HOW CAN I IMPORT ANY PACKAGE FROM...://www.roseindia.net/java/master-java/index.shtml Thanks. Amardeep
packages - Java Beginners
Java package creation example  What is Package in Java? How can i create a package in Class
io packages - Java Beginners
io packages  How can I add two integers in java using io pacages
Java package,Java Packages
of packages A hierarchical naming pattern is used for java packages, with levels... Packages in Core Java Package Description... Java Package      
packages
"); it compiles succesfully but when i do c:\world>java world.HelloWorld
creating Xml - Java Beginners
creating Xml  how we can create a xml file using java Creating XML File is possible in java with this packages. import... this Elemnts to DOcumnet object. Creating XML File is possible  Creating XML File is possible
Creating PDF in JAVA
Creating PDF in JAVA  How create pdf in java ? Take value from database for particular PDF
creating reports in java
creating reports in java  how to create reports automatically in java and send it via mail by scheduling tine for weekly,monthly basis
creating JAR - Java Beginners
creating JAR  I am beginner in J2ee.I am creating an application... installed SQL and Tomcat.I created a JAR of my java project and included in the library of web project. My problems 1. I added new class in the java project
creating java classes
creating java classes  Create a Java class that can be used to store inventory information about a book. Your class should store the book title... a program that tests your class by creating and using at least two objects of the class
Hi...doubt on Packages - Java Beginners
Package in java.. I have downloaded one program on Password Authentication... ..Explain me.  Hi friend, Package javax.mail The Java Mail API allows the developers to add mailing functionalities to their java applications
Creating URL in java
Creating URL in java  Hii to all I m trying to create a url using java. Address is http://www.merchant.com/pg/index.html When i m going to run...[] args) { try { // // Creating
creating java classes
creating java classes  This program uses a class named DrivingLicense to keep track of two driving licenses, including the driver?s name, and the number of speeding tickets they have received. You may not modify the DLTest code
java coding for creating table in the console
java coding for creating table in the console  write a java program to create table
creating an .exe file - Java Beginners
creating an .exe file  how to create an .exe file in java? thanks in advance
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings
Creating Excel sheets - Java Beginners
Creating Excel sheets  Hi, I want the java code for creating excels sheets with two workbooks using POI, and to find the difference between the particular value of one cell and others. asuming the contents of teh files adn
Creating JAR File - Java Beginners
Creating JAR File  Respected Sir, Thankyou very much for your reply, I had tried what you told me. The same error is coming back again to me, which says, Failed to load Main-Class manifest attribute from H:\Stuff\NIIT\Java
creating multiple threads - Java Beginners
creating multiple threads  demonstrate a java program using multiple thread to create stack and perform both push and pop operation synchronously.  Hi friend, Use the following code: import java.util.*; class
creating a modal frame - Java Beginners
creating a modal frame  i have a JFrame with 2 textfields. i want that this frame should open in a modal mode. how to do this? please tell. thanks
creating browse button - Java Beginners
creating browse button  how can we create a browse button along with a textfield in java swings.  Hi friend, import... on Java visit to : http://www.roseindia.net/java/example/java/swing/ Thanks
Creating JAR File - Java Beginners
Creating JAR File  Respected Sir, I would like you to please help me, in letting me know, as to how to create JAR file from my JAVA source or class files. And what is this manifest file, and what changes needs to be done
Java GUI code- creating a circle
Java GUI code- creating a circle  My assignment is to write a program that prompts the user to enter the center and a point on the circle, which is (x,y)(x2,y2). The program should then output the circle's radius, circumference

Ads