How to make an applet load user-defined package?

How to have an applet load user-defined package?
I have packages in their own directories, and the applet compiles and links with them, by use of CLASSPATH env variable. But when it comes time to run, it ignores that and does not know where the classes (in the packages) are.
If I don't use packages and put all code in one directory, runs fine. If I use an application, I can link with and load my packages.
I know applets can't use things like CLASSPATH for security reasons, but still, they should be able to be compiled out of several packages, why do I have to put all code together??

OK, for reference for future newbies, here's the answer:
use CODEBASE attribute in your html file (if on Windows server, don't use drive letter but relative path to .html file, Unix style, and put all your .class files beneath that, for example, in your .html file
<applet
CODEBASE="..\class
and then have package bar Bar.class file, in ..\class\bar

Similar Messages

  • How to use classes from different user defined Packages

    well i made 2 packages... one containing employee class and realted matter and other contaning bankaccounts and bank related work... now how can i use them in an another.. i know about the import statement but still couldn't make it work.... now suppose iam makin a obejct of employee class and passing in name and salary and all in the constructor... now i want that when i create the bankaccount class then the name of the employee should be passed to the bankaccount class so that it can assigen a account no. .. now how do i do this as when i create a object of employee class its made at runtime.. and if i create a object of bankaccount.. how wil it take that name as before goin to bank account i should already have a list of emplyees and then this list should be worked upon by the backaccount class to assign the accountno.s
    Hope my question was clear... would appriciate a explanation and guidance!!!

    Thank you so much ... i was able to solve the problem... i passed the object in the constructor of the accounts class and it all worked out the way i wanned... thank you so much... it wasn't that difficult but the idea was just not clicking...this place is wonderful... everyone rocks!!! and so greatful about all the help.. please keep up the good work and even i will try to contribute as much as possible!!

  • How can 1 make an object of user defined class immutable?

    Hi All,
    How can one make an object of user defined class immutable?
    Whats the implementation logic with strings as immutable?
    Regards,

    Hi All,
    How can one make an object of user defined class
    immutable?The simple answer is you can't. That is, you can't make the object itself immutable, but what you can do is make a wrapper so that the client never sees the object to begin with.
    A classic example of a mutable class:
    class MutableX {
        private String name = "None";
        public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
    }I don't think it's possible to make this immutable, but you can create a wrapper that is:
    class ImmutableX {
        private final MutableX wrappedInstance;
        public ImmutableX (String name) {
            wrappedInstance = new MutableX();
            wrappedInstance.setName(name);
        public String getName() {
            return wrappedInstance.getName();
        // Don't give them a way to set the name and never expose wrappedInstance.
    }Of course, if you're asking how you can make your own class immutable then the simple answer is to not make any public or protected methods that can mutate it and don't expose any mutable members.
    Whats the implementation logic with strings as
    immutable?
    Regards,I don't understand the question.

  • [SOLVED] Loading user-defined modules [FAIL]

    Since the linux upgrade that rolled out on Nov 9, I have encountered an error during boot that says loading user-defined modules  [FAIL].  I read a post mentioning the problem being related to the /boot dir being on a separate partition (https://bbs.archlinux.org/viewtopic.php?id=129970).  Mine is not on a separate partition, so no booting to a live disk will fix that problem for me.  Another post mentions the problem causing loss of USB support (https://bbs.archlinux.org/viewtopic.php?id=130030)  which is, as of yet, unresolved.  I For all the people upgrading to linux3.1.1 with no problems, do you know what my problem would be?
    I have tried upgrading 3 times but each time it kills my wireless support completely.  All else seems to be working fine.
    Does anyone know what is causing this? or how to fix it or work around it?  I updated my mirrorlist and ran pacman -Syyu but this problem is still there 2 weeks later.  I've been running pacman -U /var/cache/pacman/pkg/linux-3.0.7* and rebooting after every system update.
    Please help.
    Thanks.
    Last edited by jdoggsc (2011-11-22 19:39:00)

    skunktrader wrote:If you have any modules from the AUR (broadcom-wl?) you need to rebuild and reinstall the module every time the kernel is updated.
    Thanks.  I didn't realize I had to get a new driver every time.  I've gone through several kernel upgrades so far and haven't had any problems.  That fixed it, though.

  • I was able copy the hardrive of my old macbook from "My Passport" onto the desktop on an older iMac. but i dont know how to make my hardrive and user name be the main one since someone had used it in the past and had their info on the comp. please help!

    I recently broke my 2008 macbook. i was able to use an external hardrive to back up my data onto My Passport. I was going to buy a new computer but a friend told me sher had an older version of the iMac. (not sure how old but it doesnt have a camera if that helps) i was able to hook it up and turn it on but i ran into a few problems. 1) the "authentic" user or whatever it says is someone who previously used the computer. i added me as a user but im not sure how to make me the main user. 2) after hooking up My Passport, i was able to drag my files and copy them to the desktop.(i think i did it correctly) now, i dont know how to make my hard drive and applications and iformation the "main " info. The current apps on the iMac are super old versions of iTunes and iPhoto and such. 3) while trying to open the apps from my macbook on the iMac, it said it didnt have the right software to open these apps.
    I am so computer illiterate so someone please help!!! Also, i do not have internet in my new apartment yet so if there is a way to make this happen without using the internet that would be preferred. sorry for the horrible spelling and poorly written paragraph.
    THANK YOU!!

    You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
    You need to get a new computer or a refurbished one.

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • When I run a web browser immediately loaded two blank tabs. How to make the browser load the only one?

    when I run a web browser immediately loaded two blank tabs. How to make the browser load the only one?

    Did you check the home page setting to make sure that if doesn't have pipe (|) symbols?
    See these articles for some suggestions:
    *https://support.mozilla.org/kb/Firefox+has+just+updated+tab+shows+each+time+you+start+Firefox
    *https://support.mozilla.org/kb/How+to+set+the+home+page - Firefox supports multiple home pages separated by '|' symbols
    *http://kb.mozillazine.org/Preferences_not_saved

  • Could not load user defined filter. - Weblogic 8.1 sp2

    Hi,
    I got an error in the server output when starting a server with filter. The jar file is located in the WEB-INF/lib but it seems that it could not be loaded. The same application runs fine in Weblogic 7 sp2. Any idea?
    $ cat web.xml
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
    " "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <!-- Register the GZIPfilter -->
    <filter>
    <filter-name>Compress</filter-name>
    <filter-class>com.jspbook.GZIPFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>Compress</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>Compress</filter-name>
    <url-pattern>*.html</url-pattern>
    </filter-mapping>
    <Jul 16, 2004 4:53:10 PM EDT> <Error> <HTTP> <BEA-101165> <Could not load user defined filter: com.jspbook.GZIPFilter.
    <java.lang.ClassNotFoundException: com.jspbook.GZIPFilter
    <     at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:198)
    <     at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:62)
    <     at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    <     at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    <     at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:223)
    <     at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41)
    <     at weblogic.servlet.internal.WebAppServletContext.loadClass(WebAppServletContext.java:5574)
    <     at weblogic.servlet.internal.WebAppServletContext.registerFilter(WebAppServletContext.java:2901)
    <     at weblogic.servlet.internal.WebAppServletContext.initFilters(WebAppServletContext.java:2878)
    <     at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3176)
    <     at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:688)
    <     at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
    <     at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
    <     at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    <     at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
    <     at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
    <     at weblogic.Server.main(Server.java:32)
    <>

    This is probably some jsf library issue.
    Which technology are you using? (ADF is not supported on WLS 12c)
    If you have jsf-api.jar or jsf-impl.jar in your deployment, try to remove them.
    Dario

  • How to make another applet?

    Can somebody teach me how to make another applet besides the normal one the tutorial taught me?

    Your question is a litte unprecise. Just read on in the tutorial. When you finishd reading (and understanding) "Learning the Java Language" or when you dont understand something in the tutorial then you could ask again.

  • Could not load user defined listener: examples.webapp.lifecycle.OpenBrowser

    Hi all,
    I'm facing the following error when my Weblogic 10.3 servers starts .Any one have an idea why ?
    +<14-Sep-2010 16:58:41 o'clock CEST> <Error> <HTTP> <BEA-101163> <Could not load user defined listener: examples.webapp.lifecycle.OpenBrowserServletContextListener+
    java.lang.ClassNotFoundException: examples.webapp.lifecycle.OpenBrowserServletContextListener
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    Truncated. see log file for complete stacktrace
    +>+
    +<14-Sep-2010 16:58:41 o'clock CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'examplesWebApp' due to error weblogic.application.ModuleException: .+
    weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:387)
    at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: examples.webapp.lifecycle.OpenBrowserServletContextListener
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    Truncated. see log file for complete stacktrace
    +>+
    Thanks

    This is probably some jsf library issue.
    Which technology are you using? (ADF is not supported on WLS 12c)
    If you have jsf-api.jar or jsf-impl.jar in your deployment, try to remove them.
    Dario

  • How to make a button load a sprite from library??

    PLEASE HELP!!
    Hey everyone.. iv been looking for help for a few weeks but cant seem to find the awnsers
    I am trying to create a newspaper that consists of four pages. Each   page i have created and are sitting in the library as sprites. Each page   has buttons that need linking so that when pressed it loads the next   page or page that i want. This is the part i am confused with =/ how do i   make the buttons on each page load the next page (sprite) from the   library??
    Basically i want to no how to make a button load a sprite from the library when clicked. Does anyone no the script for this?
    Thanks for any help

    A question arises as to whether or not you are posting in the right forum.  Sprites are AS3 objects.
    If you want to add movieclips to the stage from the library using AS2, then you need to assign them each an Identifier via right clicking them in the library and selecting the Linkage option... from there you slect the option to Export for Actionscript and then assign the Identifier.
    You then use the attachMovie() method to make use of that Identifier to dynamically load the library object.

  • How to make session invalid when user refresh the page?

    How to make session invalid when user refresh the page?

    I have a <form> in a JSP file that has another JSP file as an action.
    I have main.jsp that has <form> with action.jsp file as an action.
    Now when I submit the <form>, request forwarded to action.jsp and it will take the action. But this file is taking so long, hence user refresh the page again and again, hence duplicate request processing is occuring.
    I want to prevent this.

  • Creating User Defined Package Groups

    Hi everyone!
    I'm currently exploring/experimenting with strategies to stabilize parts of the Arch system on machines which I plan do update less frequently (I am aware of the risks and the potential difficulties associated with infrequent updates; that's why this is an experiment). It seems to me that Package Groups would be an asset which could be leveraged for a few different strategies. However, I cannot find any documentation on creating user defined package groups. Is there a way to do this? Any documentation anyone could point me to would be awesome. Thanks!

    You can compile the package yourself or change just the metadata. I think xyne had a tool for that, if only I could remember the name ...
    Edit: It's repkg https://bbs.archlinux.org/viewtopic.php?id=158970
    Edit 2: What do you need package groups for anyway? You should update the whole system rather than individual packages / groups of packages.
    Last edited by karol (2014-01-30 20:25:04)

  • BRFplus: How to create an instance of User-Defined Expression Type?

    Hi,
      I've created an expression type in a System Application and marked its Access Level as Global. I've created a Class & Interface and assigned it to my Expression Type, and activated it successfully.
    Now how do use this Expression Type to create expression in my Customizing Applications?
    Do I have to make any more code changes like extending any more classes or implementing additional interfaces? (I've already created a dummy Query Class and UI class)
    Any documentation or example of how to create a user-defined Expression Type and how to use them will be very helpful for me.
    Thank you & Best Regards

    Well I was going through the PDF documents available on SDN. I came across a document which referred to a document on creating user-defined expression.
    Document Name: [BRFplus XML Export and Import|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20462066-a086-2d10-a999-c9075767ce48?quicklink=index&overridelayout=true].
    The code sample for creating user-defined expression types is available in the How to Create Custom Expression Types document
    Pg. 24
    I had a hard time looking for that document. Couldn't find it though.
    Thank you Mr. Ziegler, now I know that currently there isn't any documentation on User-Defined Expression Types. I'll be awaiting for your  document on this
    Any overview about the steps to be followed in creating a custom expression type, with a few simple steps on how to do it over here would be greatly appreciated. Especially on how to get it seen in the Create Expression Sub-Menu. Also do I have to code a web dynpro for the UI?
    Thank you & Best Regards.

  • How to pass external input to user-defined subclasses

    Hi all,
    [this might be a really trivial question] I would like to define a sub-
    class of JTable which get some external inputs: something similar to
    the following *not-working* example.
    *********************************************************************** import javax.swing.*;
    import javax.swing.table.*;
    public class RHJTable extends JTable
        public RHJTable(int rows, int columns, int externalinput)
            super(rows, columns);
        public Object getValueAt(int row, int column, int externalinput)
            return externalinput;
    What follows is the error message I get, which I assume it is due to
    my "externalinput":
    ??? Java exception occurred:
    java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
    at java.util.Vector.elementAt(Unknown Source)
    at javax.swing.table.DefaultTableColumnModel.getColumn(Unknown
    Source)
    at javax.swing.JTable.getCellRect(Unknown Source)
    at javax.swing.JTable.valueChanged(Unknown Source)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown
    Source)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown
    Source)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown
    Source)
    at javax.swing.DefaultListSelectionModel.changeSelection(Unknown
    Source)
    at javax.swing.DefaultListSelectionModel.changeSelection(Unknown
    Source)
    at
    javax.swing.DefaultListSelectionModel.removeSelectionIntervalImpl(Unkno
    wn Source)
    at
    javax.swing.DefaultListSelectionModel.removeSelectionInterval(Unknown
    Source)
    at javax.swing.JTable.checkLeadAnchor(Unknown Source)
    at javax.swing.JTable.tableChanged(Unknown Source)
    at javax.swing.JTable.setModel(Unknown Source)
    at javax.swing.JTable.<init>(Unknown Source)
    at javax.swing.JTable.<init>(Unknown Source)
    at javax.swing.JTable.<init>(Unknown Source)
    at RHJTable.<init>(RHJTable.java:12)
    Can anybody please suggest me the correct way of passing this external
    input?
    Thanks
    lor

    Thanks for this detail. Before getting into JTable
    etc...design suggestions, it would be helpful to know
    how the interaction between Java and MATLAB is
    supposed to proceed. OK: I'm developing a MATLAB GUI with an embedded JTable inside it: people write things in a user defined JTable (well, customized subclass of JTable).
    I would like to define this subclass not as MyJTable(int rows, int cols) but as MyJTable(int rows, int cols, int externalinput), but doing this gives me the aformentioned error.
    Simplest setting: MATLAB writes data to a file, and
    knowing the format of that file you are able to parse
    it in Java. I'm not using any kind of input or output file: simply, MATLAB calls a JTable subclass (i.e. I only have a .class file to work on).
    Problem arises when I would like to add some more input: I cannot say simply setValueAt(int externalinput) if the JTable can't get this input directly from MATLAB...
    I hope I did make myself a little bit more clear: solution must be trivial, but I'm spending a lot of time in it...
    Thank you very much for your interest.
    lor

Maybe you are looking for

  • Problem with BC4J and PostrgreSQL 7.2

    I successful configure connection to PostgreSQL DB. Then I create simple table on DB and create BC4J appmodule. In appmodule properties I change jbo.sql92.JdbcDriverClass = org.postgresql.Driver I run test appmodule in BC4J browser. I see my row in t

  • Source symbol  does not exist

    Hi! when I am creating purchase order, system is giving error message source sumbol does not exist, and  when I click on Proceed, system is taking to OT05. But OT05, all the source symbols have been defined. Planning levels has been maitnained in ven

  • Problem with continuous loading logo when accessing YouTube

    How do I overcome a continuous 'loading' logo when trying to access YouTube?

  • Missing templates (Pages and Keynote)

    Could anyone please help answer if templates were removed and are not included in the most recent versions of Pages 5.1 and Keynote 6.1?    Specifically:   1) Did Pages 5.0 have a template for "Grove Surfboards?" 2) Did Keynote 6.0 have a template fo

  • Big battery problem: iPhone 4S

    I have a big problem. The battery of my iPhone 4S is empty after a short time of usage. Within 2 minutes 5% goes away. And sometimes it shuts down if there is still 10% of battery. Is this a problem of iOS 6.0.1 or is this a hardware problem? Thank y