• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet runs in eclipse, but when I embed it in html, it doesnt work

 
Paul Wagner
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written an applet, that runs c++ exe... it works fine in eclipse, but today I embedded it in html page and its not doing any thing at all.. any suggestions..

one thinig more, when I run my applet in eclipse. the c++ exe runs fine... but after embedding applet in html, the c++ exe is not running.

I used

Process process = Runtime.getRuntime().exec("exe name " + arg1 + arg2);

to run the exe on button event.

 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the Java Console - it probably contains error messages. In particular, calling Runtime.exec is not allowed in applets unless they are signed or the local security policy has been altered. See HowCanAnAppletReadFilesOnTheLocalFileSystem for more details.
 
Paul Wagner
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes you are right, my applet is not signed... thats the reason... thnx
 
Paul Wagner
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dittmer,

I have signed the applet and its still not reading the files on the file system or starting a process through runtime.exec(). has it something to do with access control list in java ? any idea ?
 
Paul Clapham
Sheriff
Pie
Posts: 20971
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could be all kinds of things. Perhaps your code makes some assumption about the current working directory when Runtime.exec runs. Perhaps you're trying to run an executable which isn't on the computer where the applet runs. We could make a longer list but there isn't any point.

Are you getting an exception from Runtime.exec? Don't just say "it doesn't work", find out why not. Look at the Java console in the browser for a start.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic