Package produces error.Why?

I tried putting a program in a package as shown
below but got the following error:
====
C:\myjava>javac -d c:\myjava\jre\classes testing2.java
testing2.java:5: 'class' or 'interface' expected
package DAYOSPACKAGE.test1;
^
1 error
====
Why am i getting this error.
This is the code:
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
package DAYOSPACKAGE.test1;
public class testing2 extends JFrame
{ private JTextField T1[];
private JButton B1,B2;
private JLabel L1[];
private JPanel P1,P2,P3;
public testing2()
{ T1=new JTextField[4];
for(int i=0;i<T1.length;i++)
{ T1[i]=new JTextField();
L1=new JLabel[4];
for(int i=0;i<L1.length;i++)
{ L1[i]=new JLabel(" "+i);
P1=new JPanel();
P1.setLayout(new GridLayout(4,2));
for(int i=0;i<4;i++)
{ P1.add(L1[i]);
P1.add(T1);
B1=new JButton("SAVE AS");
B2=new JButton("ENTER");
P2=new JPanel();
P2.setLayout(new GridLayout(1,2));
P2.add(B1);
P2.add(B2);
P3=new JPanel();
P3.setLayout(new BorderLayout());
P3.add(P1,BorderLayout.CENTER);
P3.add(P2,BorderLayout.SOUTH);
JFrame frame = new JFrame("LPC");
frame.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
frame.getContentPane().add(P3);
frame.pack();
frame.setSize(200,200);
frame.setVisible(true);
public static void main (String [] args)
{ testing2 done =new testing2();

The package statement must be put before the import statements.
This code has to change
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
package DAYOSPACKAGE.test1;
to this
package DAYOSPACKAGE.test1;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;

Similar Messages

  • Package-query: error while loading shared libraries: libcurl.so.4: can

    Hi all
    when i run yaourt to install any things :
    package-query: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
    why?
    what can i do?
    I'm very newbie so help me with easy commands!
    thanks

    try to reinstall yahourt :
    https://wiki.archlinux.org/index.php/Yaourt

  • Package Validation Error - SSIS Error Code DTS_E_OLEDBERROR - Error code: 0x80040E4D

    I sometimes get the following error randomly - 
    Package Validation Error
    ADDITIONAL INFORMATION:
    Error at MY_PACKAGE_PLUS[Connection manager "MY_DATABASE"]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E4D  Description: "Login failed for user 'USERNAMEZ'.".
    Error at MY_PACKAGE_PLUS [Log provider "SSIS log provider for SQL Server"]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "MY_DATABASE" failed with error
    code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.
     (Microsoft.DataTransformationServices.VsIntegration)
    My package name in SSIS/BIDS is MY_PACKAGE, but in the error I see MY_PACKAGE_PLUS, which was the name of an older version of the package. This error goes away when I close SSIS and then restart it. I wonder why this happens and how do I fix it
    ? Is this some bug in SSIS ? The same package runs without errors in SQL server agent.
    Thanks.

    It seems the old package reference still exists in your project bin folder or inside stproj file. WHich is why it tries to validate the older package each time when you start  the project.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Package installation error during zone installation

    Hi All
    I am getting a lot of errors from package installations during zone installation
    Installation of these packages generated errors: <SUNWcsu SUNWckr SUNWgnome-base-libs SUNWgnome-audio SUNWtltk SUNWzoner SUNWzfskr SUNWzfsr SUNWzfsu SUNWzoneu SUNWtoo SUNWssad SUNWusb SUNWtavor SUNWudapltu SUNWopenssl-libraries SUNWwbsup SUNWPython SUNWbip SUNWxge SUNWxcu4 SUNWxcu6 SUNWcry SUNWntp4u SUNWqlc SUNWqlcu SUNWgnome-im-client SUNWgnome-img-editor SUNWsndmr SUNWsndmu SUNWsshcu SUNWsshdu SUNWsshu SUNWgnome-text-editor>
    When I look into /var/sadm/system/logs/install_log in the zone, I am seeing the erros are relate to file corruption:
    *** package <SUNWckr> failed to install - interrupted:
    pkgadd: ERROR: packaging file </var/sadm/pkg/SUNWckr/save/pspool/SUNWckr/pkginfo
    is corruptfile size <17259> expected <17199> actual
    *** package <SUNWsshcu> failed to install - interrupted:
    pkgadd: ERROR: packaging file </var/sadm/pkg/SUNWsshcu/save/pspool/SUNWsshcu/pkg
    info> is corrupt
    file size <6235> expected <7087> actual
    as an example, the pkginfo file referred to above has size 17199 and 7087 in the global zone so why is it thinking it should be 17259 and 6235? Could this be due to the patching done before the zone creation?
    thanks

    I just realized what is causing this but no sure what is the best way to get around this:
    we have another home grown package the overwrite the problematic files reported thay lay on top of the sun packages and zone installation does not like that. The original file size and check sum is checked against what was installed in the global zone and hence the warning messages.
    I would have thought it should pick the most updated ones especially it was overwritten by another package (and therefore it should have the updated information in the package database)?

  • Failed to load Execute Package Task error.

    Hello Experts,
    Excuse my newbie question.
    Execute Package Task: Error: The task has failed to load. The contact information for the task is "Microsoft Corporation; Microsoft SQL Server; Microsoft corporation; All Rights Reserved http://www.microsoft.com/sql/support/default.asp:1"
    We have a windows service running on our app server that deploys a package that executes other packages using execute package task. This package and rest of the packages are in the same folder at the same level under integration services
    catalog. The package fails to execute with the above said error.
    Execute package task is configured to run in 'in-process' mode. Changing delay validation to true/false in child packages didn't help.
    ironically if the package is deployed using a console application from the app server the package gets executed just fine. I checked permissions, everything seem fine.
    Is there anyway to get details of this error to understand the problem better? I am looking at reports > standard reports > all executions.
    Thanks.

    As it turns out, the 63bit ExecPackageTask.dll was not found under "C:\Program Files\Microsoft SQL Server\110\DTS\Binn". Installing "SQL Server Data Tools" installed only 32 bit version of the component under "C:\Program Files (x86)\Microsoft SQL
    Server\110\DTS\Binn".
    Is there a way to get 64bit version of this component without installing "Integration Services" (to avoid possible license issues)?
    Hi Jayakarthiks,
    To make use of the 64-bit ExecPackageTask.dll, you also need the 64-bit SSIS runtime and 64-bit DTExec utility tool. To obtain the 64-bit SSIS runtime and tools, you have to install the SQL Server Integration Services service from your SQL Server 2012 install
    media.
    Reference:
    http://msdn.microsoft.com/en-us/library/ms143731.aspx
    Regards,
    Mike Yin
    If you have any feedback on our support, please click here
    Mike Yin
    TechNet Community Support

  • Package Authoring Error

    Hi
    I may have come to the wrong Forum and if so my apologies but if there is some one who could let me know if i need be concerned of the following errors i have just noticed in Console after having done recent Java And Safari update today.both installations i believe were completed successfully but console is showing the following message.
    13/03/2011 13:43:52 Software Update[133] Software Update Package Authoring Error: installation-check results requires a message
    13/03/2011 13:38:58 Software Update[136] Software Update Package Authoring Error: <choices-outline ui='SoftwareUpdate'> should only have one <line> element. Put additional <line> elements in a <choices-outline ui='invisible'> element.
    Thanks in advance
    Cole

    mach_kernel file missing in root of harddrive
    replaced, now working again

  • Cant restore iphone 3g 4.2.1 it would load half way threw then say unknown error why it is not working?

    cant restore iphone it would loa half way threw then say unknown error why is it not working and its a iphone 3g 4.2.1

    What is the exact error message you're getting?

  • Fix for iTunes Producer error message?  Fixing unallowable image names in iBA Gallery

    In Gallery I had image names with unallowable characters, e.g. "photo name.jpg".  I changed the name to "photoname.jpg" and re-added it in Inspector>Interaction>Gallery Media.  It still appears as "photo name.jpg"???  Even in a new Gallery Widget? 
    I'm new here so please forgive me if I am violating any protocol.  I would greatly appreciate any guidence in correcting my error. 
    Thanks!!!
    Gene Yore
    aka eeyore

    Thank you vinnyvg! 
    While trying to respond to this iTunes Producer error message,
    "ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues: ; Error=com.apple.jingle.leghorn.fileformat.ValidationError@5fd2c84f[userString=This<mailto:Error=com.apple.jingle.leghorn.fileformat.ValidationError@5fd2c84f[userString=This> file does not start with a start of image marker.]" at Book (MZItmspBookPackage)
    The delivery of your book ended in error because there are image files that do not match the file extension type.  Make sure that all image files inside the book file end with one of the following: .jpg or .png and that the image file itself matches the file extension type."
    I did have a few tif images which I converted to jpg. 
    But, I ran across this posting which suggested I had other problems with my naming convention. 
    https://discussions.apple.com/thread/4788489?start=0&tstart=0
    which says
    GeePeeGee
    This solved my questionRe: Uploading error codes - does anyone speak their tongue? 
    Feb 15, 2013 9:33 PM (in response to GeePeeGee)
    So, it turns out, the problem with these png-images is the NAME. There are no restrictions, to name your pictures, but when you intend to use them in iBooksAuthor, make sure, that there are no "wrong charakters" in the name. You may use a to z charakters, 1 to 0 numbers and "-" and "_". That's it.
    The file "St. Giles.jpg" has
    a) a ".", which is wrong and
    b) an empty space, which is wrong too.
    When you use screenshots, things are getting even worse "Bildschirmfoto 2013-02-08 um 08.02.   15.50.19".
    So, if there are error codes as specified, you have to go through the document, click on each and every image and then check the filename. As you see below, you must activate the image itself to see the filename (in this case the filename is corrcect)."
    eeyor

  • HT201210 how come i cant update my ipod. im trying to update it but it always says error. why?

    why cant i update my ipod? when i try to update it. it always says error. why does it say that?

    If you are updating by Settings>General>Software Update then connect the iPod to your computer and update via iTunes.
    iTunes 10 for Windows: Update and restore software on iPod, iPhone, or iPad
    Otherwise, what is the complete wording of the error message.

  • ITunes producer error 3000 character content of element "file_name" invalid. Can anyone help me out? This happens when i try and submit an epub file, i haven't had this before.

    Can anyone help me out? This happens when i try and submit an epub file, i haven't had this before. "iTunes producer error 3000 character content of element "file_name" invalid."
    This is the full message

    You really need to put your codes between the
    [\code] tags
    see http://forum.java.sun.com/features.jsp#Formatting
    for more infoCode tags might make it look a little better, but there's still too darn much code. We're volunteers, after all. It'd be a lot of work to review all of this stuff. Can you demonstrate your problem with something smaller? Learn out how to do a combo box with just a page or two and then appy that to your big problem. That's how I'd do it. - MOD

  • Has anyone been able to upload an ibooks file with audio only files (m4a) in it? I keep getting the following error message during the upload in iTunes Producer: ERROR ITMS-9000: "Files of type audio/x-m4a are not allowed outside of widgets.

    Has anyone been able to upload an ibooks file with audio only files (m4a) in it? I keep getting the following error message during the upload in iTunes Producer: ERROR ITMS-9000: "Files of type audio/x-m4a are not allowed outside of widgets. then it names the file as an m4p file. Everything works beautifully on the iPad through Preview, and validates through iTunes Producer up until the attempted upload. If you've been able to accomplish this, please let me know how you prepared your audio files. Many thanks.

    Hello Fellow iBook Authors!
    Today I received the same error that you all have been discussing.  I tried selecting the DRM
    and this did not work for me, though I'm glad it did for some.  Here's what I did as a work-around. . .
    Since iBooks Author did not have a problem with Videos, I simply used one of my video programs, ScreenFlow to turn the audio into a video file m4v.  I added an image and extended the length or timing of the image to span the length of the audio file.  Then exported as an .mov.  I then opened QuickTime and opened the file and exported the file to iTunes. 
    You can use iMovie, Camtasia or any other progam that will allow you to export the audio as a movie file.  Does this make sense?  I hope this helps, at least in the short-term.
    Michael Williams

  • XMII java side produces error.

    We installed xMII.
    When we call the address blowe  it produces error.How can we solve this problem?
    Thanks.
    Adress : http://server:50000/XMII/Menu.jsp
    Error :
    503   Service Unavailable
    Application cannot be started.
      Details:   com.sap.engine.services.deploy.container.ExceptionInfo: Application sap.com/xappsxmiiear cannot be started. Reason: it has hard reference to resource com.sap.mw.idoc with type library, which is not active on the server.

    Hi,
    Try giving Server IP address, like "http://IP addredd:50000/XMII/Menu.jsp" .
    If you are using any VPN connection that Server Name and IP should be mapped in Hosts file under
    "windows/system32/drivers/etc/hosts"
    I dont know whether this helps but you can just give a try.
    Thanks,
    Rao.

  • Currency Translation- Package Status error

    I am encountering the following error after running  the currency translation package.
    The following is the error message in the package log
    RUN LOGIC : Run program error,Message Number : ''''
    Failed
    Application:Sales Package Status :ERROR
    Can some one please tell me what does this error mean and how it can be resolved

    HI,
    This error has been discussed in many threads here in this forum.
    Refer these and see if u can get a solution:
    Re: Currency conversion issue.
    Re: Currency Conversion Problem
    Regards
    Navin

  • AIR 15.0 for OSX - ADT: Packaging failed. Packager internal error

    Packaging a SWF to AIR with captive runtime and native installer (using "-package bundle"), building on PC worked perfectly fine.  After making all of the requisite changes to make it work for Mac, I'm now running into the "Packaging failed. Packager internal error" when building using adt through the command line.  My .command script is as follows:
    cd [directory]
    adt -package -storetype pkcs12 -keystore ../cert/key.p12 -storepass pw -target bundle Bundle ../App.xml App.swf -extdir ../lib icons/16.png icons/32.png icons/128.png
    What can cause this vague "Packger interal error" error? Any help would be appreciated. Thank you.

    Steve
    I have same problem with apple Developer Id Application certificate (downloaded from apple), got past the chain error message by including intermediate and root certificates when I exported from keychain, but got the package error referenced here. Also when I sign on windows machine with my code signing certificate (selecting windows installer) all publishes ok, but the certificate is not attached, says 'unknown developer' when I down load and try and run installer on windows machine. I sent the exe to Comodo (the guys I got the code signing certificate from) and they say the exe is not signed.
    Finally I get 'The digital certificate is invalid'  error when I try and use 'Developer Id Installer' certificate (downloaded from apple).
    I think there must be several problems here with Air SDK.
    Stopping me from publishing and I have a very upset Customer. Can someone from Adobe please advise asap.

  • Why when i go on saferi it says at the top of the page debug console NO ERRORS why is this ?, why when i go on saferi it says at the top of the page debug console NO ERRORS why is this ?

    why when i go on safari at the top of the web page there is a sign saying Debug console "NO ERRORS" why does this happen also a person called us saying that our ipad has a virus what should i do ??

    You can turn OFF debug console

Maybe you are looking for

  • Changing the name of serial communication example in lab windows. Urgent help required

    I am using the example of getting data from rs 232 in lab windows. I want to use this in my final year project that's why I want to change its name that appears as  "serial communication example" how can I change its name and how can I make its exe f

  • Transfering qty from one prod to other

    Hi, our some products are like by during minor changes like drilling one hole,that will become another product. So, incase of shortage of any product, we simply do some minor work on another product and we use it as that prouct. pls note that mat no

  • Multiple shipping addresses for the same supplier (depending on the symbol)

    Hello ,can we set up multiple shipping addresses for the same supplier (depending on the symbol)? .& How.. Thanks

  • Strokes are acting funny. Way too thin for the point size.

    I'm on 5.5 and all of a sudden, when I apply a stroke to a photo frame, I'm not getting the width that the settings say. For example, I place a picture on the page, I scale it, say 50%, then put a stroke on it. I barely can see it. I can put a 44 pt.

  • TabNavigator style

    My application: <mx:Style> .a1{ backgroundImage: Embed("image.png"); </mx:Style> <mx:TabNavigator tabStyleName="a1"> <mx:VBox label="Accounts" width="300" height="150" > <!-- Accounts view goes here. --> </mx:VBox> <mx:VBox label="Stocks" width="300"