Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet jar file,use of archive in applet help

 
supriya riya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,I have jar file of my application.I am creating index.html in myftp folder and code as below.myftp has jftp jar file.

index.html



main class of jftp is JFtp which is in the jar itself

on opening index.html getting error applet not inited.

myftp folder has only jar file named jftp and index.html

on extracting jarfile i have many packages which have class files need.
Please help.
Why my applet is not running.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove the "codebase" attribute. You can't use absolute paths like "D:\..." anyway, but you don't need it if HTML file and jar file are in the same directory. You do not need to (and should not) extract the jar file.
 
supriya riya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks it solved my problem,but when i gave the package names,which i should have remembered to give.And in IDE netbeans its the JFtp class as main class extends Jframe.But it was not working.When i used JFtpApplet it woked.



JFtpApplet class.




So can anyone help me with this i dint get why with JFtp in code field it wasnt running.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you're asking - the "code" attribute must contain the fully-qualified name of the class. So if you leave out the package name it won't work.
 
supriya riya
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just jumbled my words and got confused.I got it.....
thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic