Package(s) Automatically imported?

I am new to Java and studying for the SCJP. I ran across a statement that java.lang is automatically imported and it occurred to me that I have not been importing java.io in my initial test programs, but System.out.println() works... so my question is what packages are automatically imported in Java? Thanks.

Thanks for the response - here's how I arrived at my question:
I was looking at a simple example in a book:
import java.io.*;
public class DrinkJava {
public static void main(String args[]) {
System.out.println("Do you like to drink Java?");
I wondered what the import of java.io was for since I haven't been using it, so I went ahead and looked online at the Documentation > APIs > Core API Docs 6 and found "System" via All Classes. The "out" field is static PrintStream, and when I drilled down on it, the PrintStream class is in the java.io package. I noticed the class hierarchy showing it inheriting from the classes java.io.FilterOutputStream, java.io.OutputStream, and java.lang.Object. At this point I wondered if both packages were being automatically imported so the java.lang System class could use the java.io PrintStream class.

Similar Messages

  • One disadvantage of automatic import of Java lang package.

    When ever a new java class is added in java.lang package jdk people has to think one think in their mind. I have written one java class named com.myPack.Test if suppose the same class name is included in java.lang then that greatly affects all my programs.since java.lang is by default imported. i have to do lot of changes in my code.
    Can this be avoided. Can i avoid the default import of java.lang package by any means.
    Am i making sense.?

    thanks jsalonen and pbrockway2
    I understand but, Isn't it a Genuine requirement..?
    I have written a class say com.myPack.Test
    i am using this in some other package.
    i am importing this by the below statement
    import com.myPack.*;
    this package is extensivly used in many a packages.
    suppose in new JDK if the java.lang.TEST is written.
    In this case, it is a gereat overhead for me. i have to do lot of code changes right?.
    one solution can be replace all import com.myPack.* by
    import com.myPack.Test; but isn't it a great rework. which afects widely in all the applications right?..
    one other simple solution can be avoiding default import java.lang.* in certain packages alone, Isn't it?

  • Is there a way of getting Firefox to automaticly import the Explorer settings upon install?

    Hi!
    I'm trying to repack Firefox 3.6.3 into a MSI for a deployment install trough-out our organization. Since we're using Explorer as the default browser at the moment our users have all their bookmarks and such stored in Explorer. Now I'm wondering..
    Is there a way of getting Firefox to automaticly import the Explorer settings upon install?
    -Without having the wizard popup.
    I also don't want Firefox to be the default browser since the users have to decide for them self. But atleast they have there bookmarks / defaultpage and proxy settings if they decide to go for Firefox.
    Regards
    //MSI-Packager
    == This happened ==
    Every time Firefox opened
    == Firefox is installed ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.78 Safari/532.5

    I'm not sure if you have the capability, but did you try copying from your premiere sequence and then pasting into your after fx timeline? i was working with a MUCH shorter video with a mix of merged clips (interview footage) and video clips (b-roll). the video clips imported, but the merged clips did not. i put the timeline cursor to the right point in the after fx timeline, copied the premiere clip from the sequence, pasted it into after fx.

  • Howto: Automatically import files from folder at app launch!

    I've never used iPhoto much, but I am starting to like it. I don't exactly know why, but anyway. A thing I'd like to do (and I don't know if that's possible or not) is have iPhoto automatically import photos from one or more directories (or a directory + subdirectory) when I start the program. I've seen similar questions like mine, and some AppleScripts/FolderActions on how to make iPhoto launch and import files when they are put in a certain folder. But I'd prefer if it didn't automatically start. Sometimes I want to just drop some photos into a folder without wanting to look at/edit them right way, and so these scripts don't suit me. Perhaps what I want, can also be done with AppleScript (I know it's powerful!) but either way, I would appreciate if someone could help me out here or at least answer me if it can be done (in a way that is simple for me!).
    Thanks in advance!

    temhawk
    Go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
    Look there for a Folder called 'Auto Import'. Make an Alias to the Folder (File -> Make Alias)
    Drag the alias to the Desktop. *Make no other changes*.
    Pop files onto that Alias, they'll be imported next time you launch iPhoto.
    This seems to be an option that was being added to v7 and then not finished.
    You may also be able to concoct something with Automator or check out Hazel
    Regards
    TD

  • How do I stop iTunes from automatically importing songs I listen to from my external hard drive into the music library?

    How do I stop iTunes from automatically importing songs I listen to from my external hard drive into the music library?

    Mac OS X: Double-Clicking a File Opens the Wrong Application - http://support.apple.com/kb/TS2291
    -= Changing the application used to open all files of a certain kind (written with reference to OSX 10.4 but may not have changed) =-
    1) In a Finder window highlight a file of the kind you want to change the application to open that kind of file.
    2) While that file is highlighted, select File > Get Info or press command (apple or propeller icon) + i to get a file information window.
    3) In the lower part of the info window there is an "open with" menu with a list of applications.
    4) If your application is already in the box then it is the default application for opening that kind of file and you don't need to do anything more.  Close the get info window.
    5) If the application showing in the menu is not the one with which you wish to open the file then select a new application. If your application does not appear there then select the "other..." and track down the application (usually in the Applications folder at the main level of the computer).
    6) If you wish to change all files of this type to open with this application in future, make sure the "change all" button is selected.
    7) Close the get info window.

  • How can I (automatically) import new photos of the photostream on my local disc (Mac)? Don't want to use new icloud service. Simply import.

    New Photo app on Mac.
    How can I (automatically) import new photos of the photo stream on my local disc (Mac)? Don't want to use new icloud service. Simply import.
    With iPhoto every new photo was automatically imported and saved on my local disk (with "full resolution" that's what I only need). In the new photo app I have still my photo stream and when I move a photo (drag and drop from the photo stream) to a new album it indicates a (plus). My understanding is that the photo is now copied to my local disk. But when I deleted the photo in the photo stream it was also deleted in the album !?
    If that is the case I can use the photo stream only until I reach the max of 1.000 photos, then I have to delete photos and I will have no copy left.
    How can I "physically" copy a photo of the photo stream to my local disk? I just want to "transfer" all pictures taken with Ipads, Iphones to my central storage on the Mac. Please don't propose to connect it via iTunes (cable) to the Mac.
    Any other suggestions?
    thx
    -Tom

    The amazing device cannot do it because no amazing developer has written an app for it.  There is some interest, others have asked, but i have a hunch that the market is fairly limited, and no developer has jumped at the chance just yet.
    Any sort of tethered approach means try to feed the material to the pad thru the cck.  Which means the app would have to use the allowed/existing cck pathway in a manner that does not violate the sandbox rules.  That may be the problem.

  • Is there a way I can have Business Catalyst automatically import product content from Amazon? (e.g. a Web App I could build, perhaps?)

    I'm currently building a site using Drupal that is basically a huge book database and book review site. In order to acquire basic information about certain books I'm using an Amazon module that automatically pulls information into my Drupal database (such as author name, page count, publication date, etc.) based on any ASIN (Amazon Standard Identification Number) I enter. It's a pretty nice arrangement. Also, people can click on a link that leads them to the item on Amazon so that they can purchase it and I can collect a puny affiliate commission. Yay Internet!
    But I'd like to use Muse and Business Catalyst instead. I was able to create a Web App version of my database but I can't figure out how to 1) automatically import based on ASIN and 2) automatically link each book record in the database to its page on Amazon. Honestly, if I could just get the info into the database alone I'd be happy.
    I'm afraid that Adobe would have to create some sort of connection on their end that interfaces with the Amazon API - and therefore there is no way to create such a website now using Muse. But, of course, I don't know everything so I ask you all: is there a way this can happen now?
    Thanks for all of your input!

    To do stuff like that will always need custom coding and things like API work. You will never be able to use Muse for that, its a basic site design tool that can hook up to BC modules. You will need to use coding software and have custom API work done for things like this.

  • Is there a way to automatically import photos to a Lightroom collection?

    Hi!
    I'm coming from aperture (on the mac), where I used a program called hazel to automatically import photos into a project in Aperture.
    I'm wondering if there are similar automations for Lightroom? Thanks!

    I'm not sure I'm understanding you correctly.
    What I want is for lightroom to automatically import pictures that I put in
    a specified folder on my computer. In other words, I wouldn't do anything
    "manual" in LR at all - when I open lightroom, the pics in the specified
    finder folder would simply be there ...

  • Is there a way to automatically import artwork for music already in librar?

    Is there a way to automatically import artwork for music already in library?
    I just transferred all my music from a PC into my new mac.
    I saw a widget that fetches the album artwork from the web. great fun!!!
    Now is there a way to fetch all these artworks automatically.
    I did not use istore to buy the music - but imported from my cd collection.
    Thanks.
    What a great system - simple and no hassles. Thanks Apple. Goodbye PC.

    If you are using AlbumArt widget you can do this with the widget interface.

  • When downloading iTunes onto a new computer, is there any way to automatically import old music files? Last time I got a new computer I didn't have to use an external drive to update my music library.

    When downloading iTunes onto a new computer, is there any way to automatically important songs from your previous computer? I recently cracked the screen on my computer and cannot access any files. Last time I got a new computer my iTunes media files automatically appeared in my iTunes when I downloaded it, and I did not have to use my external drive. Is this still possible?

    If your backup copy of the old computer was not stolen, then use it to put everything back.

  • How do I keep itunes from automatically importing mp3's from other sources

    I merge multiple files into single mp3 files.  I used to be able to do this and add them to a folder to add to iTunes at a later point, at my leisure.  Now, when I merge these into mp3 files, they are automatically being added to iTunes and it is driving me nuts.  I use either internet explorer or google chrome.  I have since deleted chrome as this problem started soon after I installed chrome.  However, it is still automatically importing these files.  I want to add them, but at a later point, not automatically.  Any ideas on how I can make this stop?
    Thanks.

    Hmmm ... the only the possibility I can think of is that:
    something is causing Windows to open the mp3 files as soon as they are created, and
    iTunes is set as the default program for mp3 files
    This would result on the behavior you are observing, though I'm not sure what the "something" would be.  It may be worth trying this:
    In Windows Explorer, select any mp3 file
    right-click, select Open with and then Choose default program
    Is iTunes selected here, like this?
    If so, try changing the default to Windows Media Player, make sure the "Always use the selected program ..." box is checked, and click OK.
    Now try your mp3 joining process again - when it finishes, does the mp3 file now open in Media Player rather than being added to iTunes?  Even if so, this doesn't really solve the problem as I would expect the mp3 joiner program to just create the mp3 file and not subsequently try and open it ... however, this might give an indication whether this a direction to go in (or not).

  • How do I stop iTunes from automatically importing the songs I download?

    I usually end up deleting a bunch of songs, but iTunes is automatically importing/adding the songs I download which then creates a lot of missing file links. How do I stop iTunes from doing that, I just want to be able to add them manually by folders.

    I'm having a similar problem.
    When I download songs via my MobileMe "iDisk" webpage, it will automatically end up in iTunes and starts playing. I set up my iDisk settings to place my downloads on my desktop, which it does, just fine.
    Nonetheless iTunes ALWAYS wanting to be part of it, is really annoying.
    I just DON'T want iTunes to start up, just because a download finished. I add songs manually myself when I want it.
    Any advise ?? Thanks

  • How do I stop iTunes from automatically importing songs not from a CD?

    Hey,
    I downloaded a few songs from my e-mail that I received from a band and as soon as it finished, it automatically imported it to iTunes. I didn't want it to do that and it did it with every track. How do I stop it from doing that?

    Mac OS X: Double-Clicking a File Opens the Wrong Application - http://support.apple.com/kb/TS2291
    -= Changing the application used to open all files of a certain kind (written with reference to OSX 10.4 but may not have changed) =-
    1) In a Finder window highlight a file of the kind you want to change the application to open that kind of file.
    2) While that file is highlighted, select File > Get Info or press command (apple or propeller icon) + i to get a file information window.
    3) In the lower part of the info window there is an "open with" menu with a list of applications.
    4) If your application is already in the box then it is the default application for opening that kind of file and you don't need to do anything more.  Close the get info window.
    5) If the application showing in the menu is not the one with which you wish to open the file then select a new application. If your application does not appear there then select the "other..." and track down the application (usually in the Applications folder at the main level of the computer).
    6) If you wish to change all files of this type to open with this application in future, make sure the "change all" button is selected.
    7) Close the get info window.

  • Automatic import of material data (csv file) from FTP directory

    Hello Experts,
    We created a Scheduled Task -> Data Import Monitor -> from a FTP directory.
    We loaded the .csv file with material data in the FTP folder but it is not getting imported.We have created the .csv file with the format of fields defined in Company quick start Work book -> Material tab. We also tried with a .csv file having first Field as CLASS_NAME with a value of masterdata.Material and rest of the fields same as defined in the Company quick start-Materials Tab still it did not work.
    When we load the .xls work book in FTP directory (xl having the Configuration tab and Material tab) the data import is working fine and the data is getting loaded automatically from the data import monitor job.
    Is there any specific format of .csv file in which the material data needs to be loaded to the FTP server for automatic import of data using Scheduled task?
    Regards
    Aditya

    Are there any errors appearing in the FPA logs?
    Have you checked the permissions on the folder/file that you are uploading from?
    What type of scheduled task have you created?

  • Automatic import

    I'm importing DV content from a Canon ZR90 camera (4-5 years old model).
    - iMovie does not let me set the import as automatic. It is always on manual. So I assume the automatic mode only works with certain camera model?
    - My actual setup is VCR (VHS) -> Canon setup as passthough in DV -> iMovie09
    Problem: every couple of minutes, there seems to be break in the video from the VCR. Unfortunately, iMovie then stops recording, and I have to manually restart the import to continue the recording. I would like this to be done automatically. Is this what the automatic import feature is about?

    FYI here is the solution: http://www.lifehacker.com/software/itunes/hack-attack-automatically-sync-itunes- to-any-folders-175161.php
    After some searching I was able to find this which will automatically import anything you put in the iTunes folder, or additional folders if you wish.
    HAHA Guess I answered my own question. Thanks for the help anyway.

Maybe you are looking for