Help with package

i am new to oracle. i am trying to create a package which does a simple insert. but i am getting the following error can any one help me with this:
**Error starting at line 1 in command:**
**BEGIN**
**WriteEntry('nam', 'sub', 'syster','hp',1,'transName','abs','labelvaluesdds','ghhehe',5);**
**END;**
**Error report:**
**ORA-06550: line 2, column 5:**
**PLS-00201: identifier 'WriteEntry' must be declared**
**ORA-06550: line 2, column 5:**
**PL/SQL: Statement ignored**
**06550. 00000 - "line %s, column %s:\n%s"**
***Cause: Usually a PL/SQL compilation error.**
***Action:**
below is the package code:
create or replace
PACKAGE "PKG_ABC" as
     procedure WriteEntry(
          app VARCHAR2,
          sub VARCHAR2,
          userId VARCHAR2,
          Code VARCHAR2,
          sessionId number,
          transName VARCHAR2,
          det VARCHAR2,
          lab VARCHAR2,
          value VARCHAR2,
          class number
end;
create or replace
PACKAGE BODY "PKG_ABC" as
     procedure WriteEntry(
          app VARCHAR2,
          sub VARCHAR2,
          userId VARCHAR2,
          Code VARCHAR2,
          sessionId number,
          transName VARCHAR2,
          det VARCHAR2,
          lab VARCHAR2,
          val VARCHAR2,
          cl number
     ) is
     begin
          INSERT INTO TAB_abc (
               ID,
               TIME,
               APP_NAME,
               SUB_NAME,
               USER_ID,
               COMPANY,
               SESSION_NUMBER,
               TRANSACTION_NAME,
               DET,
               LAB,
               VAL,
               CLA
          ) VALUES (
               123456,
               SYSDATE,
               app,
               sub,
               userId,
               Code,
               sessionId,
               transName,
               det,
               lab,
               val,
               cl
end WriteEntry;
end;     
grant execute on PKG_ABC to public;
can anyone let me know what is the problem with the package.

hi,
thank you all for helping me. i have completed the package but i am getting the below error when i am trying to compile the package:
Error(26,1): PLS-00103: Encountered the symbol "CREATE"
below is the package code:
create or replace
PACKAGE PKG_LOGGER as
     procedure Write_Log_Event_Detail(
applicationName VARCHAR2,
          subsystem VARCHAR2,
          userId VARCHAR2,
          companyCode VARCHAR2,
          sessionId number,
          transactionName VARCHAR2,
          details VARCHAR2,
          label VARCHAR2,
          value VARCHAR2,
          logLevel number);
     procedure Write_Log_User_Log(
receiverCompanyCode VARCHAR2,
          actionTag VARCHAR2,
          userCompanyCode VARCHAR2,
          userName VARCHAR2,
          description VARCHAR2,
          sessionNumber number,
          sessionType VARCHAR2,
          actionDetail VARCHAR2);
end;
create or replace
PACKAGE BODY PKG_LOGGER as
     procedure Write_Log_Event_Detail(
applicationName VARCHAR2,
          subsystem VARCHAR2,
          userId VARCHAR2,
          companyCode VARCHAR2,
          sessionId number,
          transactionName VARCHAR2,
          details VARCHAR2,
          label VARCHAR2,
          value VARCHAR2,
          logLevel number
is
     begin
          INSERT INTO EVENT_DETAIL (
               EVENT_ID,
               EVENT_TIME,
               APPLICATION_NAME,
               SUBSYSTEM_NAME,
               USER_ID,
               COMPANY_CODE,
               SESSION_ID,
               TRANSACTION_NAME,
               DETAIL,
               LABEL,
               VALUE,
               CLASS
          ) VALUES (
               LOG_ID.nextval,
               SYSDATE,
               applicationName,
               subsystem,
               userId,
               companyCode,
               sessionId,
               transactionName,
               details,
               label,
               value,
               logLevel
end Write_Log_Event_Detail;
procedure Write_Log_User_Log(
receiverCompanyCode VARCHAR2,
          actionTag VARCHAR2,
          userCompanyCode VARCHAR2,
          userName VARCHAR2,
          description VARCHAR2,
          sessionNumber number,
          sessionType VARCHAR2,
          actionDetail VARCHAR2)
is
seq_ID NUMBER :=0;
message VARCHAR2(2000) := null;
select Child_LOG_ID.nextval into seq_ID from dual;
begin
     INSERT INTO Table_LOG
     (LOG_ID,
     RECEIVER_COMP,
     ACTION_TAG,
     USERNAME_COMP,
     LOG_DATE,
     USERNAME,
     DESCRIPTION,
     SESS_NUM,
     SESSION_TYPE)
VALUES
     (seq_ID,
     receiverCompanyCode,
     actionTag,
     userCompanyCode,
     SYSDATE,
     userName,
     description,
     sessionNumber,
     sessionType);
message := actionDetail;
if message is not null then
INSERT INTO Table_LOG_DTL
(LOG_ID,
LOG_DTL_ID,
LOG_TIMESTAMP,
LOG_LEVEL,
LOG_MSG)
VALUES
(seq_ID,
LOG_ID.nextval,
SYSDATE,
1,
message);
end if;
end Write_Log_User_Log;
end;
grant execute on PKG_LOGGER to public;
Edited by: 961352 on Sep 26, 2012 10:01 AM

Similar Messages

  • Guess I do need a little help with packages after all...

    Tried figuring in this out for the past 3 hours, various searches, scenarios etc...b4 posting....
    Okay, well....just like many aspects of this language, think I've got it down, and a
    new situation comes up where I can't implement it....in this case my own packages.
    (which is frustrating, but good because teaches troubleshooting, ingranes
    things into my peanut)
    Have done it before through tutorials...but now am having an issue...here we go:
    These are very small files..... 3 classes/one main
    http://www.cadenhead.org/book/24java/chapter10.shtml
    (see bottom for direct links)
    What I did first was put them in c:\java\2\modems
    compiled them all, everthing works great.
    #2
    I deleted the class files, and put all of the source into: c:\java\2\
    #3
    I edited the first 3 files to have the very first line ot each say:
    package com.modempack;
    No other edits, just this simple copy/paste at the top of each of those files
    #4
    For the file TestModems.java the only edit made was to put the following line at the top of the file:
    import com.modempack;
    #5 Compiled the first 3 files with the command "javac -d . FILENAME.java"
    they compile fine(you have to compile Modem.java 1st)
    #6 Try to compile the TestModems.java file with the same style or even just "javac Testmodems.java" and get the following error:
    C:\java\2>javac TestModems.java
    TestModems.java:1: package com does not exist
    import com.modempack;
    ^
    TestModems.java:5: cannot access CableModem
    bad class file: .\CableModem.java
    file does not contain class CableModem
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    CableModem roadRunner = new CableModem();
    ^
    2 errors
    It says package "com" does not exist" ...but it's created automatically when compiling the 1st 3 files....am at a lost.........could only think classpath issue somehow.....
    CableModem.java
    http://www.cadenhead.org/book/24java/source/chapter10/CableModem.java
    DslModem.java
    http://www.cadenhead.org/book/24java/source/chapter10/DslModem.java
    Modem.java
    http://www.cadenhead.org/book/24java/source/chapter10/Modem.java
    TestModems.java(the main app)
    http://www.cadenhead.org/book/24java/source/chapter10/TestModems.java

    Thank you for your response once again
    (assigned u the dukies from last thread)
    Argggghhhh!!!!! / Yippie Kayay!!!!!!!!!!!!!!
    Man oh man... HUGE headache....(wanting to studying the stuff from last post you helped on...having troubles with freaking packages SUCKS:) :) :)
    (but...will am learning, so that's good)
    Sooo....
    I put the actual ".java" files in the same directories, but that did not make a difference....
    So what I did was use the fully qualified /explicit name for each class.
    IE:
    import com.modempack;Gives the original 2 errors....that the above package does NOT exist??? wtf
    import com.modempack.*;Gives a single bad class erro
    Using either of the above and the following command:
    javac -classpath TestModems.javagives "no source files found"
    Using either of the above and the following command:
    javac -classpath c:\java\2\com\modems TestModems.javaYielded 5 errors of cannot resolve symbol
    Using: *****************************
    import com.modempack.Modem;
    import com.modempack.CableModem;
    import com.modempack.DslModem;and adding public in fron of the int[/code" variable....WORKS
    It is my understanding that
    import javax.swing.*;
    does NOT import everything with the swing library, so when thinking
    along those lines, this makes 100% sense....I just thought that with packages
    you could provide one, and everything else in the package is imported, ie: if you have a package with 500 classes in it, you wouldn't want 500 import lines....something seems like something
    must be wrong with the class files or something/classpath still or else this would work somehow???
    Well...going to go mess around somemore, just an update.
    Thank you again                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help with packages and classpath

    Heya,
    first off, i use textpad to compile my java, i don't do it via the command line.
    my problem is faily simple, i think. i've got a main class and i'd like it to import a custom class from a subdir.
    Main class is in
    C:\Documents and Settings\David\Desktop\java\test_gen.java
    I would like it to import
    C:\Documents and Settings\David\Desktop\java\obj_data\objects.java
    I understand that I have to declare objects.java to be a part of a package, so i head the code with: package obj_data; as i understand it, the directory in which the package to be imported resides in will be named the same as the package.
    When i import my package into test_gen.java, i import obj_data as follows:
    import obj_data.*;
    this should import objects.class and any other classes in the same directory. also import obj_data.objects.*; could be used.
    Anyway, thats my understanding of how you set up the class and package; i also understand that when the java file compiles the compiler looks at the directoy(s) indicated in the class path for the classes to import. that in mind i tried to add:
    C:\Documents and Settings\David\Desktop\java\obj_data\
    to my classpath. i did this via dos, javac -classpath "C:\Documents and Settings\David\Desktop\java\obj_data\"
    i got no error messages, so i assume it worked. however when i try to compile the main java (test_gen) i get-
    package packages does not exist
    import packages.*;
    ^
    1 error
    Tool completed with exit code 1
    can anyone give me some help please?

    This is a minimal explanation of packages.
    Assume that your programs are part of a package named myapp, which is specified by this first line in each source file:
    package myapp;
    Also assume that directory (C:\java\work\) is listed in the CLASSPATH list of directories.
    Also assume that all your source files reside in this directory structure: C:\java\work\myapp\
    Then a statement to compile your source file named aProgram.java is:
    C:\java\work\>javac myapp\aProgram.java
    Explanation:
    Compiling
    A class is in a package if there is a package statement at the top of the class.
    The source file needs to be in a subdirectory structure. The subdirectory structure must match the package statement. The top subdirectory must be in the classpath directory.
    So, you generate a directory structure C:\java\work\myapp\ which is the [classpath directory + the package subdirectory structure], and place aProgram.java in it.
    Then from the classpath directory (C:\java\work\) use the command: javac myapp\aProgram.java
    Running
    Compiling creates a file, aProgram.class in the myapp directory.
    (The following is where people tend to get lost.)
    The correct name now, as far as java is concerned, is the combination of package name and class name: myapp.aProgram (note I omit the .class) If you don't use this name, java will complain that it can't find the class.
    To run a class that's NOT part of a package, you use the command: java SomeFile (assuming that SomeFile.class is in a directory that's listed in the classpath)
    To run a class that IS part of a package, you use the command java myapp.aProgram (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)

  • Help with Package Label Design

    Hi, I work for a one of the fortune 500 company as a helpdesk. Last month my company came out with a go green logo and when I saw I decide to create one. I showed the logo to my Director and my director forwarded the design to the Marketing department. They really like the design, but they couldn't use it because they already pay a design company for that logo and the logo were already print on the market. What happen next, is that they send me an email Yesterday asking me if I'm interest in getting an interview for a packaging designer job and the interview is going to be for next month. Now, I have no experience with packaging, label and printing and they know that, but I will like to surprise the with couple of design. I would like to know what software do I need to use from design to printing and if there is any good website with good tutorials. Thanks

    They probably liked your style ( on the green logo ) and want to incorporate it into their packaging.  You should be honest and tell them you do not have any experience.  They'll probably bring you in at "entry level" so they can groom you to their corporate culture.  You'll probably be working under a senior designer and will probably spend a few months learning how things are done.  I'd imagine you'll need some basic knowledge of Illustrator and Photoshop, if not some intermediate level capabilities with both programs.
    Now, if you want to impress them, find a current package the company had produced in the last few years.  Pull it apart and get it to lie flat.  Re-create the entire piece using Illustrator.  This will include a spot layer with dies.  Focus on improving the design and look of the piece, but make sure you do not copy what has already been done.  Come up with something original and incorporate your version of the "green" logo.  It does not have to be anything out-of-sight, but shows you know the company, you know how to improve the existing packaging out there, and you'll show initiate.  They'll probably never use it ( like your "green" logo, but will get you the job ).
    This will take you some time.  I do not know of any web tutorials, but both Illustrator and Photoshop come with a few.  You could also go to a local bookstore and take alook at what they have in their "graphic design" section.  Some books come with a CD that has some templates and files you can take a look at.
    There must be a void they're looking to fill, otherwise you'd never get the interview.  Don't get too stressed out trying to impress them.  They're already impressed.  But, if you "claim" to know it all in software, you'll be doing yourself a huge injustice.  Talent does not come in a box.  Sounds like they're willing to get you started, so go for it.

  • Help With "Package An Application" Using APEX  3.0.1 with XE

    I'm using apex 3.0.1 and XE Database and I'm trying to create a package application but without succes, I can find the way to do it and I know that it's possible. What I'm trying to do is create a file like the package application that we can download from Oracle page but for an application I create.
    Looking here in the forums I found this link:
    http://www.oracle.com/technology/oramag/oracle/06-jul/o46browser.html
    And I was trying to follow it step by step until I found the Step 4: Package Up the Application, number 7.
    1. In the breadcrumb links in the upper left-hand corner of the screen, click the Application nnn link (where nnn corresponds to the ID of the employee lookup application in your Oracle Application Express instance).
    2. Click the Edit Attributes icon, and then click Supporting Objects.
    3. Click Edit.
    4. In the Welcome section, enter readme text for the application in the Message field, such as "This application lets users browse employee information. Users accessing the application with a USERID stored in the table can upload a photo if one does not already exist."
    5. Click the right arrow to go to the Prerequisites tab.
    6. To ensure that folks who already have a table named OM_EMPLOYEES in their schemas don't run into a conflict with this script, enter OM_EMPLOYEES in the first Object Names field and click Add.
    [b]7. Click the Scripts tab.
    8. Click Create.
    9. Click the Copy from SQL Script Repository icon.
    10. Enter Create Table, Sequence, and Trigger in the Name field, and click Next.
    11. Select om_employees.sql, and click Create Script.
    12. Repeat steps 9 through 11 for the om_download_pict.sql and seed_data .sql scripts. Feel free to name these scripts as you see fit.
    13. Click the Deinstall tab, and click Create.
    14. Click the Create from File icon.
    15. Click Browse, select the drop_om_objects.sql script (included with this column's download file), click Open, and click Create Script.
    16. Click the right arrow.
    17. Select Yes for Include Supporting Object Definitions in Export.
    18. Click Apply Changes.
    I can't find the scrips tab and I completely lost. I start to believe that this steps don't apply for Apex 3.0.1.
    If anyone of you could help me with this, please do it, I really need it.
    Johann.

    Johann,
    That doc was probably written against 2.2 because in 3.0, we reworked the supporting objects page a bit. If you are on Supporting Objects, in the Installation region, click on Installation Scripts. For more information, check the Advanced Tutorials document off our OTN site for a Tutorial called Reviewing a Packaged App (something like that - I can't access the doc at the moment).
    -- Sharon

  • Help with Package please

    Hi - I posted my question in the iPhoto forum and was directed me here! (The reply began "That's really an Operating System issue not an iPhoto one. The fix is done in the Terminal, but I'm not terminal expert ...") So here goes:
    I recently installed iPhoto Library Manager and it worked fine for the first two libraries I created but then I created a third and after opening it, the Pictures Folder (listed under PLACES on the left of my Macintosh Harddrive window) turned into a "package" with a new sort of icon instead of a folder.
    When I try to open it, I get a window that reads "There is no default application specified to open the document ‘Pictures’ " and a prompt to "Choose Application." I tried deleting the 3rd library from iPhoto Manager (I still have the photos elsewhere), but that didn’t help.
    When I go into my users folder, I find this same Pictures Package with its new sort of icon and right beneath it I find a folder called "Pictures_" Inside the "Pictures_" folder I find exactly what used to be in my Pictures Folder.
    In the new Pictures package (which I view by rIght clicking on it & selecting show contents option) I found all my iPhoto libraries and files that used to be in the Pictures folder (when it was under PLACES) plus 8 more items. They are: AlbumData.xml; iPhoto.ipspot; Library.data; 3 folders - Data, Modified & Originals; and Library.iPhoto & Library6.iPhoto – which look like two new iPhoto Libraries, and when I click on either of them, my iPhoto Library opens up, but when I get info on them, they are tiny (4KB & 2.7 MB) as opposed to my actual library (30.44 GB)
    There is only one item that did not copy over to the new package. In Pictures_ there is a folder called ‘Contents’ but the only thing it contains is a 4KB plaintext document called “Pkginfo.”
    I tried to search through the Discussions for an answer to my problem before posting, and the closest I came was "Photo library problem" Posted by Simon: Jun 30, 2008 8:04 PM. My first question is the same as Simon's:
    How can I return the 'package' to a folder, so I can open it and point iPhoto to my library(s) inside?
    Here is LN's response: "RIght click on your "new" package and select the show contents option - find the iPhoto library and drag it to the root level of the External Hard drive -- You should now be able to point iPhoto to it."
    As a novice, I need to ask for clarification. How exactly does one "drag it to the root level of the External Hard drive?" That is to say, where is the root level of the External Hard drive, how can I find it??
    Also, is this the right solution for me, given as I have multiple iPhoto libraries in this "package"? Would I have to drag both my iPhoto Libraries to the root level? And can I delete the new Library.iPhoto & Library6.iPhoto (tiny files that look like two new iPhoto Libraries) which were created?
    OR in my case, should I delete the package and put the Pictures_ folder in its' place? I'm not sure this is possible. I tried to put the pictures package in the trash (since I still have Pictures_) but I get a message, “”Pictures can’t be modified or deleted because it is required by Mac OS X.”
    What is a package, anyway? How does it compare to a folder?
    Any help would be truly, truly appreciated.
    Thanks in advance
    FranArt

    If I'm understanding your problem, your normal Pictures folder has turned into non-openable bundle which the Finder sees as a file, so when you double click the Pictures icon instead of the folder opening the Finder asks you what application you want to use to open the "file"--many applications are structured this way, and so is the iPhoto Library itself in the newest version of iPhoto. And you can't trash Pictures because in Leopard a special sort of permissions was added to it by Apple to prevent people accidently trashing important stuff, like their pictures.
    I know you can reset the bundle bit using Terminal if you have Developer Tools installed, not sure if Apple added that command to the default set of Terminal commands in Leopard. You can get the commands you need here if you didn't install Developer Tools:
    http://homepage.mac.com/francines/.Public/getsetfile.zip
    Unzip the file and you will have a folder with two files in it. Try the first to see if it works, this example assumes that the zip file went to your home Downloads folder.
    1. Open Terminal by double clicking it, it is in your Utilities folder
    2. Now open the unzipped folder and drag and drop the GetFileInfo file into the Terminal
    3. Next open your home folder and then drag and drop Pictures into the Terminal (you must use the Pictures that displays when the home folder is open, NOT the one in the Sidebar)
    4. Hit return and you will something like this:
    NoobiX:~ francine$ /Users/francine/Downloads/getsetfile/GetFileInfo /Users/francine/Pictures
    directory: "/Users/francine/Pictures"
    attributes: avBstClinmedz
    created: 11/07/2007 16:36:43
    modified: 08/31/2008 01:34:46
    I suspect the attributes will show a capital letter "B" as in the example above, instead of the lower case b which is normal. If that is true, then the bundle bit has been set. To reset it drag the SetFile command into the Terminal, drop it, then type
    -a b
    followed by a space, and drag the Pictures file into Terminal and drop it and press Return. The Terminal will look something like this:
    NoobiX:~ francine$ /Users/francine/Downloads/getsetfile/SetFile -a b /Users/francine/Pictures
    The Pictures folder will now be a folder again. Where my example shows the name of my computer, and my user name, yours should show your user name and something other than "NoobiX" for your computer.
    Francine
    Francine
    Schwieder

  • Help with Packages in JCreator LE

    Hello,
    I'm new to Java and having problems splitting a program into packages.
    I have 6 files, 5 containing class definitions and sub classes, and one which holds the main method. They compile and run fine when all in the same directory.
    In an effort to try out packages, I copied the 5 .class files to a sub folder of the folder with the main() method in. I then pointed the Project Properties > Required Libraries to that folder containing the .class files.
    At the moment when I compile the programme it can't find any of the classes (they are all declared as public) and they dont appear in the package view. I'm messing around with the import statement at the top of main(). However i'm unsure how to point JCreator to the classes.
    If they matched the directory structure they would be in Java.programs.polymorph.Animals
    but that doesn't work.
    Any help to push me in the right direction greatly appreciated.
    Nick

    Packages have nothing to do with the directory structure of your source files.
    See the following sites:
    Using packages: http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html
    Code conventions: http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
    Model-View-Controller (side-note): http://www.google.com/search?q=mvc
    // ---------- Dog.java ----------
    package java.programs.polymorph.animals; //package name should be in lowercase
    public class Dog {}
    // ---------- DogPound.java ----------
    package java.programs.polymorph.habitats;
    // imports all public classes from java.programs.polymorph.animals package
    import java.programs.polymorph.animals.*;
    // imports only Set class from java.util package
    import java.util.Set; 
    public class DogPound {
       //requires java.programs.polymorph.animals.Dog and java.util.Set
       private Set<Dog> dogs;
    }

  • Looking for some help with package design (box)

    I'm pretty good with Photoshop, but Illustrator is fairly new to me. I'm helping a friend do his product packages and I already have all of the graphics, I'm just having trouble figuring out how to put it all together in Illustrator.
    We already have the box dimensions and just need to get a vector file that the factory can use to print. My main question is how do I create the actual layout of the box to work on? In the pdf that was sent to us I can pull out the box, but it just sits on a white background.
    My next question is how do I fill the layout with a pattern. I have a carbon fiber look pattern in Photoshop, but I'm having trouble figuring out how to use it to fill in Illustrator.
    Thanks ahead of time for any help.

    Jem,
    Pardon me if I sound rude by suggesting that before you launch into an expensive printing job (which could result in disastrous consequences if you don't do it right) that you actually learn how to use the program first. You may also want to learn something about the offset printing process and how to prepare print jobs.
    Even many Illustrator novices know that there is no such thing as a background in Illustrator, in the sense that there is in Photoshop. You will need to PLACE your Photoshop background as a high resolution CMYK tiff in the provided template. That's the answer to your second question. I don't really understand your first question. Maybe someone else will. Are you simply asking, "where do I begin?" If so, then you REALLY REALLY need to read a book on how to use Illustrator. The Adobe Illustrator Classroom in a Book might be the place to start.
    "I'm pretty good with CPR. I'm helping a friend do his vasectomy and I already have all the equipment (scalpels, thread, etc.) I'm just having trouble figuring out where to cut."

  • Begginer needing help with "package" word

    Hi,
    I'm a Java newbie and I'm trying to get comfortable with programming in Java on my Mac (running Mac OS 10.3).
    I found some sample code that I'm testing out at:
    http://www.macdevcenter.com/pub/a/mac/2001/08/03/osx_java.html?page=1
    but I'm having problems using the reserved word "package".
    at the time of each .java file the sample code has:
    package NineSquares;When I compile this in the Terminal window using the command
    javac NineSquares.java
    javac MainFrame.java
    javac EachSquare.javaI get the following error message:
    NineSquares.java:8: cannot resolve symbol
    symbol : class MainFrame
    location: class NineSquares.NineSquares
    new MainFrame();
    ^
    1 error
    David-Salvays-Computer:~/introcs/Project2 davidsalvay$
    when I comment out the package line it compiles fine.
    I don't understand what package means and how I use it. BTW, all my .java files are in the same folder and I've already set the classpath to the file containing my main method (NineSquares.java).
    Any help/suggestions/ideas will be much appreciated!
    --David                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    1. package is always declared first in a class definition.
    2. If you've got a class foobar, and that class is in package x.y.z, then the .class file needs to be in a file foobar.class under the directory hierarchy x\y\z\foobar.class, and where the directory above x is in the classpath.
    3. The official name of that class is x.y.z.foobar. You can import it using import x.y.z.*; or import x.y.z.foobar; Import just lets you use the class without having to always write x.y.z

  • Help with packages in JDK

    Hello Guys,
    im new to learning java, so i have some problems that I cannot find any answers for that anywhere in the net.
    My question is how to add the packages for eg. galapagos and javabook in the jdk. I have dowloaded them and i dont know where to paste them.
    Any help appreciated.
    hear_reaper

    they are packages like javax and java. so that we can import classes without needing to write the particular class.yes that's one of the reasons packages are there for.
    and the link you gave me doesnt work. it says that the page is not available. [Now it should work.|http://www.j2ee.me/docs/books/tutorial/java/package/packages.html]
    edit: ok got the link. but i think that says how to create packages instead of adding the downloaded ones.Be patient and read the entire article.
    tommickey
    Edited by: tommickey on Jul 19, 2009 9:53 AM

  • Help with Packages and xml files

    I have a XML file that is read by the program that I want to add to my package.
    The package can be check out with a different name and different location each time, so how would I set up for my file to be read in by com.compname.project.lib.xml enstead of c:/dev/com/compname/project/lib.xml

            InputStream fis = null;
            BufferedInputStream bis = null;
            DataInputStream dis = null;
            String[] original = new String[3];
            //try {
                fis = this.getClass().getResourceAsStream("/c.s.p.b.i.t.c.c.xml");
                xmlpath = new File(is.toString());
                bis = new BufferedInputStream(xmlpath);
                dis = new DataInputStream(bis);
            //catch (FileNotFoundException e) {}
            try
                //parse the file
                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                DocumentBuilder db = dbf.newDocumentBuilder();
                Document doc = db.parse(fis);
                doc.getDocumentElement().normalize();
                NodeList nodeLst = doc.getElementsByTagName(Tag)Edited by: mferguson13 on Jan 28, 2009 6:58 AM

  • Help with Package variables/constants

    Hi All,
    I have a function which uses package variables and constants.
    I am seeing the following strange behavior when I execute the
    function. Here is what I did.
    1) I opened a SQL* plus session and executed my function couple
    of times. It worked very well and gave me the correct return
    value.
    2) I left the session idle for about 3 hours. ( did not
    disconnect.)
    3) I came back after 3 hours and ran the same query, it gives
    me null value. (error message says PL/SQL numeric or value
    error).
    4) I disconnected the session and executed the function on the
    new session. I got my result back.
    Does this scenario looks something familiar to you? If so, could
    you pl. advise where it could go wrong? (is it a bug with oracle
    8?) P.S. I used dbms pipe package calls also in my package.
    Thanx
    rk

    strange.. test it one more time in same way..if it happens again
    submit TAR.

  • Help with Package Maker and System Image Utility

    Hi all....
    Im trying to use package maker and System Image utility to create a netinstall image.  I dont know if im creating the package wrong, or if it has something to do with siu... but when I install the image from the server only the OS installs... not the packages.  The packages just get copied to the HD.
    Right now im just working on trying to get office to install with the OS...
    Any advice would be greatly appreciated...
    Thanks...

    Just realized that you said the following:
    The packages just get copied to the HD.
    It sounds like you've made a installer package that's installing the installer packages.
    If you simply double click the package you've created and install it, does it do the same thing? If so, then that's what you've done.

  • Need help with package update

    have a package that was sequenced for w7 64 bit;
    now need to publish this package to RDS 2012.
    edited the package in sequencer and added RDS2012 R2.
    The question:
    do I have to unpublish current package that is for W7 only and publish edited one with added RDS 2012 or can I update running with changed. Never did update yet. So please don't be angry :)
    &quot;When you hit a wrong note it's the next note that makes it good or bad&quot;. Miles Davis

    If you just changed the supported OS value (checkbox during sequencing), just saving the package on the sequencer and importing it into the management console should be fine. 
    The MgtConsole will determine that you are importing an updated version and will ask you if you want to import it 'as an update'. You can confirm that.
    On a client machine, the old version of the package will remain (for a while) and the new version will be added. Users that actively work with the old version, stick on that on. Users that launch the application will get the new version. 
    If your two 'packages' really have technical differnces, the 'save as new package' is appropriate with the considerations mentioned earlier
    Falko
    Twitter
    @kirk_tn   |   Blog
    kirxblog   |   Web
    kirx.org   |   Fireside
    appvbook.com

  • Help with package dependencies

    I would like to create a package for knowit. I am not sure about the dependencies that I have to put.
    Also I have a general question about programs that depend on KDE, where do I put the dependencies: in makedepends or/and in depends section of PKGBUILD?
    I include the following
    PKGBUILD
    pkgname=knowit
    pkgver=0.10
    pkgrel=1
    pkgdesc="KnowIt is a KDE tool for managing notes. Notes are organized in tree-like hierarchy."
    url="http://knowit.sourceforge.net/"
    makedepends=('qt')
    depends=('kdelibs>=3.0')
    source=(http://knowit.sourceforge.net/files/$pkgname-$pkgver.tar.bz2)
    md5sums=('27a42624f639770fc4f34777b51c5bbf')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/opt/kde --with-qt-dir=/opt/qt --with-qt-includes=/opt/qt/include --with-qt-libraries=/opt/qt/lib
    make || return 1
    make prefix=$startdir/pkg/opt/kde install
    ldd knowit
    $ ldd /opt/kde/bin/knowit
    libkdeprint.so.4 => /opt/kde/lib/libkdeprint.so.4 (0x4001b000)
    libkparts.so.2 => /opt/kde/lib/libkparts.so.2 (0x400e8000)
    libkio.so.4 => /opt/kde/lib/libkio.so.4 (0x40131000)
    libkdesu.so.4 => /opt/kde/lib/libkdesu.so.4 (0x40484000)
    libfam.so.0 => /usr/lib/libfam.so.0 (0x404b5000)
    libkdeui.so.4 => /opt/kde/lib/libkdeui.so.4 (0x404bd000)
    libkdecore.so.4 => /opt/kde/lib/libkdecore.so.4 (0x40779000)
    libDCOP.so.4 => /opt/kde/lib/libDCOP.so.4 (0x40993000)
    libresolv.so.2 => /lib/libresolv.so.2 (0x409c7000)
    libutil.so.1 => /lib/libutil.so.1 (0x409da000)
    libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0x409dd000)
    libkdefx.so.4 => /opt/kde/lib/libkdefx.so.4 (0x409f3000)
    libqt-mt.so.3 => /opt/qt/lib/libqt-mt.so.3 (0x40a1e000)
    libGL.so.1 => /usr/X11R6/lib/libGL.so.1 (0x4110e000)
    libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x4118f000)
    libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x411a5000)
    libXinerama.so.1 => /usr/X11R6/lib/libXinerama.so.1 (0x411a9000)
    libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x411ac000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x411be000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x411e5000)
    libexpat.so.0 => /usr/lib/libexpat.so.0 (0x41251000)
    libdl.so.2 => /lib/libdl.so.2 (0x41272000)
    libpng.so.3 => /usr/lib/libpng.so.3 (0x41275000)
    libz.so.1 => /usr/lib/libz.so.1 (0x412a7000)
    libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x412b8000)
    libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x412c6000)
    libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x41390000)
    libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x4139a000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x413b2000)
    libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x41403000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x4140b000)
    libm.so.6 => /lib/libm.so.6 (0x414dd000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x41500000)
    libc.so.6 => /lib/libc.so.6 (0x4150a000)
    libXxf86vm.so.1 => /usr/X11R6/lib/libXxf86vm.so.1 (0x4163b000)
    libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x41641000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
    namcap
    $ namcap /var/abs/local/knowit/PKGBUILD /var/cache/pacman/pkg/knowit-0.10-1.pkg.tar.gz
    PKGBUILD (knowit) W: Missing Maintainer tag
    PKGBUILD (knowit) W: Missing CVS Id tag
    Are my depends and makedepends sections OK?
    Cheers!

    I'm not sure if you need qt in makedepends since you have kdelibs in the depends array. Makedepends is only for packages that are not needed to run the application (potentialy by someone else than the one who compiled package). It depends :-) on many things (like if it is a static or shared build, etc., etc.). You can also use namcap -i option to print more verbose information. Namcap will only tell you what it thinks about depends. Sometimes it can suggest that something should be in the depends but it can be moved to makedepends quite safely (for example I had postgresql and mysql as dependencies for rekall but rekall can be run without any of them installed; on the other hand you need both packages to build rekall with support for them - that's a good example for makedepends).

Maybe you are looking for

  • Questions on ROS

    Hi Gurus, I have a list of questions regarding the Implementation of Supplier Self Registration scenario in SRM 7.0 using ROS component 1)     Is it possible the implementation of ROS without SUS? If yes, is it mandatory the utilization of XI? If yes

  • Oracle Installer Problem while installing Oracle 9i on HP Unix

    Hi Everyone , I had earlier installed 9.2.0.1 on Linux and had no probs whatsoever . When i am trying to install Oracle 9.2.0.1 on HP Unix , the Oracle Installer opens up a window saying CHOOSE JDK HOME DIRECTORY . I have already set the PATH environ

  • HT5622 How to verify an apple id

    How to verify a apple id

  • Using Javascript variable in JSP

    I m setting a variable named btn to the value of the button which was clicked but the problem here is that i m nt getting its value whn i want to set it to a request.setAttribute() method.

  • Vendor PO spend

    dear all, how can i find out or validate the total number of PO quantity or value a vendor has spend for a specific period? thanks.