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 javacreating 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 packagesJava packages What restrictions are placed on the location of a package statement within a source code file
Advertisements
packagespackages 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
packagespackages 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
packagespackages 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
packagespackages 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
packagespackages 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
packagespackages 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
packagespackages 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
packagespackages 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
packagespackages 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
packagespackages 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
packagespackages 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 Beginnersjava.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 javautil
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 BeginnersJava 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
JAVA PACKAGES - Java BeginnersJAVA 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
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 Beginnerscreating 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 JAVACreating PDF in JAVA How create pdf in
java ? Take value from database for particular PDF
creating reports in javacreating 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 Beginnerscreating 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 classescreating 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 javaCreating 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 classescreating 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
Creating Excel sheets - Java BeginnersCreating 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 BeginnersCreating 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 Beginnerscreating 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 browse button - Java Beginnerscreating 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 BeginnersCreating 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 circleJava 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