How to run Applet with dependencies jar file in HTML












0















I have a jar file containing applet files which are dependent of below additional jar file.
Its running fine as standalone jar file. The applet uses:




  1. xmlrpc-2.0.jar

  2. commons-codec-1.3.jar


But when I tried to run in HTML as below, it's running, but attached additional jar files are not binding with it. How can I fix the problem?



<html>
<body>
<APPLET
CODE="MAIN.class"
WIDTH="100%" HEIGHT="100%"
ARCHIVE = "MAIN.jar,xmlrpc-2.0.jar,commons-codec-1.3.jar"
>
This example uses an applet.
</APPLET>
</body>
</html>


Manifest



Manifest-Version: 1.0
Main-Class: MAIN
Created-By: 1.3.0 (Sun Microsystems Inc.)
Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar
Name: MAIN.class









share|improve this question

























  • There's no APPLET tag in any recent version of HTML, only applet, same for the attributes code, width, height, archive.

    – Philipp Reichart
    Sep 24 '11 at 11:50











  • what error do you get? classNotFound? for classes located in other jars? One more silly question, is your main class at default package? because there should be full package name at the code="" attribute

    – Yazan
    Aug 25 '14 at 13:13













  • Hope you know that code signing required for applet since 1st January, 2014

    – Vicky Thakor
    Oct 27 '14 at 6:20
















0















I have a jar file containing applet files which are dependent of below additional jar file.
Its running fine as standalone jar file. The applet uses:




  1. xmlrpc-2.0.jar

  2. commons-codec-1.3.jar


But when I tried to run in HTML as below, it's running, but attached additional jar files are not binding with it. How can I fix the problem?



<html>
<body>
<APPLET
CODE="MAIN.class"
WIDTH="100%" HEIGHT="100%"
ARCHIVE = "MAIN.jar,xmlrpc-2.0.jar,commons-codec-1.3.jar"
>
This example uses an applet.
</APPLET>
</body>
</html>


Manifest



Manifest-Version: 1.0
Main-Class: MAIN
Created-By: 1.3.0 (Sun Microsystems Inc.)
Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar
Name: MAIN.class









share|improve this question

























  • There's no APPLET tag in any recent version of HTML, only applet, same for the attributes code, width, height, archive.

    – Philipp Reichart
    Sep 24 '11 at 11:50











  • what error do you get? classNotFound? for classes located in other jars? One more silly question, is your main class at default package? because there should be full package name at the code="" attribute

    – Yazan
    Aug 25 '14 at 13:13













  • Hope you know that code signing required for applet since 1st January, 2014

    – Vicky Thakor
    Oct 27 '14 at 6:20














0












0








0








I have a jar file containing applet files which are dependent of below additional jar file.
Its running fine as standalone jar file. The applet uses:




  1. xmlrpc-2.0.jar

  2. commons-codec-1.3.jar


But when I tried to run in HTML as below, it's running, but attached additional jar files are not binding with it. How can I fix the problem?



<html>
<body>
<APPLET
CODE="MAIN.class"
WIDTH="100%" HEIGHT="100%"
ARCHIVE = "MAIN.jar,xmlrpc-2.0.jar,commons-codec-1.3.jar"
>
This example uses an applet.
</APPLET>
</body>
</html>


Manifest



Manifest-Version: 1.0
Main-Class: MAIN
Created-By: 1.3.0 (Sun Microsystems Inc.)
Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar
Name: MAIN.class









share|improve this question
















I have a jar file containing applet files which are dependent of below additional jar file.
Its running fine as standalone jar file. The applet uses:




  1. xmlrpc-2.0.jar

  2. commons-codec-1.3.jar


But when I tried to run in HTML as below, it's running, but attached additional jar files are not binding with it. How can I fix the problem?



<html>
<body>
<APPLET
CODE="MAIN.class"
WIDTH="100%" HEIGHT="100%"
ARCHIVE = "MAIN.jar,xmlrpc-2.0.jar,commons-codec-1.3.jar"
>
This example uses an applet.
</APPLET>
</body>
</html>


Manifest



Manifest-Version: 1.0
Main-Class: MAIN
Created-By: 1.3.0 (Sun Microsystems Inc.)
Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar
Name: MAIN.class






java html jar applet






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 24 '11 at 12:23









Andrew Thompson

153k28162345




153k28162345










asked Sep 24 '11 at 11:43









ManeeshManeesh

4,97943153




4,97943153













  • There's no APPLET tag in any recent version of HTML, only applet, same for the attributes code, width, height, archive.

    – Philipp Reichart
    Sep 24 '11 at 11:50











  • what error do you get? classNotFound? for classes located in other jars? One more silly question, is your main class at default package? because there should be full package name at the code="" attribute

    – Yazan
    Aug 25 '14 at 13:13













  • Hope you know that code signing required for applet since 1st January, 2014

    – Vicky Thakor
    Oct 27 '14 at 6:20



















  • There's no APPLET tag in any recent version of HTML, only applet, same for the attributes code, width, height, archive.

    – Philipp Reichart
    Sep 24 '11 at 11:50











  • what error do you get? classNotFound? for classes located in other jars? One more silly question, is your main class at default package? because there should be full package name at the code="" attribute

    – Yazan
    Aug 25 '14 at 13:13













  • Hope you know that code signing required for applet since 1st January, 2014

    – Vicky Thakor
    Oct 27 '14 at 6:20

















There's no APPLET tag in any recent version of HTML, only applet, same for the attributes code, width, height, archive.

– Philipp Reichart
Sep 24 '11 at 11:50





There's no APPLET tag in any recent version of HTML, only applet, same for the attributes code, width, height, archive.

– Philipp Reichart
Sep 24 '11 at 11:50













what error do you get? classNotFound? for classes located in other jars? One more silly question, is your main class at default package? because there should be full package name at the code="" attribute

– Yazan
Aug 25 '14 at 13:13







what error do you get? classNotFound? for classes located in other jars? One more silly question, is your main class at default package? because there should be full package name at the code="" attribute

– Yazan
Aug 25 '14 at 13:13















Hope you know that code signing required for applet since 1st January, 2014

– Vicky Thakor
Oct 27 '14 at 6:20





Hope you know that code signing required for applet since 1st January, 2014

– Vicky Thakor
Oct 27 '14 at 6:20












2 Answers
2






active

oldest

votes


















0














It should work as long as the jar files are in the same folder than your MAIN.jar. Can you see any classpath-related error in the Java console?



You can also try to use a manifest file as described here.






share|improve this answer
























  • I used the same already in MAIN.jar file Its work fine without html. :Manifest-Version: 1.0 Main-Class: MAIN Created-By: 1.3.0 (Sun Microsystems Inc.) Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar Name: MAIN.class

    – Maneesh
    Sep 24 '11 at 11:52





















0














FatJar for Eclipse worked for me. Just be careful when you have multiple projects open, since it has a tendency to grab other stuff from non-related projects and roll that into your fatjar too.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f7538784%2fhow-to-run-applet-with-dependencies-jar-file-in-html%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    It should work as long as the jar files are in the same folder than your MAIN.jar. Can you see any classpath-related error in the Java console?



    You can also try to use a manifest file as described here.






    share|improve this answer
























    • I used the same already in MAIN.jar file Its work fine without html. :Manifest-Version: 1.0 Main-Class: MAIN Created-By: 1.3.0 (Sun Microsystems Inc.) Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar Name: MAIN.class

      – Maneesh
      Sep 24 '11 at 11:52


















    0














    It should work as long as the jar files are in the same folder than your MAIN.jar. Can you see any classpath-related error in the Java console?



    You can also try to use a manifest file as described here.






    share|improve this answer
























    • I used the same already in MAIN.jar file Its work fine without html. :Manifest-Version: 1.0 Main-Class: MAIN Created-By: 1.3.0 (Sun Microsystems Inc.) Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar Name: MAIN.class

      – Maneesh
      Sep 24 '11 at 11:52
















    0












    0








    0







    It should work as long as the jar files are in the same folder than your MAIN.jar. Can you see any classpath-related error in the Java console?



    You can also try to use a manifest file as described here.






    share|improve this answer













    It should work as long as the jar files are in the same folder than your MAIN.jar. Can you see any classpath-related error in the Java console?



    You can also try to use a manifest file as described here.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Sep 24 '11 at 11:47









    GuidoGuido

    25.1k22104160




    25.1k22104160













    • I used the same already in MAIN.jar file Its work fine without html. :Manifest-Version: 1.0 Main-Class: MAIN Created-By: 1.3.0 (Sun Microsystems Inc.) Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar Name: MAIN.class

      – Maneesh
      Sep 24 '11 at 11:52





















    • I used the same already in MAIN.jar file Its work fine without html. :Manifest-Version: 1.0 Main-Class: MAIN Created-By: 1.3.0 (Sun Microsystems Inc.) Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar Name: MAIN.class

      – Maneesh
      Sep 24 '11 at 11:52



















    I used the same already in MAIN.jar file Its work fine without html. :Manifest-Version: 1.0 Main-Class: MAIN Created-By: 1.3.0 (Sun Microsystems Inc.) Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar Name: MAIN.class

    – Maneesh
    Sep 24 '11 at 11:52







    I used the same already in MAIN.jar file Its work fine without html. :Manifest-Version: 1.0 Main-Class: MAIN Created-By: 1.3.0 (Sun Microsystems Inc.) Class-Path: xmlrpc-2.0.jar commons-codec-1.3.jar Name: MAIN.class

    – Maneesh
    Sep 24 '11 at 11:52















    0














    FatJar for Eclipse worked for me. Just be careful when you have multiple projects open, since it has a tendency to grab other stuff from non-related projects and roll that into your fatjar too.






    share|improve this answer




























      0














      FatJar for Eclipse worked for me. Just be careful when you have multiple projects open, since it has a tendency to grab other stuff from non-related projects and roll that into your fatjar too.






      share|improve this answer


























        0












        0








        0







        FatJar for Eclipse worked for me. Just be careful when you have multiple projects open, since it has a tendency to grab other stuff from non-related projects and roll that into your fatjar too.






        share|improve this answer













        FatJar for Eclipse worked for me. Just be careful when you have multiple projects open, since it has a tendency to grab other stuff from non-related projects and roll that into your fatjar too.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 19 '14 at 17:39









        advadv

        7512




        7512






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f7538784%2fhow-to-run-applet-with-dependencies-jar-file-in-html%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents