cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved]How to Import a Jar

tdt
Champ in-the-making
Champ in-the-making
Hi,

I created a little application for test and i would like to import it into alfresco.
Its an app. that creates a pdf on the c:\temp atm … in the future it needs to create a pdf with all metadata of a sertan document.

Now, i would like to test the import into alfresco first before i go anny ferther. The application needs to be started when i click on an object on the daslet.

Can anybody tell me how to do this?

Thanks a lot,
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
It depends upon which application server you are using.  

But assuming you have are running on tomcat configured as per Alfresco's guidelines.
You should have set up a "shared/lib" folder alongside your "shared/classes" folder.  put your Jar in there.

tdt
Champ in-the-making
Champ in-the-making
ok,
and then how  can i activate it from the ftl?
i tryed the following in my ftl
<html>
<body>
<applet code=PDFTest.class archive="/alfresco/scripts/Test/MyCreatePdf.jar, /alfresco/scripts/Test/iText-2.1.5.jar" width="300" height="20">
</applet>
</body>
</html>
My application is not a java applet app so i get the following error:
java.lang.ClassCastException: PDFTest cannot be cast to java.applet.Applet
   at sun.applet.AppletPanel.createApplet(Unknown Source)
   at sun.plugin.AppletViewer.createApplet(Unknown Source)
   at sun.applet.AppletPanel.runLoader(Unknown Source)
   at sun.applet.AppletPanel.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

is it possible to start my class without an applet or do i have to change my code?

thanks

tdt
Champ in-the-making
Champ in-the-making
ok,

it works local but not when i include it into the ftl.
maybe a java version problem.

thanks