How to run Applet with dependencies jar file in HTML
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:
xmlrpc-2.0.jar
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
add a comment |
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:
xmlrpc-2.0.jar
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
There's noAPPLET
tag in any recent version of HTML, onlyapplet
, same for the attributescode
,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 since1st January, 2014
– Vicky Thakor
Oct 27 '14 at 6:20
add a comment |
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:
xmlrpc-2.0.jar
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
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:
xmlrpc-2.0.jar
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
java html jar applet
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 noAPPLET
tag in any recent version of HTML, onlyapplet
, same for the attributescode
,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 since1st January, 2014
– Vicky Thakor
Oct 27 '14 at 6:20
add a comment |
There's noAPPLET
tag in any recent version of HTML, onlyapplet
, same for the attributescode
,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 since1st 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
add a comment |
2 Answers
2
active
oldest
votes
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.
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
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Apr 19 '14 at 17:39
advadv
7512
7512
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
There's no
APPLET
tag in any recent version of HTML, onlyapplet
, same for the attributescode
,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