Packages that java normally already imports

I am trying to get back into programming, and I remember awhile ago being told that java automatically imports certain packages, like java.lang, and maybe a couple more. I tried to test that out by using methods withing java.lang, or java.util, or java.io without importing those packages.
So I tried to test out java.util. I created an Arrays class without explicitly importing java.util. But my programming didn't recognize the class. I think it is possible that because of my directory structure the imports isn't working. But I'm not exactly sure how to make java see the packages in it's correct directory. Anybody can help? A more extensive question...what kind of environment does everybody use to code (windows environments please, that's what I'm using, I haven't set up a Linux box yet).

I am trying to get back into programming, and I
remember awhile ago being told that java automatically
imports certain packages, like java.lang, and maybe a
couple more. I tried to test that out by using
methods withing java.lang, or java.util, or java.io
without importing those packages.
So I tried to test out java.util. I created an Arrays
class without explicitly importing java.util. But my
programming didn't recognize the class. I think it is
possible that because of my directory structure the
imports isn't working. But I'm not exactly sure how
to make java see the packages in it's correct
directory. Anybody can help? A more extensive
question...what kind of environment does everybody use
to code (windows environments please, that's what I'm
using, I haven't set up a Linux box yet).Only the public classes in the package java.lang are automatically imported. Here is some more information about packages from Sun's java tutorial:
http://java.sun.com/docs/books/tutorial/java/interpack/packages.html

Similar Messages

  • How do I move photos that I've already imported?

    I've imported some photos to the wrong folder.  I could use IOS Finder to move the photos, but I worry that the links to LR will be loss.  How do I move photos within LR?
    Thanks,

    You can drag and drop photo(s) entirely in Lightroom to a different folder in the Library Module Folder Panel (on the left).
    Alternatively, you can move the photos in your operating system and reconnect via: Adobe Lightroom - Find moved or missing files and folders

  • JSP import self made Package that imports another self made package!

    I also posted under JSP section.
    I really need an answer please.
    Quite new to JSP & java. Not sure about how to use import properly for my problem below:
    Using Tomcat4.12 & jdsdk1.4 on WinXP
    So I create a package - lets call it p1.
    For all java files that belong to this packge I put on the top line of code:
    package p1;
    All files of package p1 are put in Tomcatdir\webapps\myapp\WEB-INF\classes\p1
    everything complies & the packge runs fine - theres a servlet in it & I'm happy.
    Now I create a new package to go with my webapp. Lets call this p2.
    However there is a java file in p2 that uses a class from p1 package.
    So in that file I put:
    import p1.theclassname;
    However this will not work because this line refers to:
    Tomcatdir\webapps\myapp\WEB-INF\classes\p2\p1
    so it will not find the class. Because its in:
    Tomcatdir\webapps\myapp\WEB-INF\classes\p1
    Anyway I can make it comple by moving files about & making a more complex dir structure & more complex package names - but this cant b the propler way to do it?????
    Anyway with my quick fix to this problem I cause a new porblem - in my jsp files that use both packages I cant import the classes I needas the are all complied in packages that are now in the worng place on the hard drive!
    I also tried doing this by just having p1 where it was to start with & then instead of making p2 - I'd just complie it in the classes folder & have it import p1. This works fine until I try to import the classes in JSP - I tried things like:
    <%@ page import=".*" %>
    but it doesnt work unless its in a packge like
    <%@ page import="p2.*" %>
    but if its in a package then the sturcture to the other packge is all wrong again!!!!!!!!
    I hope someone knows what I'm going on about.
    Please help me.

    you are answer izzaman's problemYes
    he has solve already,
    right?Well, I wasn't sure if he really solved it, or just found an ugly workaround, so I wanted to make sure it wasn't the latter.
    can you help me to clear me doubt also. I'm new
    to Java. my problem has been posted earlier....I don't know specifically how to fix your problem. It's probably a classpath issue, though it may also be some simple oversight like a misspelling or something. It's hard to say without more details. If it is a classpath issue, then whatever izzaman did may also work for you. I haven't done much with servlets and JSP lately, and when I have, I've never had classpath problems, so I don't know what kinds of issues are common there.
    I would suggest starting a new thread for your problem. That's generally what you should do anyway, and it will get more notice if it's in its own thread. Don't put it in Adanced Language Topics though. Put it in the JSP forum or Java Programming.
    Good Luck!

  • How do I edit (import into VS 2012) an SSIS package that was deployed in SSISDB

     
    Greetings,
    I inherited an SSIS package that is already deployed and scheduled.
    Using the Microsoft SQL Server Management Studio, I can see that the package was deployed to Integration Services Catalog and resides in the SSISDB.
    I am working directly on the server desktop with SSMS and Visual Studio 2012.
    I'd like to open this package (the one that is actually deployed) in VS in order to test it and repair any issues if necessary (and then re-deploy it, etc.)
    How can edit a package that has already been deployed?  I tried exporting the Project from its deployed SSISDB location using SSMS, but when I do this it creates a file that takes me through
     a wizard that wants me to deploy the package to a server again. My goal is to edit a package from a deployed source.... not sure how to get it into VS for review/editing. 
    Many Thanks!

    "When you were trying to export, it was correct step. You need to follow that step by step wizard"
    Many Thanks for the reply. I guess I don’t understand. It looks to me like the Export Wizard is trying to deploy the project into production somewhere (asking me to specify server,
    etc.).
    I don't want to deploy it anywhere since it's already deployed. I want to edit a project that has been deployed (i.e. pull it from its deployed location)  so that I can review and edit
    it 1st. Then, once I edit the project I would re-deploy it (presuming I need to import it into SSDT from its' deployed location....that is the part I don't understand).  Thanks again for your assistance with this stuff.
    If Exporting project is confusing for you then Use Option A provided in below blog.
    You need to create new SSIS project in your local and Import deployed project so that you can edit them there.
    http://www.mssqlgirl.com/editing-published-ssis-package-in-sql-server-2012.html
    -Vaibhav Chaudhari

  • How to import DBMS_LOB package in java

    hi
    how we can use pl/sql's package in java
    any body can help me
    where i can found harachy of DBMS_LOB package
    to include in my java or jsp program
    thanx

    perhaps this topic can help :
    Calling PL/SQL from Java
    and the use of DBMS_LOB package is here:
    Supplied PL/SQL Packages and Types Reference Contents / Search / Index / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96612.pdf
    Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
    http://otn.oracle.com/pls/db92/db92.docindex?remark=homepage
    I hope that can help you. Perhaps another person can give the excat code.
    Good luck!
    Joel P�rez

  • How to import one package in another package in java

    HI ,
    I want call a class which is located in package pckage1 into another package package2s class..
    could any one help me on this...
    realy that would be appricateble

    Use import package.ClassName;

  • Is there a Java Graphic Package that doesn't depend on DISPLAY?

    Hi
    Is there a Java Graphic Package that doesn't depend on DISPLAY?. I need to generate some images on the web and I can't guarantee that the DISPLAY variable is set correctly.
    Regards,
    N�stor Bosc�n

    Hello,
    Previously to JDK 1.4 the DISPLAYwas mandatory and most of the production Web sites were running a virtual X server (XVFB) take a look to this document
    However using JDK 1.4 or after you should not need to set the display anymore. Java contains now a headless that you set the Java properties java.awt.headless to true (java -Djava.awt.headless=true ...)
    Regards
    Tugdual Grall

  • I am having trouble trying to import a 2 disc CD album.  This used to be so easy.  Not anymore.  Disc 1 shows  up--Not disc 2.  So when I reimport, I am always told that I have already done it.  But where is it?  I am NOT LIKING THIS NEW I-TUNES!!!!!

    I have tried for HOURS TO import a 2-disc CD.  And I do mean hours! Disc 1 --fine. Disc 2-NO!  I can never find it.  It does not show up in the library.    So, when I do it again, I am told that it has already been imported. But where is it!!!!  It does NOT show up with disc 1.
    I DO NOT LIKE THIS NEW ITUNES--AT ALL.  NOT ALL UPDATES ARE GOOD ONES!!!!!

    Have you tried making a smart playlist to find anything recently added to your library? The track info retrieved from the Internet during the import might have been wrong, causing Disc 2 to be categorized as something else entirely. (I've had that happen before. Since I have a large library, I could not find the CD after import by just browsing through my album/artist list.)
    What I've done is make a smart playlist with the criteria of Date added is in the last 1 days. (or whatever number of days you want)
    If the CD has indeed been imported, it will be on that playlist. If it isn't there, then I'm not sure what the issue could be.

  • How to import images that have the same name as images already imported

    I am trying to import images into LR3.  I have a number of images with duplicate names.  Some of them are duplicate images that I simply have stored in different directories and some are images that are not duplicates but have the same name.  LR3 refuses to import any images that has the name of an image that has already been imported.  Is there anything I can do about this.  If not, it kind of makes the softwares useless to me.
    In hopes of a solution . . .
    --Kenoli

    Thanks.  I'm sure making sure all file names are discrete makes sense.  I guess I need to find some kind of bulk re-name utility. 
    Additionally, I am dealing with a very large set of unorganized images and one of the uses I would like to put LR3 to is to organize the images into directories and get rid of duplicates while inspecting them to make sure that I don't trash differing images with the same names.  One of the challenges is identifying these images so I can re-name them.
    I have been working with Apple's Aperture, which doesn't rely simply on the name to identify images since it uses a more complicated algorithm to differentiate images from each other.  It is one thing I really like about Aperture.  What I like about LR3 is that it lets me use actually file directories to store images rather than moving them into its own file system like Aperture does.  I don't like having files locked into a system that is software dependent.
    Also, I finally found the checkbox that tells LR to import "duplicates."  I couldn't find it before.  I don't find LR3 as intuitive as I'd like.  I've always had to spend more time figuring out how Adobe software does things than I would like. I've had little luck with Adobe's support site, aside from this forum.
    Thanks for you helpful suggestions.
    --Kenoli

  • I already installed parallel dekstop n microsoft windows 7 proffessional 64 bits..my question is is it the microsoft windows 7 that i installed already have microsoft office package as well? or i need to install it by myself? and how to install it?

    i already installed parallel dekstop n microsoft windows 7 proffessional 64 bits..my question is is it the microsoft windows 7 that i installed already have microsoft office package as well? or i need to install it by myself? and how to install it?

    No it does not!
    Windows and MS Office are two independent products. You will either have to buy an MS-office-license for your needs or you apply to office 365, you can activate up to 5 licenses at a time with your account and e.g. use them for the Parallels-Windows and for the native Office for Mac at the same time.
    Office 365 comes in for approx 80€ a year, so if you need more than one license it is the better deal.

  • Problem with "package-info.java" using EJB 3.0 and OC4J

    Hi all.
    I already posted this question on JDeveloper forum, but didn't get any answer,
    so I'll try posting here.
    Anyway, I'm new both to JDeveloper and J2EE,
    so I'm trying out examples for EJB 3.0, and I got stuck at "Use Security Annotations with EJB 3.0"
    (http://www.oracle.com/technology/tech/java/oc4j/ejb3/howtos-ejb3/howtoejb30security/doc/how-to-ejb30-security-ejb.html).
    Example code is working perfectly, if one builds it using Ant, but I'm importing all examples into JDeveloper (or at least I'm trying to :))
    JDeveloper can't build file "package-info.java" containing following code:
    @javax.annotation.security.SecurityRoles(roleNames={"superuser", "user"})
    package oracle.ejb30;I'm getting following output in "Compiler - Log" window:
    Error(2,1): 'class', 'interface', or 'enum' expected.
    Help much appreciated...
    platform used:
    Windows XP SP2
    JDeveloper Studio (Version 10.1.3, Build 3412)
    JDK 1.5_06
    OC4J 10.1.3 developer preview 4 (standalone version)

    Since you're using EJBs, you can use JTA and can skip the getTransaction() calls. If you want to use getTransaction().begin() and commit(), then make sure that your EntityManager is resource-local. The configuration for this is in persistence.xml. Set a transaction-type of RESOURCE_LOCAL rather than JTA.

  • Where can I find/download the package that contains: OracleConnectionPoolD

    Hi,
    I have classes12.zip and can make successful database connections using Oracle's JDBC driver.
    However, when I tried to run a connection pooling example - from a text book (called "PooledExample.java") - I got the following error messages...
    C:\testdart\testdart\source>javac PooledExample.java
    PooledExample.java:5: package oracle.jdbc.driver does not exist
    import oracle.jdbc.driver.*;
    ^
    PooledExample.java:7: package oracle.jdbc.pool does not exist
    import oracle.jdbc.pool.*;
    ^
    PooledExample.java:15: cannot resolve symbol
    symbol : class OracleConnectionPoolDataSource
    location: class PooledExample
    OracleConnectionPoolDataSource poolDataSrc =
    ^
    PooledExample.java:16: cannot resolve symbol
    symbol : class OracleConnectionPoolDataSource
    location: class PooledExample
    new OracleConnectionPoolDataSource();
    ^
    4 errors
    Where can I find/download the package that contains these classes (I'm assuming that there missing)? Is it possible that JDBC 2.0 works for Oracle9i only? (I'm using Oracle8i)
    I looked on Oracle's website but its not clear where to download this API
    Thanks!!!

    They should be in classes12.zip (oracle.jdbc.driver definitely is). It sounds like you don't have classes12.zip in your classpath when you are compiling. Normally you don't use the Oracle classes directly so you only need classes12.zip when running your application but in your case you are directly referring to them in your Java source code so you need them when you compile.
    Col

  • Remote execution of DTS packages from Java Stored Procedures

    I'm an Oracle 10G DBA and Linux/Unix Sysadmin looking for a Java guru to help me find a reusable template or locate a solid programming methodology (examples) that will enable me to connect via JDSI to SQL Server 2000/2005 and remotely execute DTS packages from within Oracle. I am working at office that's absolutely addicted to MicroSlop products and the DBA team cannot conceive of giving up their precious DTS packages. I've already converted their MS SQL Server 2000 database to Oracle 10G on RHEL4 via SQLDeveloper but I am unschooled in the art of java programming and would like to locate some sort of rudimentary template or examples or java class that can easily be loaded into the Oracle 10G database instance via the loadjava utility. These java classes/methods/stored procedures need to be executable from within embedded PL/SQL code and able to connect to SQL Server 2000 to execute DTS packages via passing dtsrun commands ... Any help or direction would be greatly appreciated.

    Hi Ilford:
    Sure you can use fully package notation in your Java classes.
    Look at this Java source code:
    http://dbprism.cvs.sourceforge.net/dbprism/cms-2.1/src/com/prism/cms/core/
    All of them are Java Stored procedures.
    Best regards, Marcelo.

  • Package zzz not found in import (server side classes)

              Hi,
              I'm trying to use the "Web Application" feature in WL 5.10
              (with no service pack). My application contains a couple of
              servlets, a couple of server side classes, and a couple of
              jsp pages.
              I created the WEB-INF\classes directory structure both in
              public_html and in my application's root directory. I
              modified setEnv.bat to contain the two directories in
              ClassPath and compilation of my servlets from the command
              line completes OK (the servlets import a package that sits in
              public_html\WEB-INF\classes).
              However, when I try to import the same package from a jsp
              file, I get the "package zzz not found in import" error
              message. The trace shows that the java compiler invoked
              after the servlet has been generated does not contain
              public_html\WEB-INF\classes in the ClassPath, but contains
              public_html\my_app\WEB-INF\classes.
              How can I specify that the java compiler should look under
              public_html\WEB-INF\classes for server side classes? Is there
              another solution and am I even using the right approach?
              Thanks,
              Vladimir
              

              Vladimir wrote:
              >
              > Hi,
              >
              > I'm trying to use the "Web Application" feature in WL 5.10
              > (with no service pack). My application contains a couple of
              You should install the service packs, your problem will probably
              disappear then.
              Web Apps are better supported with service packs.
              > servlets, a couple of server side classes, and a couple of
              > jsp pages.
              >
              > I created the WEB-INF\classes directory structure both in
              > public_html and in my application's root directory. I
              > modified setEnv.bat to contain the two directories in
              > ClassPath and compilation of my servlets from the command
              > line completes OK (the servlets import a package that sits in
              > public_html\WEB-INF\classes).
              >
              > However, when I try to import the same package from a jsp
              > file, I get the "package zzz not found in import" error
              > message. The trace shows that the java compiler invoked
              > after the servlet has been generated does not contain
              > public_html\WEB-INF\classes in the ClassPath, but contains
              > public_html\my_app\WEB-INF\classes.
              >
              > How can I specify that the java compiler should look under
              > public_html\WEB-INF\classes for server side classes? Is there
              > another solution and am I even using the right approach?
              >
              Setting the WEBLOGIC_CLASSPATH should do the trick. Look in weblogic
              start file (On NT startWeblogic.cmd)
              > Thanks,
              > Vladimir
              

  • Why is iPhoto 11 not recognizing already imported photos from 4S?

    I just plugged my 4S into my iMac i3, which is running OSX 10.8.2 and iPhoto 11' all products are up to date on software updates. I wanted to removed some videos off my 4S to free of some space on the phone.  I normall use icloud for all photo syncing and what not so plugging my 4S into the imac is not a common thing for me. 
    After opening iPhoto I noticed that the photos that were selected as "New Photos" were most duplicates of older photos that were already in my iPhoto library, some dating back a couple of years ago.  I keep copies of them on my iphone to show people when I'm away from my imac.  What I don't understand is why is iPhoto thinking these are "New Photos" and not "Already Imported" photos?  What is even stranger is that when I look in the "Already Imported" photos, those same photos (the ones that iPhoto wants to now import again) are showing up there too. 
    So my dilema is, that iPhoto is saying that out of 1,289 photos on my 4S, 354 are "New Photos" to be imported but about 250-300 of those are NOT new, they already exist in my iPhoto library. Why is iPhoto not reconizing already imported photos? 
    Also, if I am using Photo Stream to sync my photos across everything.. why do I even have any new photos to import??  Shouldn't everything already be there when I open up iPhoto, why would I need to import any photos from my 4S if icloud and Photo Stream work correctly with iPhoto 11' ?  I have checked and made sure numberous times that I have Photo Stream and icloud turned on in all the correct places and devices.  
    What I'm currently using:  iPhone 4S iOS 6.0.1 and iMac i3 OSX 10.8.2 and iPhoto 11' version 9.4.2

    You'll need to create a new, temporary library and import into that with the option to delete from your iPhone. Then delete the library and go back to your current library.
    OT

Maybe you are looking for