Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Running Applet from DLL

 
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am having a requirement which I don't know can be solved or not.
Really looking forward for some suggestion.

I created an Applet which works fine when all the code and resources are packaged in to the jar and provided in the archive tag of the applet tag.
The thing is , now the jars are replaced with .dll files with all the jars .
Now when I am running the applet, is show ClassNotFoundException for the code attribute which has the main class of the jar ( which invokes the applet).

I want to ask , that is it possible the way it has been requested?
Also, are there some code changes required to be done in the applet's init() to locate or call those dll files.


Thanks in advance.


 
Saloon Keeper
Posts: 6530
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "with .dll files with all the jars"? Class files are distributed in jars (or as a hierarchy of loose files), not as DLLs. The only way to use DLLs is via JNI, which would still need a proper Java class to get started, at the least the one that's mentioned in the <APPLET> tag.
 
Prash Singh
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Tim,
We originally had a swing application , which was required to deployed on web.
So for that purpose Applet was created which works successfully with all the jars required.
We used to distribute our application in .exe format and with the .dll files which were created using a tool JET Compiler
which compiles, packages the jars into .dll files.
The approach worked fine for Swing application .
So same approach is required in Applet too.



 
Tim Moores
Saloon Keeper
Posts: 6530
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off, why didn't you make it a JavaWebStart application? Those can be distributed via the web, but otherwise are pretty much the same as regular desktop applications. It seems that would have been a much better fit if you already had a working desktop app.

If you want this to be an applet, then it needs to be an applet - that means no exe to start it, but rather a regular Java class that extends Applet or JApplet.
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic