Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 25-11-2009
Member
 
Join Date: Jul 2009
Posts: 154
problem in Importing packages

HI
When i started programming in java I started with an IDE. I used the IDE and learned how to make predefined classes and how to use it from outside its package. I am posting a simple example below
Code:
import myPackage.mClass;

public class ClassInOtherPac {

    public static void main (String[] args) {

              mlass myObj = new mClass();
    }
}
Now my question is how can I make the package importing when I an not using an IDE. because when i am in college we only use dos and old version of bluej. Please advice. i know this is a simple question but as I started form IDE, I do not know how to make it the other way.
Reply With Quote
  #2  
Old 25-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: problem in Importing packages

Hello
I think you want to say that the IDE would not generate the import line for you. Is this your question.
Quote:
import myPackage.mClass;

public class ClassInOtherPac {

public static void main (String[] args) {

mlass myObj = new mClass();
}
}

Last edited by Praetor : 25-11-2009 at 01:28 PM.
Reply With Quote
  #3  
Old 25-11-2009
Member
 
Join Date: Jul 2009
Posts: 154
Re: problem in Importing packages

Hi
Thanks for replying
That is the exact question. The problem is that I do not know exactly where to save the .class java file. I mean in which folder / package it will be located in so that I can call it. Is this is batch file I am referring to. please help. I think I do not have the basic knowledge of java, that is why I am going through just problems. And it was my big mistake to use the IDE at the staring of learning java. I am trying to improve it. Can you help please.
Reply With Quote
  #4  
Old 25-11-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
Re: problem in Importing packages

Hi
Well it is never late start studying java from the basics. No worries you can do it. And for your problem, you should have a source directory of something on which project you are working on. All the packages should be located there in a folder structure. I mean to say src/mypack and correspondingly all the class files will be located in this directory. This is the power of java. You can also use your own packages in other programs. But for now forget it, just study the basics.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "problem in Importing packages"
Thread Thread Starter Forum Replies Last Post
Troubleshooting wmv importing problem in Final Cut Express Benjhonson Windows Software 5 26-12-2010 10:21 PM
Problem importing a csv contact file into outlook 2010 beta T@abitha Windows Software 7 16-10-2010 09:07 AM
Problem importing mail with Thunderbird Corinne Technology & Internet 4 12-02-2010 10:45 PM
Problem in importing photos from Windows Vista Chandraa Portable Devices 4 12-01-2010 03:54 PM
Problem importing Outlook Express files to Thunderbird robin45 Technology & Internet 3 18-11-2009 05:13 PM


All times are GMT +5.5. The time now is 04:08 AM.