SwingWorker misses a package name

I hope someone will insert a package name in the 4th version
of SwingWorker. For the time being I add it by hands.
I can compile it ok with javac, but JBuilder 8 for some
reason complains when it sees
import SwingWorker;that it expects a dot at the end of line, where it finds
a semiconon.
See also
http://forum.java.sun.com/thread.jsp?forum=31&thread=232760

It should be fine if the class is in your classpath.Nope. I created a small jar with two classes as follows:
// A.java
public class A
   public void method() { System.out.println("class A");}
// -----8<------
// p/A.java
package p;
public class A
   public void method() { System.out.println("class p/A");}
}Thenjavac A.java p/A.java
jar cf A.jar A.class p/A.class
javac -classpath A.jar test/B.javaThe last command suceeds if class B is defined as// test/B.java
// package test;
// uncommenting the previous line results in:
// test/B.java:18: cannot resolve symbol
// symbol  : class A
// location: class test.B
//              new A().method();
//                    ^
// 1 error
public class B
        public static void main(String [] args)
                new p.A().method();
                new A().method();
}But it fails as described if B lives in a package.

Similar Messages

  • Package names missing when specifying classes

    Hi!
    I need to generate Javadoc for some (not all) of the classes in one of the packages. So I specified the class names in the batch file (thanks again, Doug!) instead of specifying the package name. Now only the classes in the package have HTMLs, but the package is missing from overview-tree.html, package-list, index.html and whatever.
    Any ideas?
    Thanks!

    Hi Doug:
    I used your link, installed 1.4, and now get the following message when I try to generate Javadoc with MIF Doclet:
    javadoc: In doclet class com.sun.tools.doclets.mif.MIFDoclet, method start has thrown an exception java.lang.reflect.In
    vocationTargetException
    java.lang.NoSuchMethodError: com.sun.tools.doclets.DirectoryManager.createDirectory(Ljava/lang/String;)V
    at com.sun.tools.doclets.mif.MIFObjectWriter.genWriter(MIFObjectWriter.java:98)
    at com.sun.tools.doclets.mif.MIFObjectWriter.init(MIFObjectWriter.java:76)
    at com.sun.tools.doclets.mif.MIFObjectWriter.<init>(MIFObjectWriter.java:50)
    at com.sun.tools.doclets.mif.MIFOverviewObjectWriter.<init>(MIFOverviewObjectWriter.java:64)
    at com.sun.tools.doclets.mif.MIFConfiguration.initOptions(MIFConfiguration.java:746)
    at com.sun.tools.doclets.mif.MIFDoclet.start(MIFDoclet.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
    at java.lang.reflect.Method.invoke(Method.java:313)
    at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:196)
    at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:95)
    at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:289)
    at com.sun.tools.javadoc.Start.begin(Start.java:114)
    When I try to generate "regular" HTML Javadoc (without MIF Doclet), I get the following:
    Building tree for all the packages and classes...
    javadoc: In doclet class com.sun.tools.doclets.standard.Standard, method start has thrown an exception java.lang.reflec
    t.InvocationTargetException
    java.lang.ClassCastException: com.sun.tools.javac.v8.code.Type$ErrorType
    at com.sun.tools.javadoc.ClassDocImpl.<init>(ClassDocImpl.java:111)
    at com.sun.tools.javadoc.ClassDocImpl.<init>(ClassDocImpl.java:134)
    at com.sun.tools.javadoc.DocEnv.getClassDoc(DocEnv.java:388)
    at com.sun.tools.javadoc.ClassDocImpl.superclass(ClassDocImpl.java:353)
    at com.sun.tools.doclets.ClassTree.processClass(ClassTree.java:139)
    at com.sun.tools.doclets.ClassTree.processClass(ClassTree.java:144)
    at com.sun.tools.doclets.ClassTree.buildTree(ClassTree.java:108)
    at com.sun.tools.doclets.ClassTree.<init>(ClassTree.java:67)
    at com.sun.tools.doclets.standard.Standard.startGeneration(Standard.java:105)
    at com.sun.tools.doclets.standard.Standard.start(Standard.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
    at java.lang.reflect.Method.invoke(Method.java:313)
    at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:196)
    at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:95)
    at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:289)
    at com.sun.tools.javadoc.Start.begin(Start.java:114)
    at com.sun.tools.javadoc.Main.execute(Main.java:44)
    at com.sun.tools.javadoc.Main.main(Main.java:34)
    In both cases, nothing is generated....
    What am I doing wrong?
    Thanks
    Benzi

  • Quick Question: package names com.whatever.blah.ClassName

    I want to put a bit more time aside this week to explain things I see in Java to my old brain (I don't quite 'get it' like you younger people :-))
    I often see things like this in example code:
    import com.macfaq.io.SafeBufferedReader;and it's crossed my mind I don't understand this.
    My guess is that the program concerned is going to look for a class called SafeBufferedReader. My confusion is twofold;
    1: I'm guessing I would need to locate this class/library: com.macfaq.io.SafeBufferedReader; (probably from macfaw.com)
    2: I'm more interested to know wow would I structure the directories in relation to the main script to deal with this naming context? Would it be:
    /root {contains main program}
    /root/com/macfaq/io/ {which would contain SafeBufferedReader}
    This kind of thing appears to be missing from the basic tutorials I've looked at and appears to be 'assumed' knowledge :-)

    My guess is that the program concerned is going to look for a class called SafeBufferedReader.Well there's nothing else it could mean.
    1: I'm guessing I would need to locate this class/library: com.macfaq.io.SafeBufferedReader; (probably from macfaw.com)Correct.
    2: I'm more interested to know wow would I structure the directories in relation to the main script to deal with this naming context? Would it be:
    /root {contains main program}No. /root/your/package/name/whatever contains your.package.name.whatever.MainProgram. You shouldn't be writing classes that aren't in a package.
    /root/com/macfaq/io/ {which would contain SafeBufferedReader}No. You will be downloading a .jar file that contains that class.
    This kind of thing appears to be missing from the basic tutorials I've looked at and appears to be 'assumed' knowledge :-)See the General Information here.

  • *Superpackage missing for package Package Z_ART_MAPPROVE* error in SE80

    Dear Experts,
    Devalopers are not able to create package in MI 7.1
    its giving error like Superpackage missing for package Package Z_ART_MAPPROVE
    for developer package.
    Even for my admin user-id its showing same error.... means we cant say its an authorization error.
    What to do.
    Pls reply me asap..
    Regrads,
    Gaurav Jain
    Edited by: Gaurav_Tiku_anni_jain on May 22, 2009 12:09 PM

    Every package whatever created by user should be part of some package. So, while creation of package, you have to select the super package name from the input list available while creating package.
    If the Software component is choosen as 'LOCAL' while creation of package, then you have to select $TMP as super package. For any other type of software component we need to select super package (Either BASIS or your own package if you are creating sup-package).
    Regards,
    Siva.
    Edited by: Siva Satya Prasad Yerra on May 25, 2009 2:35 PM

  • I need to remove "air." from package name. I'm get a Layout xml error when repackaging android app..

    So, i'm doing this on my own app. I made an update for an older app that was build using Native Android. But this time, i used Adobe AIR... The catch is Adobe likes to append a "air." to the front of your package name without asking you. So basically I can't upload my update because it has a new package name is now "air.com.mycompany.myapp" rather than the original "com.mycompany.myapp"
    Basically I'm going through this guide..
    http://helpx.adobe.com/air/kb/opt-out-air-application-analytics.html
    I followed all the steps, made all the adjustments to the androidmanifest.xml like it asks.
    But after going along with the above guide, with no issues when i get to the step that says
    "Run the following command to create the resource file for the updated AndroidManifest.xml:"
    I run this..
        "/Users/brybam/Documents/eclipse/android-sdk-mac_x86/platform-tools/aapt" package -f -M AndroidManifest.xml -F resources.arsc -I "/Users/brybam/Documents/eclipse/android-sdk-mac_x86/platforms/android-8/android.jar" -S ./res
    But I keep getting the same error regarding the xml files in res/layout
        ./res/layout/expandable_chooser_row.xml:1: error: Error parsing XML: not well-formed (invalid token)
        ./res/layout/expandable_multiple_chooser_row.xml:1: error: Error parsing XML: not well-formed (invalid token)
        ./res/layout/main.xml:1: error: Error parsing XML: not well-formed (invalid token)
        ./res/layout/multiple_file_selection_panel.xml:1: error: Error parsing XML: not well-formed (invalid token)
        ./res/layout/ssl_certificate_warning.xml:1: error: Error parsing XML: not well-formed (invalid token)
    The guide doesn't say anything about these xml files, and im not sure what to do with these or how to handle them.
    If i go into the res/layout folder, and just delete these (i know they're necessary. But i just deleted them as a test, to get through the rest of the guide...)
    I was able to get through the rest of the steps in the guide fine, make an apk, and put it on my phone...only to find out the app will crash the moment you try to run it. Probably because i deleted the layout xml files...But i cant get the command i need to run above to accept them!
    So, earlier in the guide they have me use thing thing called the "AXMLPrinter2.jar" to make the AndroidManifest.xml readable so i can edit it.
    I run something like this:
        java -jar "/Users/brybam/Desktop/repackage/AXMLPrinter2.jar" AndroidManifest.xml > AndroidManifest.xml.bk
    This makes a new file "AndroidManifest.xml.bk" and i can edit that.
    So, I was thinking with all of these layout xml files, maybe I could run this "AXMLPrinter2.jar" on them and then edit them. Because right now if you open them they're not human readable, and its hard for me to work on them if they're not...
    I tried this thinking i could do the same thing...
        java -jar "/Users/brybam/Desktop/repackage/AXMLPrinter2.jar" main.xml > main.xml.bk
    Just get a blank file and a console erorr when trying to use the AXMLPrinter2.jar on the layout xml files...
        java.lang.ArrayIndexOutOfBoundsException: 67
                  at android.content.res.StringBlock.getShort(StringBlock.java:231)
                  at android.content.res.StringBlock.getString(StringBlock.java:91)
                  at android.content.res.AXmlResourceParser.getName(AXmlResourceParser.java:140)
                  at test.AXMLPrinter.main(AXMLPrinter.java:56)
    So, I think my whole issue is based around these XML files not being converted to human readable before i try and re-package....
    EDIT:::
    Ok, so I found a site that talks about the error I'm getting but it's in chinese, and even after translating the page...I'm still not well versed with terminal and this stuff to get it.
    It reads:
    "Error.
    Final conclusion:
    In minSdkVersion <= 7, AXMLPrinter2.jar can normally decompile xml file
    Greater than 7 can not be normal decompile xml file (AndroidManifest.xml except)
    Give way to share a batch decompile xml file:
    First, create a *. Txt file
    Stresses inside the content authoring
    for / r layout%% a in (*. xml) do @ java-jar AXMLPrinter2.jar "%% a" >> "%% a". txt
    Then this txt file extension into bat form, and this BAT the file and AXMLPrinter2.jar on the same directory will be decompiled xml into the layout directory
    Decompilation results can be generated by executing the bat file multiple xml files."
    - http://hi.baidu.com/ghcghc/item/ecbaa1ce997cb225a0b50ac2
    Maybe someone with more know-how could explain what they're explaining? I get that he's saying the issue im seeing appears when you're using minSdK <=7 but I need to use minSdk 8. Does anyone understand this work around? And how I might go about it on a Mac with terminal?
    I wish adobe would make it easy to remove the "air." from the package name. If they want to convert old Native devs to AIR devs...the transition needs to be seamless. But now I'm about to have to go back to Native because I can't update an app I already have out on the market with an air app.

    Hello~
         I also tried to remove "air." package name in air application. And i encounter the same problem.
         I do not find any solution to decode the xml inside res folder by AXMLPrinter2.jar. And those xml inside is compressed which is unreadable.
         However, what you can do is copying the structure of res folder. And go to your air sdk file path -  adobeair-sdk-folder/lib/android/lib/resources/
         Replace those file exists in your res folder. And copy "values" folder to your res folder.
         Hope this solve your problem~

  • Class name and package name clashing

    When i have a class and a package with the same name, I cannot access classes in the package. For example I have 3 classes and 1 package as below
    - Test.java
    - PackageName.java
    + PackageName // this is a directory
    - MyClass.java
    Below are the codes of .java files
    Test.java
    =======
    public class Test { PackageName.MyClass a = new PackageName.MyClass ();}
    PackageName.java
    ===============
    public class PackageName{ }
    MyClass.java
    ==========
    package PackageName; public class MyClass { }
    I can compile PackageName.java and MyClass.java but not Test.java. It says
    cannot resolve symbol
    symbol : class MyClass
    location: class PackageName
    PackageName.MyClass a = new PackageName.MyClass ();
    But if I remove the PackageName.java, I can compile Test.java perfectly. I think when I use PackageName.MyClass, java thinks that I try to access an inner class MyClass of PackageName class, and that does not exists. Is there any way to solve this ambiguation, other than making the package name and class name different? Thank you very much.

    This works fine: just add an import to Test.java.
    import PackageName.MyClass;
    public class Test
        public static void main(String [] args)
            MyClass a = new MyClass();
    public class PackageName {}
    package PackageName;
    public class MyClass {}It's a pretty wacky, useless example, but it works.
    Plus I thought inner classes would have a dollar sign in their .class file names. When I compile this:
    public class OuterClass
        public static void main(String [] args)
            OuterClass outer = new OuterClass();
            System.out.println(outer);
        public String toString() { return "I'm an OuterClass"; }
        class InnerClass
            public String toString() { return "I'm an InnerClass"; }
    }I see two .class files: OuterClass.class and OuterClass$InnerClass.class
    Why make up examples like this? It's hard enough writing code, and it's easy to disambiguate for the compiler.

  • How to change the package name of Managed Bean class

    Hi: Gurus, when ever I create a new JSP page the Creator creates a code behind file with a package name untitled. Is there any way to change this package name? Can't the Creator gives us an option before genereating manged bean page to choose a package name? And then create the Java source directory structure on the basis of the pakcage name?
    Regards,
    Rashid.

    In the Project Navigator (default location is middle right), go to Java Sources, and you can rename the package ("untitled") to something else by right-clicking it or by left-clicking (just like Windows Explorer).
    I agree, though, that giving the developer an option during creation of the JSP page would be nice.

  • The package name The Gallbladder-4.itmsp contains an invalid character(s).  The valid characters are: A-Z, a-z, 0-9, dash, period, underscore, but the name cannot start with a dash, period, or underscore

    I have an iBook on itunes and I am trying to upload a new version of the book. I am following the workflow through iBooks Author and when I fell out all of the infromation for the package on iTunes producer i then hit the deliver button and I get the following error message:
    The package name The Gallbladder-4.itmsp contains an invalid character(s).  The valid characters are: A-Z, a-z, 0-9, dash, period, underscore, but the name cannot start with a dash, period, or underscore.
    As far as I can tell the file that is being referenced does not meet the criteria axpressed in the erro message and in fact that file has been created by iBooks Author so one would think there shouldnt be an error.
    I also get the following to error messages:
    Apple's web service operation was not successful
            Unable to authenticate the package: The Gallbladder-4.itmsp
    Would ove any help.
    Thanks,
    Jeff

    Thank you so much for your help.
    For anyone that would like to check out this book it can be downloaded at:
    https://itunes.apple.com/us/book/the-gallbladder/id598317335?ls=1
    Please check out our free medical education blog by Jeffrey Eakin using iBooks Author at:
    http://free-medical-education-ibooks-author.blogspot.com

  • Difficult to get good package names with ojspc in automated build

    If I understand the documentation for "ojspc" correctly, there is an aspect of its functionality that makes it difficult to have a convenient automated build which can also get good package names for the generated Java source files.
    If you don't specify the "-packageName" option, ojspc will build a package name relative to the current directory, including sub-directories. However, specifying "-packageName" will ONLY use that package, and will not create sub-packages associated with sub-directories.
    If you don't use the "-packageName" option, then you have to run the build from the root directory of your JSP files. When you're running an automated build with ANT, it's not convenient to do this.
    The likely result of this is that I would have to make sure that all of my JSP files are named differently, even if they're in different directories, and use the "-packageName" option to specify a particular package name for all of the generated source files.

    After more careful reading, I realized that using the "-appRoot" option (without using "-packageName") makes it possible for an ANT build to generate good package names (with directories).
    The following note, however, in the ojspc documentation is kind of odd:
    "It is advisable that you run ojspc once for each directory of your JSP application, so files in different directories can be given different package names, as appropriate."
    I assume this is referring to using the "-packageName" option. If you don't need to use "-packageName", especially if you have multiple directories of JSP pages, it is much easier to just let ojspc pick the package names.

  • Not allowed to import classes without package names?

    Hi,
    I have a few questions on Packages and importing?
    1. Is the following true that it is illegal to import classes in the same package as the current class, will this cause a comilation error? If this is the case where in the Java Language specification is this actually written as I could not find it?
    2. This has probably been answered by question 1 but if I have 2 classes in the same package and if I import 1 of the classes into the other class, is it illegal to import it by just using the class name and not the package name as well, ie
    if the package name is ie.tcd
    and the 2 class names are exp1.class and exp2.class, can I do this in class 2
    package ie.tcd;
    import exp1;
    public class exp2 {
    3. Is it illegal to import classes that are not explicitly part of any package or must a class be part of a package to be imported. I read somewhere that while this was always illegal it is only after jdk 1.4.2 that this is being enforced? If this is the case where in the Java Language specification is this actually written as I could not find it either?
    Thanks very much for any help,
    John

    Was just also wondering, 1 other thing, I am looking
    at someone elses code they have 2 classes (Class A
    and Class B) in the same package (pkg). The person
    imports class A into B:
    package pkg;
    import A;
    public class B {
    Is this legal code (or was it ever)?Not if A is really in pkg.A. If there is an A in the unnamed package it was legal, or at least it was understood by the compiler, and now it isn't (to both).
    Can you import or is there a point in importing a class in the same
    package?Only by naming the package in the import statement. If the current and the import statement are in the same package the import is redundant.
    If there is a point would you import just be
    using the class name (this would be illegal after jdk
    1.4) or should you use the whole package name even
    though it is in the package anyways?As I understand it you must always use the whole package name in imports.

  • Package name in Solaris 10

    Hi,
    I try to uninstall the following path:
    /usr/spool/lp/model/ppd/system/foomatic
    for all the printer model files.
    Is there a Solaris 10 Package name associate with these files that I can use pkgrm to do?
    Thanks!

    You can get the associated package name by running:
    grep lp\/model\/ppd\/system\/foomatic /var/sadm/install/contents | awk '{ print $10 }' | sort -u

  • How to get the package name of a procedure used in a process flow activity

    Hi all. I'm on OWB 11.2.0.2.0.
    When I used a packaged procedure or function in a mapping operator, I can find out the package.program_unit name by getting the operator's FUNCTION_NAME property. For example,
    OMBRETRIEVE MAPPING '$mapName' OPERATOR '$operName' GET PROPERTIES (FUNCTION_NAME)
    But when the same is used in a process flow activity, I can't find a property name that will give me the same information. I can get the BOUND_NAME, it does not tell me the package name. It must be stored in the activity properties because when you pull up the Synchronize dialog for the activity, it knows the package name.
    Is there a way to get this via an OMBRETRIEVE?
    Thanks.

    ANA, this is exactly what I needed. Thank you so much. I saw REFs also in the OMBRETRIEVE MAPPING/OPERATOR syntax, but went cross-eyed trying to figure out if I could use the same there. The closest I found was GET BOUND_OBJECT.
    Thanks again!

  • 2.1 RC1 - Search Source Code results - Go To package name doesn't work

    Hi.
    When I perform a search through Reports -> Data Dictionary -> PLSQL -> Search Source Code and I right-click -> Go To ... on a row of the results, nothing happens.
    Regards.
    Alessandro
    Edited by: archimede on Dec 2, 2009 12:29 PM

    Sorry Vadim, but the procedure to reproduce the bug is different:
    1) Open the Reports tab
    2) Expand Data Dictionary node
    3) Expand PLSQL node
    4) Click on Search Source Code
    5) Select a Connection
    6) Click on Text Search, enter a string to search and click Apply
    7) On the results page, right-click any line and select Go To <package name>
    8) The package opens on line 1, not the line shown on step 7
    While we're at it, do you think it would be possible to make the above process more user-friendly? Like, for example, right-clicking on a Connection and have the Search Source Code option there (that would take me directly to step 6)?
    Regards.
    Alessandro

  • Change package name of a form

    Hi,
    I want to change the package name of a Form in se71 from $TMP to a company package name. I would like to know the step by step process and direct answer please!
    Points will be rewarded!
    Thanks!

    Hi there,
    I believe the only solution for your issue is to open the form in the change mode,
    then click on the File--> Save As and then give some name and assign the package,,
    then you can always delete the previous form save in $tmp.
    Let me know if you need further help.
    Thanks-

  • Changing Package Name of an AIR apk

    Hi. I have created an AIR app that is currently in the market. To update the app, obviously I must keep the same package name. My first version's were packaged using Eclipse with the ADT plugin.
    Now to use AIR 3.0 Native Extensions (ANE) which were not available when I first developed the app, I currently must create my APK using AIR's command line tools. Unfortunately, these command line tools force you to have a package name that starts with the word "air". For example, I need the package name "com.example". AIR creates the package name as "air.com.example".
    So now, I cannot update my app in the market since the package name has changed. Adobe has this horrific article to help you rename and remove the "air" in the package. I'm not a great programmer so this has really stumped me.
    http://kb2.adobe.com/cps/875/cpsid_87562.html
    Apparently this info is out of date or incorrect in a few areas.
    I have completely stumbled at step 12 which uses apkbuilder:
    apkbuilder final.apk -u -z resources.arsc -f classes.dex
    I am getting this error message:
    THIS TOOL IS DEPRECATED. See --help for more information.
    java.io.FileNotFoundException: resources.arsc does not exist
    I have used step 10 to create the new resources.arsc file. It clearly DOES exist and in the correct location. I tried using apkbuilder with other resources.arsc files taken from other projects. I still get the same error message.
    Maybe there is another way to do this using another tool like like apkTool. http://code.google.com/p/android-apktool/
    I tried this but then couldn't get jarsigner to sign the apk properly.
    Is there a chance in hell of this working? There doesn't seem to be much about this topic on the internet. If anyone is interested in this, I have a zip file with a sample AIR apk, windows bat files for all the command line work, and all the needed utilities so they don't need to be downloaded. To get started you just need to change my path.bat to fit your system. And you need notepad++ (or an equivalent) to batch automate renaming the package name across several files.
    http://bradwallacedesign.com/dktimer/renameApkProject.zip
    Thanks so much!

    If the DisplayObject is on the timeline then its name cannot
    be modified, but the name property of dynamically created
    DisplayObjects can be changed. (DisplayObject.name:String
    read/write).

Maybe you are looking for