Import libraries in applets

Hi everybody!
Can I import my own library in an applet??
My applet doesn't run if I use a class of some class of my libraries. I've already set the system classpath to the correct(??) direstory.
Someone can help me??
Thanks a lot

One handy way to specify the class path the applet is to use, is to include the jar files you want in the CLASSPATH in your manifest file in the jar containing your applet code.
While creating your applet jar if you include your own manifest, containing the jars you want in you class path, whose location is relative to the location of the applet jar on the server, you dont have to specify it in the html.
This is the Java download extension mechanism.
eg main class is pkg.MainApplet and it is in a jar called AppletJar.jar
to create this jar you would go
jar cvf AppletJar.jar pkg/*.class
For the download extension you would have a manifest file, called myManifest.mf, with the following in it:
%Class-path lib1.jar lib2.jar ../../sec/sec1.jar
(Remember the locatin of these files is relative to the AppletJar.jar file, so sec1.jar is back to folders, and then in the sec folder, li1.jar and lib2.jar are in the same folder as AppletJar.jar).
To add this to your jar, create it as follows
jar cvmf myManifest.mf AppletJar.jar pkg/*.class
Now when the applet is being loaded in the browser files you have specified in the manifest (which are on the server) are added to the classpath.
For more info see the documentation on the Java Extension Mechanism on how exactly is wotks.
Hope this helps,
Paul.

Similar Messages

  • Use of WIN-SDK Import libraries

    How can we use Win32 SDK import libraries( *.lib) in our forms. I am not asking of DLL,
    of course we can use a DLL with ora_ffi, But my problem is the use of Microsoft SDK for windows. Because Microsoft windows API documentation is based on Import libraries(*.lib) so we can not have the detailed information of DLLs, Thats why i am interested in use of (*.lib) import libraries.

    Adding the lib file to your project is not sufficient to use its functions.
    You also need the function definitions. According to MSDN, CMC function definitions
    are located in "xcmc.h" header file, which should be present in cvi\sdk\include.
    So, simply add the following line at the beginning of your source file "smtp.c":
    #include
    [email protected] wrote:
    >Hi,> I am trying to use win32 calls that are not included in kernel32.lib,>gdi32.lib
    and user32.lib thus I have to add import libraries to the>project. Reading
    cvi\sdk\sdkfuncs.txt I determined that the three>functions I need (cmc_logon,
    cmc_logoff and cmc_send) are located in>mapi32.lib.>> So in project I do
    Edit->Add files to project->library and select>cvi\sdk\lib\mapi32.lib. It
    pops into the project
    view.>> After build project I get>Undefined symbol
    'cmc_logoff' referenced in "smtp.c">Undefined symbol 'cmc_logon' referenced
    in "smtp.c">Undefined symbol 'cmc_send' referenced in "smtp.c">>Which are
    exactly the same errors if I don't include mapi32.lib in the>project.>>Where
    have I gone wrong? As far as I can tell these routines should now>link.>>This
    is using NT 4.0, service pack 6a, Labwindow version 5.0>>Thanks,> Bob>>>Sent
    via Deja.com http://www.deja.com/>Before you buy.

  • Are there any specific codecs or import libraries that will make Premiere 6 use more file types?

    Are there any specific codecs or import libraries that will allow Premiere 6 to import more file types?  I'm using Premiere 6 on Windows 7.
    It seems that the only kind of file that can be imported in to this version of Premiere are certain types of AVI files... even some types of AVIs will import but then will not appear when placed in the timeline... no MPGs, MP4s, WMVs, or anything else will import at all.
    Virtually every file that I need to bring in to Premiere 6 has to be converted to AVI with the H.264 codec first.
    Any help would be helpful.
    digi

    Hi Bill and John,
    Thanks for your replies.
    My inquiry isn't as much to do with the AVIs that won't import as it is to do with figuring out the way that I can make MPGs, MP4s, MOVs and WMVs import in to Premiere 6.
    The AVIs that do import were converted or created using the H.264 codec.  I do know a little about codecs, but I don't hold the PhD in codecs that is apparently required to completely understand them.
    Below is the chart from the Premiere Elements 4 page at this link... http://kb2.adobe.com/cps/402/kb402540.html
    So, if I understand correctly, Bill is saying the Premeire Elements 4 is actually newer than Premiere 6 and that the Pr Elements apps will actually import more movie file formats than the regular versions of Premiere and Premiere Pro?... for someone trying to learn about these apps, one must admit that this seems to be reverse logic... this would be saying that Adobe gave the cheaper "consumer" versions of Premiere the ability to work with 3 or 4 more movie file formats than the more expensive "pro-sumer" version of Premiere.
    Premiere 4 Elements File Format Support Chart
    Microsoft AVI (.avi)
    Import and Export
    MOD (JVC Everio camera) (.mod)
    Import only
    MPEG-1 (.mpg, .mpeg, .m1v, .mpv)
    Import and Export
    MPEG-2 (.mpg, .mpeg, .mpe, .m2t, .m2v, .mod, .mpd, .m2p)
    Import only
    MPEG-4 (.mp4, .m4v)
    Export only
    Export via QuickTime file or "Share to Mobile" workflow.
    QuickTime Movie (.mov, .moov)
    Import and Export
    Windows Media video (.wmv)
    Import and Export
    The built-in web browser instruction manual in Premiere 6 shows this statement on the "Importing Clips" page, as shown in my screenshot linked above...
    "File format support is provided by plug-in software  modules. Over time, additional or updated file formats may be available  from Adobe or other manufacturers, such as QuickTime."
    This indicates that additional file format support can be added to Premiere 6 by "plug-in software modules", and that "over time, additional or updated file formats" were predicted to become available that would be supported by the file format manufacturers, such as Adobe themselves and other manufacturers such as QuickTime.
    Since that was written ten years ago or more, there has certainly been the chance for these additional "plug-in software modules" to be developed "over time"... so I'm asking, "Where are they available?"
    What I'm saying is, I will do my homework to earn at least my Bachelor's degree in codecs, but more than an education in codecs, I need to find these mysterious, "plug-in software modules" for Premiere 6 that Adobe wrote about and referred to over ten years ago.
    Thanks for any clues as to where to locate these "plug-in software modules".
    digi

  • Windows SDK Import Libraries

    Hi,
    I am trying to use win32 calls that are not included in kernel32.lib,
    gdi32.lib and user32.lib thus I have to add import libraries to the
    project. Reading cvi\sdk\sdkfuncs.txt I determined that the three
    functions I need (cmc_logon, cmc_logoff and cmc_send) are located in
    mapi32.lib.
    So in project I do Edit->Add files to project->library and select
    cvi\sdk\lib\mapi32.lib. It pops into the project view.
    After build project I get
    Undefined symbol 'cmc_logoff' referenced in "smtp.c"
    Undefined symbol 'cmc_logon' referenced in "smtp.c"
    Undefined symbol 'cmc_send' referenced in "smtp.c"
    Which are exactly the same errors if I don't include mapi32.lib in the
    project.
    Where have I gone wrong? As far as I can tell these ro
    utines should now
    link.
    This is using NT 4.0, service pack 6a, Labwindow version 5.0
    Thanks,
    Bob
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    Adding the lib file to your project is not sufficient to use its functions.
    You also need the function definitions. According to MSDN, CMC function definitions
    are located in "xcmc.h" header file, which should be present in cvi\sdk\include.
    So, simply add the following line at the beginning of your source file "smtp.c":
    #include
    [email protected] wrote:
    >Hi,> I am trying to use win32 calls that are not included in kernel32.lib,>gdi32.lib
    and user32.lib thus I have to add import libraries to the>project. Reading
    cvi\sdk\sdkfuncs.txt I determined that the three>functions I need (cmc_logon,
    cmc_logoff and cmc_send) are located in>mapi32.lib.>> So in project I do
    Edit->Add files to project->library and select>cvi\sdk\lib\mapi32.lib. It
    pops into the project
    view.>> After build project I get>Undefined symbol
    'cmc_logoff' referenced in "smtp.c">Undefined symbol 'cmc_logon' referenced
    in "smtp.c">Undefined symbol 'cmc_send' referenced in "smtp.c">>Which are
    exactly the same errors if I don't include mapi32.lib in the>project.>>Where
    have I gone wrong? As far as I can tell these routines should now>link.>>This
    is using NT 4.0, service pack 6a, Labwindow version 5.0>>Thanks,> Bob>>>Sent
    via Deja.com http://www.deja.com/>Before you buy.

  • "error initializing import libraries"

    Hi, I've spent a week designing all the parts of a portfolio online and now, when I'm trying to open the file from Flash Catalyst to create the interactions, I can't... I've tried everything.. My file have a lot of layers (about 100-125), linked 72ppp jpge images (50 and no more that 200 kb per image) text titles (25) and symbols (20). I've tried creating outlines for text, rasterizing text, creating a .fxg file and with different save options creating .ai files... and I can't open the damned file. I need to work on this project right now because of the deadlines, and I can't believe this program doesn't read anything... please help!!
    When I try to open a ai file Catalyst says: "error initializing import libraries" and when I try to open a fxg file it says: "the design you have selected have too many objetcs to import in adobe flash catalyst cs5".
    Please, I'd really appreciate any idea, I'm desperate!

    Hi, I've spent a week designing all the parts of a portfolio online and now, when I'm trying to open the file from Flash Catalyst to create the interactions, I can't... I've tried everything.. My file have a lot of layers (about 100-125), linked 72ppp jpge images (50 and no more that 200 kb per image) text titles (25) and symbols (20). I've tried creating outlines for text, rasterizing text, creating a .fxg file and with different save options creating .ai files... and I can't open the damned file. I need to work on this project right now because of the deadlines, and I can't believe this program doesn't read anything... please help!!
    When I try to open a ai file Catalyst says: "error initializing import libraries" and when I try to open a fxg file it says: "the design you have selected have too many objetcs to import in adobe flash catalyst cs5".
    Please, I'd really appreciate any idea, I'm desperate!

  • Importing libraries

    Hey guys, I'm pretty new to Java and have a question about importing libraries into my code.
    A quick rundown of my system:
    Have a sphinx4 speech recognition engine which recognizes movement commands for a robot, such as move forward ten feet, or turn left thirty degrees.
    My robot, coded in PBASIC is set to await data from a bluetooth serial port.
    When sphinx4 recognizes a command, it sends a series of bytes to my robots microcontroller, via the serial port.
    I am trying to use simpleserial(http://web.media.mit.edu/~benres/simpleserial/) to code my java to transmit bytes over the serial connection.
    My question:
    How do i properly install the *.java libraries of simpleserial in order to use them in my code. I have tried adding the *.java files to a home folder such as:
    sphinx4\simpleserial\SimpleSerial.java
    etc..
    for each file
    In my code, I tried using:
    import simpleserial.SimpleSerial;
    etc..
    When I compile, it says that sphinx4\simpleserial\SimpleSerial.java does not contain the class path for simpleserial.SimpleSerial;
    Any ideas?

    rotary9k wrote:
    The files that I need to include are SimpleSerial.java and SimpleSerialNative.java. The zip file that I downloaded contains the .class files for these, so that means they are already compiled right?Yes.
    I'm not sure what you mean by "Put the jar file in your classpath", could you elaborate a bit more.First -- you downloaded a zip file? Not a .jar file? I believe that both use .zip compression, but a .jar file is the traditional way to distribute Java binaries (compiled classes).
    The classpath is a value that tells the Java virtual machine and the compiler where to find classes to use. You can specify it as an environment variable, or as an argument to the java and javac programs (e.g., on a Windows machine, java.exe and javac.exe). In IDEs the classpath is more integrated and might not be described as "classpath".
    Basically you just set the classpath to include the jar file, like this on a unix system:
    export CLASSPATH=yourJarFile.jar:$CLASSPATHfor an environment variable, or on the command line like this:
    javac -classpath=yourJarFile.jar TheClassYouWantToCompile.javaetc.
    There are tutorials on this site that go into more detail.

  • Merge/import libraries from same external on 2 pcs

    this is complicated and i'm not sure how to best explain it, but here goes.
    I have 2 pc laptops and one external hd. I kept all of my downloads, music etc on the external and played them on iTunes on the first laptop. When it crashed, I bought a new one and used the same external for the new iTunes. Now I'm switching back to the old laptop, using the same external. How do i merge the libraries, given that I've bought/added songs to the library, and want to import my playlists/play count... I know there will be a lot of duplicates so is there any way to import only the new songs/playlists?
    Not sure if this is at all clear.

    Hello RASSRQ,
    Do you mean that the file history in NAS need 2 or 3 times space as the file on PC?
    Please explain a bit about the sentence ‘When I use Windows Explorer to list contents of subfolders in Documents in the File History folder on the NAS, it shows the same files and sizes as it shows on the folders on the PC.  But when I use Windows Explorer
    to get the Properties of those folders, it shows exactly 2 or 3 (differs by folder) times as many files, and 2 or 3 times the total space taken on the PC.  There are many folders in the $OF folder. ’
    I can’t understand: What is $OF folder? Could you please share us a screenshot about $OF folder if you willing to?
    What folders in $OF folder?
    Based on my test, I follow the steps by referring to the following article and can’t find the similar issue.
    http://windows.microsoft.com/en-HK/windows-8/set-drive-file-history
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • How can I include metadata when importing libraries?

    I've exported my 100 GB of photos to an external hard drive. Now I would like to split my photos into five libraries and import them including their metadata (modifications and tags, mostly) to my new libraries. Is that possible?

    I actually copied the library with all its content to an external drive of 1 TB. My plan was next to delete all photos on my iMac and then copy photos by year into separate libraries. However, I was recommened to try software that allows me to organise several libraries.
    Thanks anyhow.

  • Import Libraries (jar) into DC Project

    Hi all,
    I want to create a J2EE application with an DC Web-Modul.
    I have to import any jar libraries for other functions (struts.jar etc.). I have imported the library in the project settings:  properties ->java buildpath -> add external jars. But it doesn't´t work. I have also made another dc in which I have import the library. But it doesn't´t work. Could anybody give me some information's how does it work?
    Kind regards
    Axel

    Hi Axel,
    Refer the following thread "Using External JARs in a Web Dynpro Project"
    Web Dynpro Java
    This will be useful for you.
    Regards,
    Santhosh.C

  • Import java code applet into form and execute it

    Hi all.
    I'm on devsuite 10g.
    I have the following applet code:
    import java.applet.Applet;
    import java.awt.event.*;
    import java.awt.*;
    public class simple2 extends Applet
      implements MouseListener, MouseMotionListener {
          double r0 = 100.0;
          double r1 = 40.0;
        public void paint(Graphics g) {
          int n = 400;
          int x0=0,y0=0,x1,y1;
          for(int i=0;i <=n;i++)
               double rho   = 2*Math.PI*i/n;
               double theta = 16*Math.PI*i/n;
               double x = r0*Math.cos(rho) + r1*Math.cos(theta);
               double y = r0*Math.sin(rho) + r1*Math.sin(theta);
               // cambio sistema di riferimento
               x1 = getSize().width/2+(int)x;
               y1 = getSize().height/2+(int)y;
               // disegno
               if(i>0) g.drawLine(x0,y0,x1,y1);
               x0 = x1;
               y0 = y1;
        public void init() {
          addMouseListener(this);
          addMouseMotionListener(this);
        public void mouseClicked(MouseEvent e) {}
        public void mousePressed(MouseEvent e) {}
        public void mouseReleased(MouseEvent e) {}
        public void mouseEntered(MouseEvent e) {}
        public void mouseExited(MouseEvent e) {}
        public void mouseMoved(MouseEvent e) {}
        public void mouseDragged(MouseEvent e) {
          int x = e.getX(), y = e.getY();
          r0 = x-getSize().width/2;
          r1 = y-getSize().height/2;
          repaint();
          e.consume();
    } I want to import this code into my form in order to execute it.
    Code make possible drawing graphs to screen...
    What I want is to execute this code into my form, in a when-new-block instance trigger or something else.
    How can I achieve this???
    Thanks all for collaboration,
    Fabrizio

    It isn't quite as simple as just "importing" your java code if your goal is to have the forms and the java app communicate with each other. Interaction occurs when a properly designed Java Bean is created.
    Take a look at some of the examples on the following page as they can likely provide you with a good starting place:
    http://sheikyerbouti.developpez.com/forms-pjc-bean/menu/

  • HP ALM 11 : Synchronis​e imported libraries and source libraries between 2 projects.

    Hi,
    I created a librarie "LA" in project "PA", i put in this library 3 reqs and covering tests.
    In the project "PB", I import the library "LA" so i now have in project "PB" a librarie "LA_imported" and the 3 reqs and covering tests from A.
    I update a req in "PB".
    I go in "PA" and i compare the librarie "LA" with the librarie "LA_imported" from project "PB".
    I see that i have a difference between "LA" and "LA_imported", but the "Synchronise" button is not clicable.
    What is the problem ?
    thanks

    The duplication is unnecessary. Exporting creates a duplicate of the file. So now you'll have a duplicate of a duplicate. Exporting is not "working on" a file.
    No it's not merging, it's exporting from one to the Finder and into another. No matter what lose something. If you export the Original you leave behind all the work you've done in iPhoto. If you export anything else, you lose the non-destructive editing and the ability to revert to the original. With merging you preserve that work. Yes, you can trash the old Library when you have completed the manoevre but no it's not the same thing as merging.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue. But in brief:
    Current gets you the iPhoto Preview, used for sharing via media browsers. It's a jpg, medium quality missing metadata. Original gets the file you imported, unchanged and then you can export different version of the current version at different qualities. If you choose to export anything except the Original you do not get a Raw. There's no such thing as an "edited Raw", and you lose the connection between the original and the exported version. That means you've taken a non-destructive workflow and turned it into a destructive one.
    The Tiff will certainly be higher qulaity and less likely to suffer generational loss in future editing but the file sizes are vast, often more than 10 times the size of the jpeg.
    Put it this way, it would be cheaper to buy Library Manager than the disk you'll need to contain all the Tiffs. Unless you plan on a lot of editing, I'd go for a high quality jpeg as a reasonable compromise.
    To be clear:
    So, I guess my new question is, how can I edit the Raw image and keep it in a RAW format that IPhoto recognizes so that I can reprocess without any loss at a future time, or is it that once you edit a RAW image, then it is no longer a RAW image?
    Once you edit a Raw it can no longer be a Raw. End of.

  • Aperture. Imported libraries, edited images corrupted!

    All existing libraries (old and newer) imported into this latest version of Aperture appear corrupted - not all the images, only the ones round-tripped through photoshop and back. The images show up either as a blanket of messed up coloured lines (garbage) or a black screen with "image format not supported" error. All these images were originally imported in aperture and round-tripped back into aperture - Never touched by any other software and saved in .psd format.
    Has anyone else run into this? Any thoughts would be much appreciated as I have hundreds of hours of editing tied up in the editing of these images and now they are all messed up! Older versions of aperture had no issues like this!
    Please see attached screen grab
    Thanks!
    ~Cliff

    A lot more than 10% for me unfortunately! The masters seem fine! I had just archived a bunch from my laptop a little while ago and thought that I could then transfer them to my mini easily - well one of Aperture's famous updates screwed that idea up!
    Yeah I too am in the process of trying to re-edit etc. and save some of them. But soo much time already invested. I had one project, among so many, with over 200 pictures heavily edited for a particularly artsy project and not a single one renders properly! And worse, I posted tiny copies of them so people could review and now those that want them want what they saw - So now have to try and duplicate those exact edits! This program is getting far to useless!
    Aperture WAS a good idea but it's costing me much than the organizational help it provides!
    Sorry for the rant, hope you get your stuff sorted out!! And thanks for the thumbnail suggestion, tried that too!

  • Loading client libraries from Applet

    All -
    1) Can a Signed Applet load libraries that are installed in the Client machine with out altering the policy/permission in the client machine.
    2) Does making the signed applet .jar as signed .cab file help the above problem at least in Internet Explorer?
    3) If the only option is for the client to alter security in the local machine which is the preferred location?
    - (a) /lib/security/java.security under JRE installation
    - (b) /Document & Settings/<user>/.java.policy
    Appreciate all your time
    -cheers
    Anoop

    1) Yes
    2) No. Making a jar uses one set of tools either from Sun or Netscape. Making a cab uses MS tools which I believe are not compatible with SUN java.
    3) Option A - because you only have to change that one spot and ALL those who log on will get the same rights which makes it less of a maintenance hassle for you.

  • How to import libraries?

    Hi,
    I am attempting to use the Jakarta Commons HttpClient library in my program.
    I have set the CLASSPATH variable in my System Variables "Temp" and "Tmp" to D:\Documents and Settings\nilesh.thakur\Desktop\JAVA\httpclient\httpcomponents-client-4.0.1\lib\httpclient.jar;D:\Documents and Settings\nilesh.thakur\Desktop\JAVA\httpclient\httpcomponents-client-4.0.1\lib\httpmime.jar;D:\product\10.1.3.1\OracleAS_1\MOBILE\Sdk\bin\OLITE40.JAR;D:\Documents and Settings\nilesh.thakur\Desktop\JAVA\Apache\junit-4.8.1.jar;D:\Documents and Settings\nilesh.thakur\Desktop\JAVA\Apache\Logining\commons-logging-1.1.1\commons-logging-1.1.1.jar;
    But unfortunately when I compile the .java file I get the following errors :
    HttpClientTutorial.java:1: package org.apache.commons.httpclient does not exist
    import org.apache.commons.httpclient.*;
    Is there a specific folder structure to place the files that I have to follow to get this thing working ?
    Is there anything else that one need to do apart from Classpath Setup ?
    Is this the right way to set the classpath?

    import org.apache.commons.httpclient.*;
    import org.apache.commons.httpclient.methods.*;
    import org.apache.commons.httpclient.params.HttpMethodParams;
    import java.io.*;
    public class HttpClientTutorial {
      private static String url = "http://www.apache.org/";
      public static void main(String[] args) {
        // Create an instance of HttpClient.
        HttpClient client = new HttpClient();
        // Create a method instance.
        GetMethod method = new GetMethod(url);
        // Provide custom retry handler is necessary
        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
                  new DefaultHttpMethodRetryHandler(3, false));
        try {
          // Execute the method.
          int statusCode = client.executeMethod(method);
          if (statusCode != HttpStatus.SC_OK) {
            System.err.println("Method failed: " + method.getStatusLine());
          // Read the response body.
          byte[] responseBody = method.getResponseBody();
          // Deal with the response.
          // Use caution: ensure correct character encoding and is not binary data
          System.out.println(new String(responseBody));
        } catch (HttpException e) {
          System.err.println("Fatal protocol violation: " + e.getMessage());
          e.printStackTrace();
        } catch (IOException e) {
          System.err.println("Fatal transport error: " + e.getMessage());
          e.printStackTrace();
        } finally {
          // Release the connection.
          method.releaseConnection();
    }

  • Adding XCode Import Libraries

    I'm currently trying to port a Windows application written with "Borland C Builder 6". I'd prefer to import the project file (.bpr) into XCode, but the only import format XCode supports is CodeWarrior. I'm wondering if anyone knows of a plugin that increases the formats available for import, preferably include this Borland C format.

    No such thing. I seriously doubt any part of a C++ Builder project will be useable on MacOS X.

Maybe you are looking for

  • HT4623 how do I know what the latest version of ios is?  The people at the apple store told me it was not up to date, but my computer is telling me it is?

    I'm having trouble opening one app (facebook).  Everything else is fine.  I've deleted it, reinstalled it, shut down, made sure everything is up to date.  Took the ipad to the apple store and was told the software was not up to date.  Came home, plug

  • What's the deal with bluetooth mice ?

    What's the deal with bluetooth mice ? I've never heard of any model yet that didn't come with loads of complain... (I've done my research) ... isn't there one that just works fine and that will for a few years like a standard mouse ? I would really l

  • Messages using macro

    Hi All, I am doing some validation based on line items of user exit for PO creation (ME21N) and  PO creation (ME22N) and wanted to show warning messages for each line item . With macro its working fine messages are getting triggered but displayed mes

  • Can't get to my HTML - help!

    While I was updating home page of a website that gets and will get updated often, suddenly I lost access to HTML. It is grayed out and seems locked. This happened after (but NOT immediately) I detached this page from the template (the navigation ia a

  • Relating request and response messages

    Hello, Concerning how to relate messages. I have a jpd putting messages 'send' queue, and a responses arrive on a 'receive' queue. Both queues may be remote. Several jpd’s will run at the same time. The message correlation id appears to be intended