Rmic Public class com must be defined in a file called "com.java".

Hello,
After compiling with javac which works perfectly, rmic fails with the message below. I have added the -verbose flag in an attempt to make it more clear to me however, the error does't make sense, why would rmic complain about a missing '{' where javac wouldn't? Any thoughts on this would be greatly appreciated.
[yourabi@happyending java]$ rmic -classpath $CLASSPATH:. -verbose -keepgenerated -nowrite com/jeteye/lucene/DistributedSearchFacade
[loaded ./com/jeteye/lucene/DistributedSearchFacade.class in 22 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/rmi/server/UnicastRemoteObject.class) in 2 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/rmi/server/RemoteServer.class) in 0 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/rmi/server/RemoteObject.class) in 2 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/lang/Object.class) in 1 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/rmi/Remote.class) in 0 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/io/Serializable.class) in 0 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/lang/CloneNotSupportedException.class) in 0 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/lang/Exception.class) in 0 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/lang/Throwable.class) in 3 ms]
[loaded ./com/jeteye/lucene/IRemoteIndex.class in 0 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/rmi/RemoteException.class) in 1 ms]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/io/IOException.class) in 4 ms]
[found remote interface: com.jeteye.lucene.IRemoteIndex]
[found remote interface: java.rmi.Remote]
[string used for method hash: "index(Lcom/jeteye/domain/Jetpak;)V"]
[string used for method hash: "deleteByAlias(Ljava/lang/String;)V"]
[string used for method hash: "deleteByJPID(Ljava/lang/String;)V"]
[string used for method hash: "dateSinceOptimized()Ljava/util/Date;"]
[string used for method hash: "transactionsSinceOptimized()I"]
[string used for method hash: "numTransactions()I"]
[string used for method hash: "startp()Z"]
[string used for method hash: "shutdown()Z"]
[string used for method hash: "isStarted()Z"]
[string used for method hash: "isShutdown()Z"]
[string used for method hash: "optimize()Z"]
[found remote method <0>: java.util.Date dateSinceOptimized() throws java.rmi.RemoteException]
[found remote method <1>: void deleteByAlias(java.lang.String) throws java.rmi.RemoteException]
[found remote method <2>: void deleteByJPID(java.lang.String) throws java.rmi.RemoteException]
[found remote method <3>: void index(com.jeteye.domain.Jetpak) throws java.rmi.RemoteException]
[found remote method <4>: boolean isShutdown() throws java.rmi.RemoteException]
[found remote method <5>: boolean isStarted() throws java.rmi.RemoteException]
[found remote method <6>: int numTransactions() throws java.rmi.RemoteException]
[found remote method <7>: boolean optimize() throws java.rmi.RemoteException]
[found remote method <8>: boolean shutdown() throws java.rmi.RemoteException]
[found remote method <9>: boolean startp() throws java.rmi.RemoteException]
[found remote method <10>: int transactionsSinceOptimized() throws java.rmi.RemoteException]
[loaded /usr/local/java/jdk1.5.0_04/jre/lib/rt.jar(java/lang/RuntimeException.class) in 1 ms]
[wrote /home/yourabi/workspace/JetEye-HEAD/main/src/java/com/jeteye/lucene/DistributedSearchFacade_Stub.java]
[parsed /home/yourabi/workspace/JetEye-HEAD/main/src/java/com/jeteye/lucene/DistributedSearchFacade_Stub.java in 70 ms]
/home/yourabi/workspace/JetEye-HEAD/main/src/java/com/jeteye/lucene/DistributedSearchFacade_Stub.java:4: '{' expected.
public final class com/jeteye/lucene/DistributedSearchFacade_Stub
^
[checking class com]
/home/yourabi/workspace/JetEye-HEAD/main/src/java/com/jeteye/lucene/DistributedSearchFacade_Stub.java:4: Public class com must be defined in a file called "com.java".
public final class com/jeteye/lucene/DistributedSearchFacade_Stub
^
2 errors
[done in 449 ms]

[yourabi@happyending java]$ rmic -classpath
$CLASSPATH:. -verbose -keepgenerated -nowrite
com/jeteye/lucene/DistributedSearchFacadermic needs the class name not the file name:
rmic -classpath $CLASSPATH:. -verbose -keepgenerated -nowrite com.jeteye.lucene.DistributedSearchFacade

Similar Messages

  • Why class name must be same as its file name?

    just curious

    http://forum.java.sun.com/thread.jspa?forumID=54&threadID=613486
    http://forum.java.sun.com/thread.jspa?forumID=256&threadID=452360
    http://forum.java.sun.com/thread.jspa?forumID=513&threadID=516940

  • Public Class error

    Hello I am getting this error:
    C:\mpg.java:3: Public class Mpg must be defined in a file called "Mpg.java".
    public class Mpg
    ^
    1 error
    Tool completed with exit code 1
    My program is named mpg.java. I changed it to Proper case as Mpg.java and i get 5 more errors :
    C:\Mpg.java:9: Method INFORMATION_MESSAGE(null, java.lang.String) not found in class javax.swing.JOptionPane.
              getMpg = JOptionPane.INFORMATION_MESSAGE (null, "Valid miles and gallons are >0 \nEnter -1 for miles to end processing.");
              ^
    C:\Mpg.java:11: Variable miles may not have been initialized.
              Mpg = miles / gallons;
              ^
    C:\Mpg.java:11: Variable gallons may not have been initialized.
              Mpg = miles / gallons;
              ^
    C:\Mpg.java:12: Wrong number of arguments in method.
              JOptionPane.showInputDialog (null, "Number of miles: " + miles + "Results", JOptionPane.QUESTION_MESSAGE );
              ^
    C:\Mpg.java:13: Wrong number of arguments in method.
              JOptionPane.showInputDialog (null, "Number of gallons: " + gallons + "Results", JOptionPane.QUESTION_MESSAGE );
              ^
    C:\Mpg.java:14: Wrong number of arguments in method.
              JOptionPane.showInputDialog (null, "MPG this tankful: " + Mpg + "Results", JOptionPane.INFORMATION_MESSAGE );
              ^
    6 errors
    Tool completed with exit code 1
    I am confused...here is the program code:
    import javax.swing.JOptionPane;
    public class Mpg
              public static void main(String args[])
              String getMpg;
              double Mpg, gallons, miles;
              getMpg = JOptionPane.INFORMATION_MESSAGE (null, "Valid miles and gallons are >0 \nEnter -1 for miles to end processing.");
              Mpg = Double.parseDouble(getMpg);
              Mpg = miles / gallons;
              JOptionPane.showInputDialog (null, "Number of miles: " + miles + "Results", JOptionPane.QUESTION_MESSAGE );
              JOptionPane.showInputDialog (null, "Number of gallons: " + gallons + "Results", JOptionPane.QUESTION_MESSAGE );
              JOptionPane.showInputDialog (null, "MPG this tankful: " + Mpg + "Results", JOptionPane.INFORMATION_MESSAGE );
              System.exit(0);

    Try this code and compare it with what you have to see where you were getting confused. The following link should also help you understand the API :
    http://java.sun.com/j2se/1.3/docs/api/index.html
    import javax.swing.JOptionPane;
    public class Mpg
    public static void main(String args[])
    String miles = JOptionPane.showInputDialog("Enter miles :");
    String gallons = JOptionPane.showInputDialog("Enter gallons :");
    double dblMiles = Double.parseDouble(miles);
    double dblGallons = Double.parseDouble(gallons);
    JOptionPane.showMessageDialog(null, "MPG = " + (dblMiles / dblGallons));
    System.exit(0);
    Ronny.

  • Public class and just class ??

    when i try to compile this program i get an error message
    /* Well, maybe this isn't completely useless. */
    /* This program uses API introduced in 1.1. */
    public class Useless {
    public static void main(String[] args) {
    System.out.println(java.util.Locale.getDefault());
    the error message is this :
    Public class Useless must be defined in a file called "Useless.java".
    ut when i take out the public and just leave it as
    class Useless {
    it works
    why is that ???
    any info would be greatfully recieved
    thanxs
    Anthony

    If you declare a class as public, it must be the same name as your filename, you are going to open the class to public for every purpose. But you can only have 1 public class in every file.
    If you declare a class without a public keyword, you can have as many classes of that type you want inside your class, its not gonna link up with the filename and it will not be open to public, in this sense, it is not visible to other classes which are not in the same package.

  • Public class or just simply class?

    As I continue my reading into various books there are some books which will have you add the access modifier public in front of your classname. Other books will just have you leave it out. I tried out a simple program that declared a class in a separate file and then the second file was the main class file with the main method.
    It didn't matter whether or not I removed the keyword public in front of the name of my class in the first file. The program compiled and ran just fine. So I'm doing some looking on the web trying to understand what the word public means when it's placed in front of your classname.
    According to Sun:
    A class may be declared with the modifier public, in which case that class is visible to all classes everywhere. If a class has no modifier (the default, also known as package-private), it is visible only within its own package (packages are named groups of related classes?you will learn about them in a later lesson.)
    I picked this up from some other source:
    Java provides a default specifier which is used when no access modifier is present. Any class, field, method or constructor that has no declared access modifier is accessible only by classes in the same package.
    So if I understand this correctly if I place the word public in front of my classname my class is visible to all classes and all packages?
    And if I don't place the word public in front of my classname then the class that I defined is only accessible only by other classes in the same package whatever that package happens to be?
    So if I wrote this:
    public class MyVehicle
    }Then if I imported a package called import.java.GiveMeSomePaintingTools;
    Then the classes contained in the GiveMeSomePaintingTools would have access to the MyVehicle class that I made?
    And if I just wrote this:
    class MyVehicle
    }Then the classes in the package GiveMeSomePaintingTools would not have access to the class I made?
    That's what I gather...
    Edited by: 357mag on Jun 3, 2010 5:53 AM

    357mag wrote:
    Then the classes in the package GiveMeSomePaintingTools would not have access to the class I made?The clue as to what access modifier to use for a class will often be in its name. Generally you write a class to do something. If what it does is something you want the whole world to be able to do, then use public; if it is only used by other classes of a package you've written, then use the default. The third one is protected: you use this when the class needs to be visible within a hierarchy (especially one that can be extended by anyone).
    As an example: [java.math.BigInteger|http://java.sun.com/javase/6/docs/api/java/math/BigInteger.html] is a class that allows you to store arbitrarily large integer values. Sun clearly felt that this was useful enough to allow anyone to have access to it, so it is public. However, it is defined as immutable: ie, once you've created a BigInteger object, you cannot change its value. This is not optimal for arithmetic, where you may have several operations to perform to get a result: If each of them is forced to create a new object, you could waste a lot of time (and space).
    So the designers created a class called MutableBigInteger which is used by the BigInteger class (and also by BigDecimal) to hold interim values for calculations. Since this class is only used by those classes, it is defined with the default modifier (which is why you've never seen it).
    HIH
    Winston

  • Error: "Could not resolve [public class] to a component implementation

    Here's another clueless newbie question! :-(
    I define a public class "DynamicTextArea" at the top of the file, and get the compiler error message "Could not resolve <DynamicTextArea> to a component implementation" at the bottom of the same file.
    Clearly, I don't understand something very basic.
    (The code between the commenrted asterisks was originally in a separate package file, which I couldn't get either mxmlc or FlexBuilder to find, so rather than fight that issue now, I moved it into the same file.)
    Here's the file:
    <?xml version="1.0" encoding="utf-8" ?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    >
    <!--****************************************************************-->
        <mx:Script>
        <![CDATA[
      import flash.events.Event;
      import mx.controls.TextArea;
    public class DynamicTextArea extends TextArea{
        public function DynamicTextArea(){
          super();
          super.horizontalScrollPolicy = "off";
          super.verticalScrollPolicy = "off";
          this.addEventListener(Event.CHANGE, adjustHeightHandler);
        private function adjustHeightHandler(event:Event):void{
          trace("textField.getLineMetrics(0).height: " + textField.getLineMetrics(0).height);
          if(height <= textField.textHeight + textField.getLineMetrics(0).height){
            height = textField.textHeight;    
            validateNow();
        override public function set text(val:String):void{
          textField.text = val;
          validateNow();
          height = textField.textHeight;
          validateNow();
        override public function set htmlText(val:String):void{
          textField.htmlText = val;
          validateNow();
          height = textField.textHeight;
          validateNow();
        override public function set height(value:Number):void{
          if(textField == null){
            if(height <= value){
              super.height = value;
          }else{      
            var currentHeight:uint = textField.textHeight + textField.getLineMetrics(0).height;
            if (currentHeight<= super.maxHeight){
              if(textField.textHeight != textField.getLineMetrics(0).height){
                super.height = currentHeight;
            }else{
                super.height = super.maxHeight;        
        override public function get text():String{
            return textField.text;
        override public function get htmlText():String{
            return textField.htmlText;
        override public function set maxHeight(value:Number):void{
          super.maxHeight = value;
        ]]>
      </mx:Script>
    <!--****************************************************************-->
         <mx:Script>
        <![CDATA[
          import mx.controls.Alert;
          private var str:String = "This text will be long enough to trigger " +
            "the TextArea to increase its height.";
          private var htmlStr:String = "This <b>text</b> will be <font color='#00FF00'>long enough</font> to trigger " +
            "the TextArea to increase its height.";
          private function setLargeText():void{
            txt1.text = str;
            txt2.text = str;
            txt3.text = str;
            txt4.text = str;
            txt5.htmlText = htmlStr;
            txt6.htmlText = htmlStr;
            txt7.htmlText = htmlStr;
            txt8.htmlText = htmlStr;
        ]]>
      </mx:Script>
      <DynamicTextArea id="txt1" width="300" height="14"/>
      <DynamicTextArea id="txt2" width="300" height="20"/>
      <DynamicTextArea id="txt3" width="300" height="28"/>
      <DynamicTextArea id="txt4" width="300" height="50"/>
      <DynamicTextArea id="txt5" width="300" height="14"/>
      <DynamicTextArea id="txt6" width="300" height="20"/>
      <DynamicTextArea id="txt7" width="300" height="28"/>
      <DynamicTextArea id="txt8" width="300" height="50"/>
      <mx:Button label="Set Large Text" click="setLargeText();"/>
    </mx:Application>
         Thanks for any insight you can provide!
    Harvey

    Gordon:
        As you've noted, there were multiple  misunderstandings.
        Some are due to references in the language which are  different from uses in pre-existing languages.
        Take "name spaces". They look like URLs but they're  not. One of the first errors I made when starting Flex was to try to browse to  http://www.adobe.com/2006/mxml. I  figured that it would have some description of the language. But it didn't. In  spite of LOOKING like a URL, it doesn't point to anything; it's really just an  arbitrary magic incantation, like "Open Sesame".
        But, then when I wanted to use my OWN namespace, I  find that it's NOT arbitrary, and does have to point to something, but it's  still not a URL. The "AHA" moment was when Michael told me that "*" means "look  in this directory for a file with the name later named in an import statement,  but not named here". And if the file was in subfolder  "X" I'd have to use "X.*", while if it were a URL I'd use slash instead of  dot, but never an asterisk.
        When the language syntax is so contrary to the  expectations of people coming from a declarative language or web programming  background, I think it is important to explicitly address the differences and  disabuse them of their preconceptions. I think the same should apply to the ways  in which ActionScript differs from ECMAScript.
        Another problem adding to my confusion is the habit  of naming variables with the names of keywords but with capitalization changes.  Not only does that set readers up for subtle "gotchas", but makes it unclear  which names are truly arbitrary, and which are required by the  compiler.
    It might be a good idea to have a convention of an  identifiable format for user variables. Many authors use names like  myButton for that purpose.
        It would also be helpful if printed text could  simulate the syntax coloring of the better editors, or at least have more  in-source comments saying exactly what each line does. (Or both)
        Another aid to understanding would be to provide a  reference to the alternative (MXML or AS) way of doing anything, whenever you  demonstrate one of the ways.
        I find that the emphasis on using FlexBuilder  distracts from a sense of what is really going on behind the scenes. E,g.: If  FlexBuilder automatically sets up the folder structure, I don't learn to do it  myself. I like to work at the code level, so when something goes wrong I don't  have to worry about what level it went wrong at.
        Also, not everyone is willing to drop $600 or $250  BEFORE they've learned whether they even like Flex. Your tutorials are, by  definition, addressed to newcomers who may well not yet have committed to the  expense of FlexBuilder. So more emphasis on using mxmlc would be nice. It would  also be helpful to discuss how to use local servers, like Tomcat, during the  development stage.
        Thanks for asking my opinion. I'm afraid that my 40  years of programming experience may make it harder for me to adapt to this new  style of programming than it would be for a kid with a tabula rasa. But, it  looks like it'll be fun once I get over the hump!
    Harvey

  • Class must be in a file called

    I have a JSP which imports a class, and uses an instance of the class as a bean.
    It compiles and runs under Jdeveloper, but then I deploy to Tomcat 3.2.2 under Linux I get the following error from the compiler when running it.
    "Class x must be in file called x.java"
    I have checked the .jar file, the file is there, with the correct case, in the correct package hierarchy etc.
    Anyone seen this before, its got me stumped
    Andrew

    I hate that message. I've run into it several times myself when deploying to WAS 3.5 (which is based off Apache and Tomcat...)
    What I've found is that somehow the jar file has been corrupted that it opens for everything except the web server. My fix is to delete all copies of the jar file and recreate it, then restart the web app server.

  • Can we define two public classes in a same file?

    Is it possible to define two public classes in a same file
    Thanks a lot
    So jag

    Do you realize RMI too, what caused this please!
    loading chat.rmi.RMIServer.class for debugging...
    chat.rmi.RMIServer.class successfully loaded
    java.rmi.StubNotFoundException: Stub class not found: chat.rmi.RMIServer$RemoteLogonManager_Stub; nested exception is:
    java.lang.ClassNotFoundException: chat.rmi.RMIServer$RemoteLogonManager_Stub
    java.lang.ClassNotFoundException: chat.rmi.RMIServer$RemoteLogonManager_Stub
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at sun.rmi.server.RemoteProxy.loadClassFromClass(RemoteProxy.java:198)
    at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:100)
    at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:62)
    at sun.rmi.server.UnicastServerRef.setSkeleton(UnicastServerRef.java:155)
    at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:115)
    at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:102)
    at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:276)
    at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:180)
    at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:80)
    at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:67)
    at chat.rmi.RMIServer$RemoteLogonManager.<init>(RMIServer.java:23)
    at chat.rmi.RMIServer.<init>(RMIServer.java:16)
    at chat.rmi.RMIServer.main(RMIServer.java:11)
    at symantec.tools.debug.Agent.runMain(Native Method)
    at symantec.tools.debug.MainThread.run(Unknown Source)
    The communications channel closed.

  • Why a single .java file can't have multiple public classes defined in it?

    A public class must be saved in a .java file with the same name, why?

    Tejaswi.Khijwania wrote:
    A public class must be saved in a .java file with the same name, why?This is what the JLS states (7.6 Top Level Type Declarations),
    When packages are stored in a file system (7.2.1), the host system may choose to enforce the restriction that it is a compile-time error if a type is not found in a file under a name composed of the type name plus an extension (such as .java or .jav) if either of the following is true:
    * The type is referred to by code in other compilation units of the package in which the type is declared.
    * The type is declared public (and therefore is potentially accessible from code in other packages).
    This restriction implies that there must be at most one such type per compilation unit. This restriction makes it easy for a compiler for the Java programming language or an implementation of the Java virtual machine to find a named class within a package; for example, the source code for a public type wet.sprocket.Toad would be found in a file Toad.java in the directory wet/sprocket, and the corresponding object code would be found in the file Toad.class in the same directory.
    As you can see a host system (development system) may enforce this restriction. It doesn't have to.

  • Public class must be written in a seperate .java file?

    Hi,
    1. why is it compulsory for a public class to be written in a seperate .java source file?
    2. why can not a .java source file contain more than one public classes?

    Can you elaborate more on "to make it quicker for the compiler to import packages"Think what you'd do if you were the compiler and you needed to handle this code :
    package my;
    import my.gaphics.*;
    import my.util.*;
    class My {
      private Utility x;
    }How do you work out where to look for the source of class Utility? If you insist that all public classes are declared in a file with the matching name then you only need to check whether my/graphics/Utility.java or my/util/Utility.java exists, and there you have your source. Otherwise you'd need to parse all imported packages upfornt, since you can't tell which file will contain the source of Utility.

  • Public class name same as filename

    Every book I've read stated that if you have a public class declared in the source file, then you have to name the file the same as the class name. However, none of the book explain why, can anyone tell me about this?

    Not all public classes need to have the same name as the file that contains them -- only top-level public classes. Public nested classes can have a name that's different from the filename.
    Also, not only do top-level public classes need to have the same name as the file that contains them, but the names of the package and the directory structure must match as well.
    This is done simply so that if you see a class named com.mycompany.mypackage.MyClass referred to somewhere, you know that the source code is in the file com/mycompany/mypackage/MyClass.java. Isn't that helpful? ;-)

  • Why a public class name and file name same?

    All of us know that, a public class should be declared in a file which has the same name of that class. What is the underlying concept behind this..Can someone give a clear explanation?
    Thanx..
    Sandeep Joseph
    Paragon Solutions
    [email protected]

    Another issue, it was said that the file must be named
    after the class to find the class's code when
    compiling dependent classes. Doesn't this apply to
    non-public classes too (with the dependent class being
    located in the same package)?This applies to all top-level classes ...
    You can define multiple classes in one file though:
    class A {
    class B {
    }It's perfectly valid to have both classes defined in the same file (named A.java if A is the first class to be defined in that file).
    You will get a compiler warning as soon as you reference a non-top-level class from a class that is defined in another file, though.

  • Public class name same as file name

    Why should the public class name be same as the file name in which it is written?
    http://forum.java.sun.com/thread.jspa?threadID=198585&messageID=657978
    The above thread says it is because it makes the compilation faster. is that the only reason?
    Thank you.

    That's specified in the JLS. See � 7.6, Top Level Type Declarations.
    <i>
    When packages are stored in a file system (�7.2.1), the host system may
    choose to enforce the restriction that it is a compile-time error if a type is not
    found in a file under a name composed of the type name plus an extension (such
    as .java or .jav) if either of the following is true:
    . The type is referred to by code in other compilation units of the package in
    which the type is declared.
    . The type is declared public (and therefore is potentially accessible from
    code in other packages).
    This restriction implies that there must be at most one such type per compilation
    unit. <b>This restriction makes it easy for a compiler for the Java programming language or an implementation of the Java virtual machine to find a named class
    within a package; for example, the source code for a public type
    wet.sprocket.Toad would be found in a file Toad.java in the directory wet/
    sprocket, and the corresponding object code would be found in the file
    Toad.class in the same directory.</b>
    When packages are stored in a database (�7.2.2), the host system must not
    impose such restrictions.
    </i>

  • TypeError: Error #2022: Class DS0$ must inherit from DisplayObject to link to a symbol

    Hello,
    When I tried AIR 3.7.0.1410 (ASC 2.0) to make an instance of a class that has AS linkage compiled as swc by Flash Pro,  it fails on
    TypeError: Error #2022: Class DS0$ must inherit from DisplayObject to link to a symbol
    at flash.display::Sprite/constructChildren()
        at flash.display::Sprite()
        at flash.display::MovieClip()
        at flash.display::Sprite/constructChildren()
        at flash.display::Sprite()
        at (AS-linkaged class name)
    while it's OK with AIR 3.6.0.6090.
    I'm on Windows 7 and Flash Builder 4.7. Does anyone see this issue?
    As for bug I put it here (Bug 3520793)
    https://bugbase.adobe.com/index.cfm?event=bug&id=3520793

    Hi Colin,
    Can you show me how you're embedding the asset in ASC 2.0?
    In Flash Pro, I imported a wav file into my library, configured the sound's linkage properties to export the asset, using the class name "ding". I then published the project as a .swc.
    In Flash Builder 4.7 Beta 1 (updated to ASC 2.0 Preview 3, though I don't think this is necessary for this particular test case), I created a new ActionScript Project, added the swc to my project library path, and then instantiated an instance of ding and played it. It seemed to work fine:
    package
        import flash.display.Sprite;
        import flash.media.Sound;
        public class SoundTest extends Sprite
            public function SoundTest()
                var s:Sound = new ding();
                s.play(0, 10);

  • Java Public classes

    Can somebody tell me why do we need to defined java public classes in a seprate file ??

    because the specifications tell you too.As jschell has mentioned, the spec doesn't explicitly say. I read this:
    When packages are stored in a file system (�7.2.1), the host system may choose to enforce the restriction that it is a compile-time error if a type is not found in a file under a name composed of the type name plus an extension (such as .java or .jav) if either of the following is true:
    * The type is referred to by code in other compilation units of the package in which the type is declared.
    * The type is declared public (and therefore is potentially accessible from code in other packages).
    This restriction implies that there must be at most one such type per compilation unit. This restriction makes it easy for a compiler for the Java programming language or an implementation of the Java virtual machine to find a named class within a package; for example, the source code for a public type wet.sprocket.Toad would be found in a file Toad.java in the directory wet/sprocket, and the corresponding object code would be found in the file Toad.class in the same directory.
    When packages are stored in a database (�7.2.2), the host system must not impose such restrictions.
    (emphasis mine)

Maybe you are looking for

  • SSL VPN Failed to validate server certificate (cannot access https)

    Hi all, I have the next problem. I've configured in an UC520 a SSL VPN. I can access properly and I can see the labels, but I only can access urls which are http, not https: I can access the default ip of the uc520 (192.168.1.10) but When I try to ge

  • HT1766 HOW CAN I CHANGE MY BACKUP FOLDER FROM THE C DRIVE TO ANOTHER?????

    HOW CAN I CHANGE MY BACKUP FOLDER FROM THE C DRIVE TO ANOTHER????? because my c drive in the windows computer gets filled and i need to back up my ipod to a portable hard disk.. bt i dont know how to do it.. plz help

  • Trying to speed things up...

    Hi I have a Macbook pro which was bought around Nov 2009 (Processor 2.8 GHz Intel Core 2 Duo, Memory  4 GB 1067 MHz DDR3). I have recenlty upgraded to Lion. I am working as a professional photographer and I spend a long time editing photos in Apertur

  • Quality Loss of Vector Smart Objects

    In Photoshop CC, when I paste the vectors from illustrator, I get this. The upper one was typed in photoshop CC but the above one was copied and pasted from Illustrator CC. I've been using this two program since CS3 and I never see a thing like this.

  • Radius Passowrd error

    I am having the following issue with authentication to MS IAS. I get connected to the ASA no problem. I then get asked for my credentials, and I add my domain user and password. I receive unknown username or password error in the event log of the Rad