Problem with my own packages...

Hello, everyone!
I wrote a program called "AwfulXMLEditor" with the JBuilder, and with
the JBuilder the program ran just fine. Then I wanted to make a neat
package out of it, but I was told that the JBuilder's Personal Edition
doesn't support the creation of jar-Files. So I thought, I'd transfer
the classes somewhere else and package them with the normal Java SDK.
But suddenly the SDK seems to be unable to find classes that are in
the same package, except when I explicitly name the classpath while
calling javac. And if I do that, and try to run the compiled program,
java chokes on it.
Here's what happened exactly:
* Operating System: SuSE Linux
* Java version: SunJava2-1.4.01
* My Classpath: CLASSPATH= /usr/lib/SunJava2-1.4.01/bin:
/usr/lib/SunJava2-1.4.01/jre/bin:/home/daniela/java:
/usr/lib/SunJava2-1.3.1/jh1.1.3/javahelp/lib/jh.jar
(I wrote the classpath as an export-statement into the
.profile file in my home directory. Is that the right
place for it?)
The project consists out of these files
* /home/daniela/java/dkbtools/axe/AwfulXMLEditor.java
* /home/daniela/java/dkbtools/axe/FindReplaceDialog.java
* /home/daniela/java/dkbtools/axe/dtdFileFilter.java
* /home/daniela/java/dkbtools/axe/CopyListener.java
* /home/daniela/java/dkbtools/axe/MessagePanel.java
* /home/daniela/java/dkbtools/axe/xmlFileFilter.java
* /home/daniela/java/dkbtools/axe/EditorPaneTab.java
* /home/daniela/java/dkbtools/axe/TextAreaTab.java
* /home/daniela/java/dkbtools/axe/xslFileFilter.java
Every single one of those starts with:
_____package dkbtools.axe;
When I try to compile:
_____~/java/dkbtools/axe> javac AwfulXMLEditor.java
I get 23 errors like
_____AwfulXMLEditor.java:201: cannot resolve symbol
_____symbol : class xslFileFilter
_____location: class dkbtools.axe.AwfulXMLEditor
_____xslFileFilter xslFF = new xslFileFilter();
_________________________^
with xslFileFilter being one of the files in the package.
If I compile with a -classpath option:
_____~/java/dkbtools/axe> javac -classpath /home/daniela/java/
_____AwfulXMLEditor.java
it compiles completely without messages.
When I try to start the program
_____~/java/dkbtools/axe> java AwfulXMLEditor
I get the following:
_____Exception in thread "main" java.lang.NoClassDefFoundError:
_____AwfulXMLEditor (wrong name: dkbtools/axe/AwfulXMLEditor)
_____at java.lang.ClassLoader.defineClass0(Native Method)
_____at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
_____at java.security.SecureClassLoader.defineClass
________(SecureClassLoader.java:123)
_____at java.net.URLClassLoader.defineClass
________(URLClassLoader.java:246)
_____at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
_____at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
_____at java.security.AccessController.doPrivileged(Native Method)
_____at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
_____at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
_____at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
_____at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
_____at java.lang.ClassLoader.loadClassInternal
_____(ClassLoader.java:322)
If I mention the classpath:
_____java -classpath /home/daniela/java/ AwfulXMLEditor
he says:
_____Exception in thread "main" java.lang.NoClassDefFoundError:
_____AwfulXMLEditor
BTW, classes that are not part of a package compile and run just
fine... Which is one of the reasons why I am completely puzzled about
this problem?
Has somebody ever encountered a similar problem? Am I trying
to compile from the wrong directory? Is my classpath faulty?
Or is this just something stupid I overlooked (last time I was this desperate, everything was because of a missing "close();")?
I'd be really grateful for your help!
Daniela KB

If you dont mind me asking, if its for a good cause
then why call it aweful-XMLeditor??Well, I liked the acronym "AXE". Besides, with my limited programming experience the code is bound to be pretty inelegant. But it is basically a work in progress and maybe one day the users will decide that AXE stands for "Awesome XML Editor".
Just in case anyone is interested: I will post the -- still awful -- first version on my website in a couple of days:
www.ling.uni-potsdam.de/~berger/downloads.html
I hope I will be done with the clean-up and the documentation (don't we just love javadoc?) until the weekend.
Daniela

Similar Messages

  • Problem with procedure in package

    Problem with procedure in package:
    create table accounts
    (acno number(10),
    name varchar2(20),
    balance number(10,2));
    create package banking is
    procedure new_acct(acno NUMBER, name IN VARCHAR);
    procedure acct_dep(acno IN NUMBER, amount IN NUMBER);
    procedure acc_wdr(acno IN NUMBER, amount IN NUMBER);
    procedure acc_bal(acno IN NUMBER, bal OUT NUMBER);
    function acc_drwn(acno IN NUMBER) RETURN BOOLEAN;
    end banking;
    create or replace package body banking is
    procedure new_acct ( acno IN number,
    name IN varchar) is
    begin
    insert into accounts
    (acno, name, balance)
    values
    (acno, name,0);
    end;
    procedure acct_dep(acno IN NUMBER,
    amount IN NUMBER) is
    begin
    update accounts
    set balance = balance + amount
    where acno = acno;
    end;
    procedure acc_wdr(acno IN NUMBER,
    amount IN NUMBER) is
    begin
    update accounts
    set balance = balance - amount
    where acno = acno;
    end;
    procedure acc_bal(acno IN NUMBER,
    bal OUT NUMBER) is
    begin
    declare cursor c_balance(i_acno IN accounts.acno%type) is
    select balance
    from accounts
    where acno = i_acno;
    acc_bal accounts.balance%type;
    begin
    if c_balance%isopen then
    close c_balance;
    end if;
    open c_balance(acno);
    fetch c_balance into acc_bal;
    close c_balance;
    end;
    end;
    function acc_drwn(acno IN NUMBER) RETURN BOOLEAN is
    begin
    declare cursor c_balance(i_acno IN accounts.acno%type) is
    select balance
    from accounts
    where acno = i_acno;
    bal accounts.balance%type;
    begin
    if c_balance%isopen then
    close c_balance;
    end if;
    open c_balance(acno);
    fetch c_balance into bal;
    close c_balance;
    if bal < 0 then
    return true;
    else
    return false;
    end if;
    end;
    end;
    end banking;
    begin
    banking.new_acct(123,'FRANKS');
    end;
    execute banking.acct_dep(123,100);
    execute banking.acc_wdr(123,50);
    Works fine up to this point, however when running the balance check the balance amount is not visible?
    SQL> set serveroutput on
    SQL> begin
    2 declare
    3 bal accounts.balance%type;
    4 begin
    5 banking.acc_bal(123,bal);
    6 dbms_output.put_line('Franks balance is '||bal);
    7 end;
    8 end;
    9 /

    procedure acc_bal(acno IN NUMBER,
       bal OUT NUMBER)
    is
    cursor c_balance(i_acno IN accounts.acno%type) is
       select balance
       from accounts
       where acno = i_acno;
       l_acc_bal accounts.balance%type;
    begin
       open c_balance(acno);
       fetch c_balance into l_acc_bal;
       close c_balance;
       bal := l_acc_bal;
    end;

  • Has anybody had the following error while trying to download iTunes 10.5? There is a problem with Windows Installer package. A program required for this install to complete could not be run.

    Has anybody had the following error while trying to download iTunes 10.5? There is a problem with Windows Installer package. A program required for this install to complete could not be run.

    Go to "control panel" then "add or remove programs".  Highlight "Apple software update"  Choose "change" click "Repair"  This should do the trick.  Then download and install iTunes 10.5 again.

  • Tried to install iTunes 10.5 this morning but an error appeared saying "problem with windows installer package. A program required for this install to complete could not be run." Can someone please help

    I tried to install iTunes 10.5 this morning but an error appeared saying "problem with windows installer package. A program required for this install to complete could not be run." Can someone please help

    Firstly, are you installing iTunes for the first time or are you updating your current version of iTunes?
    If you're installing iTunes for the first time have you tried redownloading the installer package? Perhaps the file you downloaded originally is corrupted...
    http://www.apple.com/itunes/
    If you've tried that, then try installing iTunes as your computer's administrator. To do this right-click the install package and choose "Run as administrator".
    If you're updating iTunes to the most recent version try repairing the Apple Software Update program on your computer. It's under the add/remove programs.
    1. Open the control panel
    2. Open Add/Remove programs (called "Programs and Features" in Windows 7)
    3. Navigate to "Apple Software Update" in the list and click on it
    4. Click on "Change" then select "Repair" (or just select the repair option in Windows 7)
    Once you repair this, try running iTunes and the update again.
    Fingers crossed!

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Having trouble trying to install itunes 10.5. Receive message saying 'There is a problem with this installer package. A program required for this install to complete could not be found. Please contact product vendor'

    Managed to get the installation sorted. Go to Control Panel, and where you have a list of all installed programs, repair all the Apple/Itunes related programs. Installation worked fine after that. Hopefully it helps you out too!

  • Has anyone else had problem with the STANDARD package?

    Hi Oracle gurus, has anyone here had the same problem with the STANDARD package? Or do I have to reinstall Oracle to make it work?
    Thanks.
    Ben

    missesboggs wrote:
    I literally just called AT&T and Apple about this today.  I was having issues with iMessage and texting my husband.  His texts back to me would show up as my name.  Turns out it's because we share the same AppleID.  So, I'm currently trying to change mine, but it hasn't worked so far.  I'm on hold with Apple right now to see if I can get it fixed.
    Both of you have registered the same email address for iMessage. If you were using a shared Apple ID and you updated your phones to iOS5, the default will be the Apple ID. Go into settings and change it.

  • HT1926 (iTunes) Problem with Windows installer package?

    (iTunes) Problem with Windows installer package?  I try to install the new version of iTunes but get an error "Problem with Windows installer package.  A Program required for this install could not be run."  Can anyone help shed some light for me as to how to correct this?  I have tried to install the program through Chrome, Explorer and FireFox but have had no success.  I have included a screenshot of the error.  Hopefully it's visable.  Thank you for any help.

    Found answer for anyone else curious.  I love the apple community.  Thanks guys for help!
    https://discussions.apple.com/docs/DOC-3551

  • Trouble with itunes upgrade I receive an error message problem with windows installer package

    I am trying to upgrade itunes.  I am running windows vista 64.  Everytime I try to upgrade I get an error that says Problem with windows installer package.  Anyone know how to fix this?

    No drivers in LowerFilters.
    No drivers in UpperFilters.
    Failed loading CD / DVD drives, error -43. Try doing a repair install on iTunes from the “Add or Remove Programs” control panel.
    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    iTunes for Windows: "Registry settings" warning when opening iTunes

  • Why is itunes saying "there is a problem with this installer package. a program required for this install to complete could not be run. contact your support personnel or package vendor."

    why is itunes saying "there is a problem with this installer package. a program required for this install to complete could not be run. contact your support personnel or package vendor."

    Go to START > ALL PROGRAMS > Apple Software Update. If it offers you a newer version of Apple Software Update, do it but Deselect any other software offered at the same time. Once done, try another iTunes install
    If you can't find ASU, go to Control Panel:
    XP - Add n Remove Programs
    Win7/Vista - Programs n Features
    Highlight ASU, click change then Repair.

  • Why has Apple not addressed the problems with its own software?

    Since I seem to have made the fatal mistake of upgrading my lovely iMac to Snow Leopard, most of my iLife 09 products have ceased working. In particular iDVD, where as before on faithful Leopard it did its job 100% it now decides to crash whenever it feels like it, leaving me with a third party application to use. Myself, along with approx 2000 other users have the same problem, so come on Apple, why the problems with your own software?? and why are we still waiting??

    Hi hipster36
    Welcome to apple discussions. Question for you: Is your mac intel based?
    If not, what's the objective in upgrading to Snow Leopard as opposed to continuing to work perfectly within Leopard? What added features were you considering to upgrade to? Are there any benefits in doing this for your own mac (even if it is intel based)?
    It's wise to approach all upgrades with caution (meaning always back up your current / working HD).
    Frankly, the way I upgrade is to clone my existing hard drive and then boot to the clone. Thereafter, I install the latest upgrade or OS (assuming it works well on the clone). I guess what I'm saying is to never upgrade without backing up and performing a test drive of the latest OS before you opt to alter your main hard drive. One can't assume that the latest and greatest Mac OS will continue to work fine on a mac which didn't first ship with this particular OS.
    This latest Mac OS /Snow Leopard is a bold step forward for apple. It's bold step forward in that it excludes all non-intel based macs.
    Message was edited by: SDMacuser

  • I requested service to send in my ipod touch for repair but was expecting a box to be sent so that I could send it in. Did I misinterpret? Am I supposed to send it in myself with my own package?

    I requested service to send in my ipod touch for repair but was expecting a box to be sent so that I could send it in. Did I misinterpret? Am I supposed to send it in myself with my own package?

    ??? Your right in the neighborhood of... Where's my box. Did you receive a contact or tracking number? I guess I would make a couple of calls to Apple to see where things are. Good luck. Cheers.

  • Have a problem with Optional JDBC package

    I downloaded and compiled optional package (JSR-169). I can't just add this jar to my NetBeans project because I will have an exception:
    java.lang.SecurityException: Prohibited package name: java.sql
    at sun.misc.Launcher$AppClassLoader.handlePackage(Launcher.java:472)
    at sun.misc.Launcher$AppClassLoader.defineClassPrivate(Launcher.java:516)
    at sun.misc.Launcher$AppClassLoader.access$500(Launcher.java:325)
    at sun.misc.Launcher$4.run(Launcher.java:546)
    I add this jar to my emulator and I have an exception:
    java.lang.NoClassDefFoundError: java.sql.SQLException
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getMethod(Class.java:958)
    at sun.misc.CVM.runMain(CVM.java:460).
    What should I do to add this jar to my netbeans project?

    I solved this problem
    If you or someone already have problems whit that, try don't generate the .jar separated and then use in your application project...
    you must compile the classes you have downloaded TOGETHER with you own working project classes.
    this works fine for me..
    best regards!

  • Can't install itunes due to a problem with windows installer package

    hello there i can't install itunes due to a problem with the windows installer package i found a page on this site (here is the link) http://docs.info.apple.com/article.html?artnum=304405 i done every thing on it and i still haven't been able to fix the problem i have tryed the following unstalling itunes deleteing the registry keys deleteing all the temp files disableing all anit-virus software and anit-spyware. runing cc clearner downloading a new installer for itunes and windows installer and the script thing. and trying to reinstall. nothing seems to work i don't know what else to do this is the error message i get when i try to install i tunes. "there is a problem with this windows installer package.
    A program required for thsi install to complete could not be run.
    Contact your suupport personnel or package vendor."
    Please Help i would be most greatfull for any advise given
    Message was edited by: Joe_TLC

    I pulled my brains out trying to figure this bug out and I may have a solution for you.
    All of it installed fine in my desktop, but a friend's laptop got the error you mentioned on quicktime, itunes, flash, officeXP and about anything else I tried to load for him.
    If you look in: C:\documents and settings\<username>\Local Settings\Temp there will be an iTunes install log...open it in Notepad and see if it isn't exiting with a 1619 error while running msiexec.exe
    If this is the case, this fix should work for you.
    Seems some configurations of XP (and possibly Vista) aren't allowing full administrator rights to the account you set up when you installed XP (even though User Editor says you do have those rights.)
    I read 2 MS articles and turned off simple file sharing, then gave ownership of the entire C: drive to the administrator. Logged the admin account off, logged his "admin" account in, and then gave rights to his personal directory to his account (c:\docs and settings\<username>)
    Once I did that, every install that had previously errored out performed flawlessly.
    The MS articles in question:
    http://support.microsoft.com/?kbid=316309 (1619 error)
    and
    http://support.microsoft.com/?kbid=308419 (how to set special permissions)
    Hope this helps!
    Doc

  • I'm trying to install iTunes 10.3 on my PC (windows vista) and I keep getting this message, "There is a problem with this windows package. A program required for this install to complete could not be run. Contact your support personnel or package vendor."

    I'm trying to install iTunes 10.3 on my PC (windows vista) and I keep getting this message, "There is a problem with this Windows Installer Package. A program required for this install to complete could not be run. Contact your support personnel or package vendor." I accidentally removed the Bonjour service from my system a few weeks ago, but my iTunes continued to work. Now I have no iTunes and I don't know how to fix it. SOMEONE PLEASE HELP!!!!

    a colleague of mine suffers from the same problem. did a quick look on the apple support pages. found many topics covering the same problem.
    also saw 1 marked as correct answer... (just browse the discussion pages before you ask, this answer appearantly was sitting there from oct. 14...)
    (i'm not on windows, so i can't test...)
    good luck!
    j.
    Correct Answer by Peter Lepere  on Oct 14, 2011 3:07 AM
    Hi Rick,
    by "repair" I mean I went to the control panel, option - programs and features, and in the list of all my installed programs I selected "Apple Software Update". On top of the screen you find the options Uinstall, Change and Repair. I clicked the repair button and that did the trick. After the repair I could uninstall the program. I also uninstalled iTunes, Apple Application Support, Apple Mobile Device Support en Bonjour, thus all Apple programs. Then I installed iTunes 10.5 again and everything went fine.
    Success,
    Peter

Maybe you are looking for

  • Error while creating the backup directory

    I bought a Time Capsule yesterday. As with all of Apple's networking products, it set up like a breeze. Took about 10 minutes. I have two MacBooks running on the network now. I set Time Machine to start working on both of them (one of them has used T

  • Deleting songs from Nano

    Even though I have the boxes "Open I Tunes when this iPod is connected" and "Manually Manage music" ticked, itunes does not launch when My Ipod is mounted. I open iTunes from the dock. Although The summary page is indicating that the ipod is full, I

  • Idoc or RFC

    Dear Guys Will some body explain the relationship between IDOC BAPIS and RFCs. I have developed a interface between SAP 4.6C and ASP.NET using .NET Connectors. When I am getting data by just using RFC then why should I go for IDOCs. My same is questi

  • Change of download folder?

    Please can you help? With a document open, go to save as, pdf, save in, "downloads". Is it possible to change this default folder to another. Many thanks

  • Installation of photoshop 7.0 on to windows 8 os

    how do i install photoshop 7.0 onto a windows 8 os computer