jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes please help import pakage how Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "please help import pakage how" Watch "please help import pakage how" New topic

please help import pakage how

Sahil Ji

Joined: Apr 04, 2012
Posts: 6
//first class in import folder

package importpackage;

public class HelloWorld {
public void show(){
System.out.println("This is the function of the class HelloWorld!!");

//second class immediately above importpackage folder

import importpackage.*;

class CallPackage{
public static void main(String[] args){
HelloWorld h2=new HelloWorld();

|--->importpackage ---->HelloWorls.java

C:\nisha\importpackage>javac *.java


C:\nisha>javac CallPackage.java *****ERROR importpackage does not exist************

Please solve problem

Thanks in advance

Helen Ma
Ranch Hand

Joined: Nov 01, 2011
Posts: 451
Try this:
C:\nisha>javac importpackage\CallPackage.java

In order to compile CallPackage under c:\nisha path, you need to specify where CallPackage.java is.
I agree. Here's the link: http://aspose.com/file-tools
subject: please help import pakage how
It's not a secret anymore!