Adding classes in JBuilder

Hi,
I am a beginner in Java and I am using JBuilder.
How can I adding existing classes in my applet ?
I got this error for each class I added:
"MyClass.java": Package D:\applet_testing\jbuilder\browser2\MyApplet\src\MyApplet\MirageBrowser.java stated in source unnamed package does not match directory D:\applet_testing\jbuilder\browser2\MyApplet\src\MyApplet\MyClass.java.
djb

add package MyApplet; to the first line of your file (s).

Similar Messages

  • Run java class using JBuilder

    hi,
    I already import the java class forder to the src folder in JBuilder where the src folder is created by the JBuilder itself. When i run compile the program there is an error in reading the java class file but when i run the program in Textpad, the program is success. May i know why? how can i run my program using java class in JBuilder instead of Java source? Thanks.

    In JBuilder there is an option of specifying what the 'main' file in a project is . Specify that to this class file
    [ What I mean is , in many java files we can define 'main' method , but we will intend to execute the main of one file only for a project . In JBuilder specify this file as the main class file ]

  • AddChild adding Class but not internal shapes

    Hi Friends
    I am presently developing a site completely class based. N
    I am facing a problem .
    There were so many addchild (to attach them to stage at
    runtime) clips in the library.
    I dont want them to be exported over the first frame so in
    the LINKAGE PROPERTIES i am unchecking the export in the first
    frame option and I am using a base class for them which again
    exteds Display.MovieClip class [it must be].
    Further In the Publish Settings under ACTION SCRIPT 3.0
    settings I have changed the export class in frame to 2 so the Frame
    1 of teh movie will be free from classes and Objects so a simple
    preloader can be put which will display start from the 0 or may
    little bit of 5 percent till 100.
    If if activate The export in the first frame then the Frame 1
    will become 50% of the movie and my preloader will start from 50
    i.e. after completely loading the Frame 1.
    But the problem is I have Unchecked and freed the Frame 1
    size but the MovieClip objects are not getting added at the run
    time. But I am sure that the class Which I have created is
    attaching but not the internal objects.
    For this i cannot put all the coe but i will explaing here.
    I have created a main.fla and in it's library i have a symbol
    which was exported for action script.
    Class name mc
    base class mcClip. // this class will extend the
    Display.movieClip class so no problem at all. [this i have doe
    because the same class can be used for multiple objects in the
    library.]
    Unchecked Export in frist frame
    Please follow the code below and continue from here
    while runnign teh move the class is adding but teh graphic
    shape which i have drawn in the library movielicp is not attaching
    to the stage.
    I am not getting what happening here.
    the library movie clip is not attaching but its base class is
    attaching and it is tracing the class.
    I hope you got the problem what I have.
    Please any body who read it dont ignore it
    Thanks in Advance.
    I will be great full to you
    Download
    the test files i have Created
    ***

    Thanks Raymond - I'm afraid the penny ain't dropping for me,
    so instead of instantiating the 'Test' class from the timeline and
    I do it from the document class (as you should) it works a treat
    with no tweaks. I've done as I think you were suggesting. Created
    new 'Test' from the timeline, put an empty mc ('holder') on the
    stage, passed that as a movieclip variable to the constructor and
    holder.addchild(some graphic) and thats all fine - Still don't
    understand why one method of instantiating the class is fine the
    other causes unpredictable results, at a guess the document class
    route of doing so automatically adds it directly to the display
    list?
    Thanks

  • Adding Class Libraries

    hello
    right now i wanna use JTAPI (as shiped by java.sun.com) class libraries with JBuilder/JDeveloper how can i add them in IDE, it only accepts .jar files as a class libraries but i got simple class files(as shipped with java.sun.com)
    kindly help me in this regard

    I would recommend using the jar utility instead of zip. Actually, I would say DO NOT use zip. The jar utility comes with the JDK and the usage is this:
    Usage: jar {ctxu}[vfm0M] [jar-file] [manifest-file] [-C dir] files ...
    Options:
    -c  create new archive
    -t  list table of contents for archive
    -x  extract named (or all) files from archive
    -u  update existing archive
    -v  generate verbose output on standard output
    -f  specify archive file name
    -m  include manifest information from specified manifest file
    -0  store only; use no ZIP compression
    -M  do not create a manifest file for the entries
    -i  generate index information for the specified jar files
    -C  change to the specified directory and include the following file
    If any file is a directory then it is processed recursively.
    The manifest file name and the archive file name needs to be specified
    in the same order the 'm' and 'f' flags are specified.
    Example 1: to archive two class files into an archive called classes.jar:
    jar cvf classes.jar Foo.class Bar.class
    Example 2: use an existing manifest file 'mymanifest' and archive all the
    files in the foo/ directory into 'classes.jar':
    jar cvfm classes.jar mymanifest -C foo/ .I use it like this:
    jar -cvf filename.jar folderName
    Good luck!

  • Need help with adding classes

    for the moment ihave to create a program that will add accountants to contracts.
    now from within contract i want to be able to be able to create a contract and then have a method to add an accountant to the contract...could u look at my contract class and c what im doing wrong please and also u can only have one accountant on each contract
    im getting error....cannot find symbol Accountant(Accountant)
    public class Contract
        // instance variables - replace the example below with your own
        private Accountant anAccountant;
        //the number of days
        private double duration;
        private double rateOfContract;
        private static final double vat= 0.21;
        private boolean complete;
        private String type;
        private boolean occupied;
         * Constructor for objects of class Contract
        public Contract(double duration, String type )//Accountant anAccountant, double duration)
            //this.anAccountant = anAccountant;
            this.duration = duration;
            rateOfContract = 0 ;
            complete = false;
            this.type = type;
            occupied = false;
         * a method to get the accountant
       public Accountant getAccountant()
            return anAccountant;
         * a method to get the rate of the contract
        public double getRateOfContract()
            return rateOfContract;
         * a method to check if the contract is complete
        public boolean getComplete()
            return complete;
         * a method to set if the contract to complete
        public void isComplete()
            complete = true ;
         * add an accountant to the contract if his expertise matches
         * the type of contract
        public void addAccountant(Accountant anAccountant)
          if(anAccountant.getExpertise().equals(type))
                if(occupied = false)
                    //add the accountant to the contract
                    anAccountant = Accountant(anAccountant);
                    System.out.println("an accountant has been added to the contract");
                    rateOfContract = anAccountant.getDailyRate() * duration;
                    occupied = true;
                }else{
            }else{
         * a method to check accupied
        public boolean getOccupied()
            return occupied;
    }Message was edited by:
    molleman

    yes off course i have `and i also have a controller class called firm...but i just want the accountant to be added to the contract....and i just cant do it
    public class Accountant
        // instance variables
        protected String name;
        protected String expertise;
        protected double dailyRate;
        protected boolean isActive;
         * Constructor for objects of class Accountant
        public Accountant(String name, String expertise, double dailyRate)
            this.name = name;
            this.expertise = expertise;
            this.dailyRate = dailyRate;
            isActive = false;
         * a method to get the accountants name name
        public String getName()
            return name;
         * a metohd  to get the acvccontats expertise
        public String getExpertise()
            return expertise;
         * a method to get the accountants daily rate
        public double getDailyRate()
            return dailyRate;
         * a method to check if the accountant is active
        public boolean getIsActive()
            return isActive;
         * a method to set the accountant to active or not
        public void setIsActive(boolean active)
            active = isActive;
    }

  • Adding .class files to your project and making them work.

    Ok, im fairly new to java and having trouble understanding how to make importing of .class files work. Im using eclipse 3.2
    I have the files in a directory and I have gone to project->properties->java build path->libraries->add external class folder and pointed it to the correct place.
    Now, I am trying to use some of the classes it provides. I get no errors when creating the object with this code:
    com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
    Before I did the add external class folder that code would error cause it didnt know what com.ECS was. Now it works fine. My problem is that when I try to use a class, it does not recognize it as a class. After doing the above code I have:
    itemRequest.setSearchIndex("Books");
    its giving me an error on the period, saying: "Syntax error on token(s), misplaced construct(s)". Its not seeing that it is a class, so I can't use it. But when I am creating the object I get no errors. For reference, here is the chunk of code:
    com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
    itemRequest.setSearchIndex("Books");
    the second line of which errors. So my question is, how do I get it to recognize that the itemRequest is a class when I have imported the .class files to my project already?

    It's working fine. It's just that you have to put your code in a method.

  • Adding class to documents - Mass change

    Hi all
    I want to add a class to all existing documents of a certain document type, is there any tool for doing this?
    Like CLMM transaction for changing values.
    Have looked at the transaction CL24N but unfortunately it is only possible to paste in 10 new records at a time and there is no option to search for the documents like in CLMM or import from file. Or have I missed something?
    Reason for doing this mass change is that we have assigned a class to a document type, now we need to change this class to another one.
    Iu2019ve tried to change the class in DC10 to the new class, but then the additional data tab is empty when you display a document of that type in SAPGui (In EasyDMS however all values are visible).
    But if we add the new class to all old documents and then deleting the old class everything seems to work OK. Too many documents to do this maneuver one by one, though.
    Grateful for any help or ideas.

    Hi Daniel,
    Why don't you use dependency in this case.
    You add new char to old class and use  dependency Precondition .
    This will serve the purpose.
    This will work like this
    Old class  will have following char
    Old Char
    New Char 1
    New Char 2
    Now new Char 1 will have Value Yes and No
    and New Char 2 will have a values which you want
    If you want to use New Char 2 in certain doc types you have to select New Char 1 values as Yes then system will display New Char Val 2 so that user can enter values
    Ex:
    Old Class
    Old Char:
    New Char 1   : Yes
    New char 2   : "This field is ready for input"
    New Char 3  : "This field is ready for input"
    New char 4   : "This field is ready for input"
    New Char 5  : "This field is ready for input"
    you want old values for certain doc types then select  a value "No" (You can make this default) for New char 1 so that user can view only Old Char
    Old Class
    Old Char:
    New Char 1   : No
    New char 2   : "This char will be hidden for input"
    New Char 3  : "This char will be hidden for input"
    New char 4   : "This char will be hidden for input"
    New Char 5  : "This char will be hidden for input"
    This will reatin all your old char values for existing documents and from dependency you can choose new char values whenever you want
    Regards
    Abhijit A. pachgade

  • Adding Classes to the JAR File's Classpath

    Ques 1- Can I use the wildcard * symbol in Manifest file to add classes/othes jar files to the JAR File's Classpath.I have folder named - Lib . where there are many jar files.Now,do I have to add each jar file by- Class-Path: Lib/jar1-name Lib/jar2-name . Instead, can I do this- Class-Path: Lib/*.jar OR Class-Path: Lib/*.class
    RIDICULOUS....105 views has been made but YET NO ANSWER. Isn't there anybody who knows the answer.
    Edited by: Tanvir007 on Apr 30, 2008 2:21 AM

    Ques 1- Can I use the wildcard * symbol in Manifest file to add ... other jar files ...?No. You could, however, place all your needed JARs in JavaHome/jre1.x.x/lib/ext - if this is a way for you.
    Ques 2 ??
    RIDICULOUS....105 views has been made but YET NO ANSWER.What hindered you to test it yourself?
    And the things we don't know far exceed the things we know. Why do you wonder?
    Have a nice day
    J�rg

  • Adding class in JSON File

    Hello everybody,
    I have a JSON_File whith different content inside like so:
            "title": "LEMON",
            "description": "frame01",
              "frame01": "_01.png"
            "title": "POTATO",
            "description": "frame02",
              "frame02": "_02.png"
    In the library there is a symbol named "template" where the information
    placed from the JSON-Data whith "sym.createChildSymbol".
                       template.$("title").html(item.title);
                       template.$("description").html(item.description);
                       template.$("frame").css("background-image", "url("+item.frame0+")");
    Is it possible to give the different content_data a class (for example fruit and vegetable)
    and ask in edge only for the class "fruit" to sort the icons one after another in a content-container ?
    Am I thinking in the wrong direction?
    Right now I walk through the different parameters an pull the content inside the template,
    this works fine. But how to apart fruit from vegetable?
    Any help would be fine.
    THX

    Without opening up the can of worms that asks why you want to do this, the easiest way to get a load rule to see more fields is to create a dummy text file with as many columns as you need and open it with the load rule. The load rule editor will "see" the extra columns, and you can change at will.
    Okay, I can't resist -- why do you want to do this? Generation or Level dimension build and you don't know how many generations/levels you're going to have? A parent/child table is going to be much easier to work with and will never require playing around with a load rule as the number of columns never change.
    Regards,
    Cameron Lackpour

  • Adding Classes to ID's within CSS Style Sheet

    Is there anyway to add classes to ID without modifying the
    markup?

    quote:
    Originally posted by:
    FreakyJesus
    Well if i understand you you, you want to emulate some of the
    properties of BkFred, within an already existed ID, Div1. So you
    could open the css sheet and simple copy/paste the lines of code
    that you want from one section to the other.
    I am pretty sure I am not picking you up right, but let me
    know if that's the case...
    Andy
    But what if you have a certain class that you want to add to
    multiple ID's? If you were able to apply classes to ID's within CSS
    then you wouldn't have to edit each and every ID, you could just
    edit the classes properties within the CSS file itself. Get me
    now?

  • EJB:Error in adding class file in JAR

    Hi im doing project in EJB
    when i add class files to JAR this type error occurs
    Pls help in need of help

    Generally WEB-INF\classes\ is for compiled classes.
    You should move your java source files to say SecondWap\src\com\hclasses to match up with your package name in your ajva file.

  • Adding Classes while execution of program (at runtime)

    Hi,
    Is it possible to add the classes (jars) at runtime on same JVM?
    -Ashish Srivastava

    classes are no jars. jars are a set of classes stored in one 'file'. if the jar is in the classpath it should be no problem to load the class via Classloader.
    if the jars get loaded dynamically you'll habe to extend the classpath to the jar file programatically.

  • Adding classes to Flash CS3 project

    Forgive me I'm a newbie when it comes to Flash projects. I
    have the source code for a Flash based media player written in
    Action Script 3 that I need to modify. I’m trying to add
    classes to this project in Flash CS3 however after I import them
    and try to reference the classes in an existing class within the
    original source I get the following error when I try to build:
    1172: Definition ‘classname’ could not be found.
    However the project builds fine if I don’t reference
    any of the newly imported classes. What am I missing here?
    Scott

    From a brief look you need to import your new package into
    existing class:
    import alducente.services.*;
    Also make sure that you provide a path to this package in
    Flash publishing preferences - you need to start with a directory
    that one level up. For instance, if your new classes reside in a
    path: c:/documents/classes/alducente/services, you need to tell
    Flash that you classes are in c:/documents/classes - not in
    c:/documents/classes/alducente

  • Xcode 3/Interface Builder - Adding classes to NIB file doesn't work

    I'm attempting to learn Objective-C and Cocoa GUI through Apple's "Currency Convertor" tutorial. I'm currently at the "Add the ConverterController Class to Your Nib File" step, and I add ConverterController.h to the Interface Builder project (both by Read Class Files and dragging) and... nothing happens. The tutorial clearly states that the class should appear as a new icon in the MainMenu.nib window. I've tried researching this problem, and it appears to be quite common, however every fix isn't really a fix at all. They all involve using the Identity Inspector for something, which appears very complicated, and is otherwise uncovered in the tutorial. It occurs to me that anyone knowing enough to be able to use this fix wouldn't be reading this tutorial, thus making such answers moot. Any help anyone could provide on this issue would be appreciated.

    The tutorial you linked to should work fine except that they've just got the illustration (Figure 5-3) in the wrong place.
    The placement of that illustration implies that you should see the instance of your class in the MainMenu.nib window right after doing step 2 (where you read your class file). But that's not really true. In reality it's step 3 that gets you the blue box in the MainMenu.nib window and steps 4 and 5 that will transform it from an "Object" into a "ConverterController". Steps 3, 4 and 5 are exactly what Thomvis suggested that you do earlier.
    Steve

  • Adding custom css classes from within edge animate

    is it possible to add  CSS classes from within Edge Animate, im not talking about adding your own stylesheet by ex. manually editing the .html document, but rather adding classes via ex. the code window ?, it would be immensely helpful to have everything in one place.
    any suggestions on this one ?

    Yes - you can use addclass() and you can use UI.
    1- UI
    Select elements in elements panel. Click the C button in the property panel.
    Use this for example
    sym.$('.classname').css({'color':'red'});
    2- addclaas()
    sym.$("name').addclass('classname');
    Use same as above.
    On Sat, Apr 25, 2015 at 8:56 AM mads18950258 <[email protected]>

Maybe you are looking for