Impossible to run an applet in a signed jar from APEX page

<applet id="runApp"
CODE="TestApplet"
ARCHIVE="/i/...path to applets dir.../applets/test.jar"
width=1 height=1>
</applet>
The class TestApplet is in the jar's root.
Java console shows:
java.lang.ClassNotFoundException: TestApplet
     at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://kor:7777/i/...path to applets dir.../applets/test.jar/TestApplet.class
     at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
     at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
     at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     ... 7 more
The applet is not called by javascript => should not be blocked by Java plugin.
Igor
Edited by: kortchnoi on Nov 1, 2009 2:28 PM

Well... All of a sudden it began to work. Why - I don't know. Maybe, because I have restarted the browser. Or else.
Anyway, now I can launch *.exe (some legacy applications) from APEX on Firefox. Next step - IE that resists for the moment.
Igor

Similar Messages

  • Trouble signing in from welcome page of photshop elements 10

    I am new to adobe, registered photoshop elements 10 yesterday, I am unable to sign in on the welcome adobe photoshop elements screen that is the first screen you see when start adobe photoshop element 10. It always leads me to an account page asking for my birthdate and a name to use in a photshop.com url. When I give it this it has an error, I have only been able to sign in through other places like here in community. I am running windows xp sp3 and IE 8. Chat support doesn't help me and there are no products updates that I can find. Help, whats wrong?

    Hi Barbara,
    Thank you for taking the time to help me. It is disappointing that the sign in from organizer and edit are also rendered 'not functional' since they to want to prompt you to use the defunct 'photoshop.com'. I would think that Adobe would issue a ptf to remove this from the sceens, they just sort of leave novices to wonder what in the heck is wrong.. For the benefit of those who would like a quick cut and paste for individual shortcuts to enter the organizer and editor separatly and not use the welcome screen, here are the paths for elements 10 on windows xp, I assume these paths are the same regardless of the operating system and should probably also work on windows 7:
    "C:\Program Files\Adobe\Elements 10 Organizer\PhotoshopElementsOrganizer.exe"
    "C:\Program Files\Adobe\Photoshop Elements 10\PhotoshopElementsEditor.exe"
    These work great and thanks Barbara for your recommendation!
    Doug

  • Signed Jars from Sun?

    I also posted this topic in the "Security General" forum. Please write your answers there. Thank you!
    Hello,
    why are the jars provided by Sun for the different Java technologies not signed with a trusted certificate from Sun?
    I have the requirement that my WebStart enabled application must run in privileged mode, but then all resources including for example the ejb.jar must be signed.
    I know that I could easily run the jarsigner tool myself on the ejb.jar but this would probably evoke legal problems: My company can't claim authorship for a piece of software built by Sun.
    My personal opinion is, that this makes the utilizability of WebStart for commercial products highly questionable.
    sanostol

    It dosnt make utilizability of WebStart for commercial products highly questionable - It's up to your company to ensure your code is signed with their own key, and to ensure nothing has been tampered with - if a user downloads something from your site that proceeds to wipe their disk or perform a denial of service attack on Microsoft for that matter that's your liability.
    You have to understand that all the jars in a web start app currently have to be signed by the same key, furthermore each jar cannot be signed more than once. Were Sun to sign their jars we'd all be having to unpack to remove the signatures, re-jar the contents and sign with out own keys again - it's often a royal pain when third party jars come signed.
    We can get around this by making these third-party jars a separate <part> each having its own jnlp file, but this is more work and if this part needs security settings the user will be prompted about wether they want to install every indivdual jar in your app - defiantly not desirable. Currently we have this with JavaHelp which frustratingly does come signed, and needs at least client-privs to allow users to print pages.
    - Richard

  • Applet unable to load JARs from URL?

    Please let me preface my query with "I have not done applets ever for live business apps, only for uni and that was over a decade ago..." :)
    I've been doing a lot of reading the last couple days and have been trying to modify a currently existing applet which unfortunately currently depends on libraries being installed in the ext dir on the user's PC (!). I am modifying it such that 1. it will now make a web service call and 2. it will need to include all of the good libraries that come with making web service calls. My other goal is to change the way the applet is loaded (applet tag) so that the libraries need not be pre-installed in the user's ext dir.
    My trouble is, I cannot seem to persuade the applet to load the libraries that co-exist with it. I am loading the applet via a simple test harness page presently, where the HTML file resides in one directory (http://localhost/cis/dictation/test1.html) and the JARs in another (http://localhost/cis/common), but all at the same subdir level under the main web root. I know the applet is loading, as I have a test debug statement which prints out on each invocation.
    Note If I load all of the JARs in the dependency hierarchy into the extensions directory, everything works swimmingly.
    I have tried multiple variations on the applet tag, not completely sure of what it should look like. Please note when I load the URLs into the browser for each individual library, e.g. http://localhost/cis/common/axis.jar, the browser prompts me to download the JARs, so I know the browser can "see" them.
    <applet code="webmedx.client.applet.audio.TransferApplet.class"
         codebase="http://localhost/cis/common/"
         name=TransferApplet      
         width=10 height=10
         archive="audio.jar,axis.jar,jaxrpc.jar,jndi.jar,commons-logging.jar,commons-discovery.jar"
         MAYSCRIPT>
         <PARAM NAME="image" VALUE="images/webmedx_icon-32x32.gif">
         <PARAM NAME="boxmessage" VALUE="Loading the Webmedx Audio Player">
         <PARAM NAME="cache_archive" VALUE="../common/audio.jar">
         <PARAM NAME="DebugLevel" value="1">
         <PARAM NAME="userenterprise" VALUE="BHS">
         <PARAM NAME="userfacility" VALUE="BHS">
         <param name="scriptable" value="true">
    </applet>Using path relative to the browser URL (http://localhost/cis/dictation/test1.html):
    <applet
         codebase="../common"
         archive="audio.jar,axis.jar,jaxrpc.jar,jndi.jar,commons-logging.jar,commons-discovery.jar"
         code="webmedx.client.applet.audio.TransferApplet.class"
         name="TransferApplet"
         width="0" height="0"
         MAYSCRIPT>
         <PARAM NAME="image" VALUE="images/webmedx_icon-32x32.gif">
         <PARAM NAME="boxmessage" VALUE="Loading the Webmedx Audio Player">
         <PARAM NAME="cache_archive" VALUE="../common/audio.jar">
         <PARAM NAME="DebugLevel" value="1">
         <PARAM NAME="userenterprise" VALUE="BHS">
         <PARAM NAME="userfacility" VALUE="BHS">
         <param name="scriptable" value="true">
    </applet>Each of these results in the java console reporting a NCDFE for javax/xml/rpc/Service, which it should be able to locate in http://localhost/cis/common/jaxrpc.jar.
    Then on subsequent page reloads, the java console reports NCDFE's for the newly added class WITHIN the applet jar, webmedx/client/applet/util/cdsproxy/WSAudioArchiveLocator (assuming because it requires javax.xml.rpc.Service, and cannot load it).
    Any ideas/help will be very much appreciated :)
    Edited by: alexx_wmx on Jul 13, 2010 4:17 PM

    ejp wrote:
    Those JARs must be installed in the lib/ext directory of the JRE to work correctly. ..Do they? I am surprised to hear that, but have not dealt with them directly. Why?
    Note that I had asked the OP not to split what I feel is one question, into two threads. The other thread is at.. [http://forums.sun.com/thread.jspa?threadID=5444667], which had itself already been spawned from another thread.
    (sigh..) Following this topic is beginning to make my head hurt.

  • Signing Jars from within Java Code

    Hi,
    I would like to sign a jar file from within my Java code. Reason for this is that I wish to update a jar file at runtime, throw away the class loader that loaded the jar, and load the updated code inside a new classloader.
    One problem, however: The jar file has to be signed before loading it. How can I do this from my Java program? Or do I need to have the jarsigner tool available at the location where I resign the jar?
    Thanks in advance,
    Ronald.

    Hi,
    In the meantime I found an answer to my problem. In rt.jar there exists a class sun.security.tools.JarSigner, which can be used for exactly this purpose. Not completely portable, but it'll do the trick.
    Ronald.

  • Sending digitally signed emails from APEX

    We need the ability to digitally sign an email or group of emails generated from an APEX application via MS Exchange. Has anyone been able to do this?

    Post this to APEX forum....
    Sim

  • JNLP: Signed jars but still not trusted

    I have an applet that has signed jars that were signed by the same key, the applet shows the correct warnings on startup and works fine (allows access to the local file system, etc), however there still exists the 'yellow triangle warning' on one of two popups frames that the applet produces (but not the other one).
    The applet does use native code (packaged in a signed jar and referenced in the JNLP). The jars are all signed by the same certificate from a CA. I originally didn't have the JNLP signed (by placing it in the main jar in JNLP-INF/APPLICATION.JNLP) but this didn't help. Also I didn't have the JNLP codebase set to a real URL (and really cant in production because its a solution we deploy to customers servers - its packaged software not hosted) but even after I tested with a codebase to a test server, it still didnt remove the famed yellow triangle. I have all-permissions set in the JNLP.
    So two related questions:
    1) Other than having not having signed jars (or not signed correctly), what other reasons cause the 'yellow triangle'?
    2) The warning only appears on one of the popup Frames. What could be the possible reasons for that? Are there some privileges that show the icon whether the applet is signed or not?
    Note: While changing the client policy setting (showWindowWithoutWarningBanner) works, this cant be a solution.
    From the Java Console:
    ...It goes through all the jars (I only included one for brevity - there are 23 of them). Note it says 'have 1 common certificates'.. which I think indicates everything is signed by the same cert.
    Is there any indication in the console logs I can use to determine why it is not trusted? It looks (to me) that everything is OK, until it says 'istrusted=false'.
    security: Validating cached jar url=http://10.192.252.26/QMDesktop/native.jar ffile=C:\Documents and Settings\bunkowm\Application Data\Sun\Java\Deployment\cache\6.0\34\1df0b62-2c3ce377 com.sun.deploy.cache.CachedJarFile@d964af
    cache: Reading Signers from 995 http://10.192.252.26/QMDesktop/native.jar | C:\Documents and Settings\bunkowm\Application Data\Sun\Java\Deployment\cache\6.0\34\1df0b62-2c3ce377.idx
    security: Have 1 common certificates after processing http://10.192.252.26/QMDesktop/native.jar
    security: Istrusted: null false
    security: Loading certificates from Deployment session certificate store
    security: Loaded certificates from Deployment session certificate store
    security: Validate the certificate chain using CertPath API
    security: Obtain certificate collection in Root CA certificate store
    security: Obtain certificate collection in Root CA certificate store
    security: Start to check whether root CA is replaced
    security: The root CA hasnt been replaced
    security: No timestamping info available
    security: Found jurisdiction list file
    security: No need to checking trusted extension for this certificate
    security: The CRL support is disabled
    security: The OCSP support is disabled
    security: This OCSP End Entity validation is disabled
    security: Checking if certificate is in Deployment denied certificate store
    security: Checking if certificate is in Deployment permanent certificate store
    security: Checking if certificate is in Deployment session certificate store
    security: Mark trusted: null

    Andrew - of course you were correct about the signed cert - I misspoke when the CA signed applet didn't show a warning. (You were also right that I must have checked 'always accept' the certificate on the server I had the CA signed cert on).
    I think you guys are on to something about the privileged actions. It would explain where one popup has the icon and the other doesn't. We have Javascript making calls into the applet and we do use JNI (although I don't think there are any calls back). We do wrap these calls in privileged actions but maybe we missed something. What I've seen before is a security exception is thrown if we don't wrap them - but maybe there are areas where we don't and it doesn't throw an exception or it does and we eat it somehow (and for whatever reason doesn't cause anything noticeable).
    Now that I know it could likely be the applet code and not necessarily a build issue with signing the jars, I have another place to look...
    I'll check it out and let you know what I find.

  • Three questions about signed jar file and applet

    I use three signed jar file. Each of them signed by different certificate. First of JARs contain applet class. When I start applet from html page I see message &#8220;This applet was signed by&#8230;&#8230; but Java cannot verify it&#8230; Do you trust&#8230;?&#8221;. All times I press &#8220;Yes I trust&#8221; and after this questions applet stop to work end exit. If I use only one certificate for signing of three JARs then applet continue to work after question. 1) What should I do to fix this bug? 2) Is it any method to check from applet that user press Trust button? Is it any method to emulate work of SecurityManager to check that Certificate object is trusted (I want do call some method check(Certificate) and if certificate is not trusted I want to see message with question: &#8220;Do you want to trust this certificate&#8221; and so on)?

    Hello Jarman,
    1. If I have a signed jar file, then as long as the
    certificate is recognised as trusted that applet can
    run as a fully trusted application on the client
    machine. So I should not have to add lines such as
    permission java.lang.RuntimePermission
    "readFileDescriptor", "read" ;
    permission java.lang.RuntimePermission
    "writeFileDescriptor", "write" ;
    to my java.policy file. true/false ?true
    2. If I am running a signed jar file in the Java
    plugin then I do not need to have a verisign or thawte
    certificate (however to allow my certificate to be
    accepted I do have to import it into the cacerts file
    on the client machine). True/false?true
    3. Following on from question 2, if I want to be able
    to run an applet on a client machine, without messing
    around with ANY files on those machines, I need a
    verisign or thawte certificate. True/false?true
    4. (And finally) Apart from a security exception
    saying that I need to add one of the lines like those
    of question 1, is there any way I can get other debug
    information as to why the signed jar file is not being
    recognised as signed?No. This could be a problem of importing your certifcate into the wrong place.
    The information on the following link is a little bit dated but it helped me to successfully install a testcertificate and sign an applet with it.
    http://www.suitable.com/Doc_CodeSigning.shtml

  • Run swing applet without installed plug-in

    Is any possible way to run swing applet without installed java plug-in? Does exist way how to load swing classes from server?

    Is any possible way to run swing applet without
    installed java plug-in? Does exist way how to load
    swing classes from server?It is impossible to run a swing applet without the plug-in.
    There may be a solution : include the swing library in your applet,
    so you don't need the plugin anymore (personnaly i prefer having
    the plugin downloaded once and the use it as needed).
    For the load from a server you will need to be more specific, but
    don't forget : the applet don't run on the server, so it won't request
    Swing classes from the server.

  • Navigating between applets from the same signed jar (trusted CA) gives err

    See [http://www.chrisnewland.com/java-7-update-21-signedunsigned-error-switching-between-applets-in-the-same-signed-jar-trusted-ca-339] for my investigations so far.
    Clicking a link to navigate between applets contained in the same signed jar (signed by a trusted CA) pops up an error dialog complaining about a signed/unsigned code mix.
    Loading each applet in a fresh browser works fine.
    If you click from applet 1 to applet 2 via a non-applet page then both applets run without problem.
    [EDIT: This is behaviour is new to 7u21]
    Edited by: Chris Newland on Apr 17, 2013 3:19 AM

    I tried that (Adding Trusted-Library true) to the jars and even the 3rd party jars.  I still get the pop up and this error:
    Exception in thread "thread applet-com/travelers/prefillapplet/PrefillApp.class-1" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
    Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)

  • How to use SSLSocket on a signed jar applet?

    Hello:
    OK, I finally could make work my client-server project, not the way I 'd like, but it works.
    Now the problem is this:
    Currently I have my applet in a jar file; saiCte.jar, which is signed in this way:
    keytool -genkey -keystore TECSSDStore.keystore -alias Key1 -keyalg RSA -storepass tttttt -keypass tttttt
    jarsigner  -keystore TECSSDStore.keystore -signedjar  saiCte.jar  temp.jar  Key1  -storepass tttttt -keypass tttttt
    But signature is not useful for appletviewer, in my browser, I supposed that a signed applet would work, but it doesn't. There is a handshake problem. In the server it is:
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    I have to run the applet this way:
    java -Djavax.net.ssl.trustStore=TECSSDStore.keystore -Djavax.net.ssl.keyStorePassword=tttttt -Djava.security.policy=SecPolicy sun.applet.Main Cte.html
    Cte.html is this:
    <applet    code = 'saiCte.class'  archive='saiCte.jar' width='750' height='480'>  </applet>So how could I make my signed jar work in the browser? I considered setting properties, but it worked, I would reveal my password. Currently the only way I know for distributing my applet is including the keystore and password, which is inadmissible, since I signed the jar (or why am I supposed to sign jars if anyway I have to send keystore and passwords?)
    Thanks!

    Questions:
    1. Are you using client authentication in this SSL setup?
    In the server I have this:
    Socket.setWantClientAuth(false);
    I guess if this option is false and the client chooses not to provide authentication information about itself, the negotiations will continue.
    I read in SSLSocket API docs for setUseClientMode that "Servers normally authenticate themselves, and clients are not required to do so. "
    2. What is in this keystore that you want to distribute?
    In my keystore there is only what can be produced with this:
    keytool -genkey -keystore TECSSDStore.keystore -alias Key1 -keyalg RSA -storepass tttttt -keypass tttttt
    Now, I would have to distribute it if I want to run the applet from appletviewer:
    java -Djavax.net.ssl.trustStore=TECSSDStore.keystore -Djavax.net.ssl.keyStorePassword=tttttt -Djava.security.policy=SecPolicy sun.applet.Main Cte.html
    Which is the key of my problem: I do have a certificate, so I should not need to send the keystore and I should be able to run the applet from the browser. Actually it does run, the problem is in the connection:
    In the client: (from firefox's Java console:)
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at java.io.DataInputStream.readInt(Unknown Source)
         at r.a(Unknown Source)
         at X.actionPerformed(Unknown Source)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 23 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
         at java.security.cert.CertPathBuilder.build(Unknown Source)
         ... 29 more
    In the server:
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
    at java.io.FilterInputStream.read(Unknown Source)
    at Tipos.TString.Read(TString.java:62)
    at saiSrv$ConsultaServidor.run(saiSrv.java:1045)
    Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
    at java.io.DataOutputStream.writeInt(Unknown Source)
    at saiSrv$ConsultaServidor.<init>(saiSrv.java:1030)
    at saiSrv.<init>(saiSrv.java:970)
    at saiSrv.main(saiSrv.java:993)
    OK, thanks for the help, it's midnight in America, (you are in australia aren't you) so I'm going to the bed, can we continue chatting tomorrow?

  • Runtime.getRuntime().exec problems running with applet

    Hi,
    I am running the command
    Process prc = Runtime.getRuntime().exec("net config workstation");
    InputStream in = prc.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    line = br.readLine();
    When running from an application(/stand alone program) on Win-NT it runs fine. But when i include the same code in an Applet and try to run.
    It doesnt return any thing. I see the DOS-prompt open and close and i can also see the required output generated on the DOS prompt, but the program doesnt return any results(null) in the InputStream.
    I even tried to get the ErrorStream incase it is writing some error but it doesnt write anything.
    I tried running some other commands like (cmd.exe /c set) which were able to run on both application as well as from the applet.
    I have tried giving the "net config workstation" command in all flavors
         String[] cmd = new String[3];
         cmd[0] = "cmd.exe";
         cmd[1] = "/C";
         cmd[2] = "net config workstation";     
    And      
         String[] cmd = new String[3];
         cmd[0] = "net.exe";
         cmd[1] = "config";
         cmd[2] = "workstation";          
    AND
         String[] cmd = new String[5];
         cmd[0] = "cmd.exe";
         cmd[1] = "/C";
         cmd[2] = "net.exe";
         cmd[3] = "config";
         cmd[4] = "workstation";     
    AND giing the full path as
    C:\winnt\system32\net.exe config workstation
    But still it doesnt work.
    Can anybody please suggest what is the problem.Its Urgent.....
    Well the purpose of this is to get users system properties like the Logon Domain , server name etc.... or else can anybody suggest a better way to obtain this information.....
    Your reply will be highly appriciated...
    Thanks in Advance......

    Thanks for atleast replying.....
    Sorry, i forgot to mention.... yes OfCourse, i am using an Signed Applet..... That how i was able to run the "set" command.....
    I have made sure it is not sucha simple problem..... the thing is as i have mentioned i know that even "net config workstation" works..... cause i see the output on the DOS prompt,.... but this output is not returned to the Applet in the getInputStream()/getErrorStream().....
    Can anybody please suggest a way to get this output..... OR is there some other way to get the machine's domain, server name etc info from the machine....?????
    Thanks in Advance...!!

  • Simple applet, curious yellow sign...

    This maybe a noob thing that I have run into. I have looked on some of the threads but can't find anything that relates to my specific problem. Below is a simple applet that displays a input message box user puts in name and it displays a greeting nothing fancy just something basic.
    I loaded the .class file on to the freewebs<dot> com server where my site is hosted at and did the applet tag and it runs. The only problem is it displays a yellow glow around the applet box and a yellow information warning. I did the reading on applets from the tutorial and didn't come across anything that mentioned anything like this, maybe I missed it. When I run the applet on the web it doesn't show any error messages or codes just that yellow information warning. How can I fix this.
    import javax.swing.JApplet;
    import javax.swing.JOptionPane;
    public class HelloFromBlahWebsite extends JApplet
              public void start()
                   String sName;
                   sName = JOptionPane.showInputDialog(null,
                   "What is your name?","Welcome to My Page",
                   JOptionPane.QUESTION_MESSAGE);
                   JOptionPane.showMessageDialog(null,
                   "Greetings From Me and welcome to my site,  " + sName + "!", "Greetings",
                   JOptionPane.INFORMATION_MESSAGE);
         }

    0xfeedadeadf15h wrote:
    How can I fix that?You don't. That's pretty much the idea ...
    Or a better question would be how do I get the applet signed so it doesn't show up?... unless of course you sign your applet. To do this you'll need to get a certificate, which costs quite some money.

  • Print from applet, signed jar

    Hi all
    Have a signed applet that runs under IE 6, java 1.5. The applet is basically used for printing purpose.
    My problem is that the applet shows a dialog box "Applet would like to print. Do you want to proceed?"
    How can I get rid of the dialog box?
    I don't want to change the Java file.
    Thanks in advance

    An Applet runs in a sandbox which without proper authentication, will not allow any actions outside the sandbox, i.e. on the local filesystem.
    You cannot print from an unsigned applet.
    The signing process is very simple using Jarsigner and the Java Plugin.
    You can generate your own certificates too, no need to purchase one.

  • Applet Signed JAR Problem

    Hi Members,
    * I am trying to uplaod a file to FTP server using apache API in Applet...
    * I have Signed the JAR(TestApplet.jar) file by the following steps,
    Generated the keytool for my created JAR file by the following command,
    keytool -genkey -alias TestApplet -validity 365
    Signed the JAR file by the following command,
    jarsigner TestApplet.jar TestApplet
    * The following is my HTML code to call my signed JAR file,
    +<HTML>+
    +<HEAD>+
    +</HEAD>+
    +<BODY>+
    +<APPLET ALIGN="CENTER" CODE="AppletExample.class" archive="AppletExample.jar" WIDTH="800" HEIGHT="500"></APPLET>+
    +</BODY>+
    +</HTML>+
    * The below is the my code in applet to upload a file to FTP server,
         public void upload(){
              try {
                   FTPClient client = new FTPClient();
                   FileInputStream fis = null;
                   client.connect("ftp.tnq.co.in");
                   client.login("workflow", "workflow");
                   String filename = "D:/Temp/upload.txt";
                   fis = new FileInputStream(filename);
                   client.storeFile("/home/workflow/TEST/javaupload.txt", fis);
                   client.logout();
                   fis.close();
                   System.out.println("File Uploaded Susccessfully.........");
              } catch (SocketException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }* The File is successfully uploaded to FTP server machine while running it in Eclipse IDE, but not in browser(Mozilla FireFox)
    * When i run it by browser it throws the following exception,
    Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.net.SocketPermission ftp.tnq.co.in resolve)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkConnect(Unknown Source)
         at java.net.InetAddress.getAllByName0(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getAllByName(Unknown Source)
         at java.net.InetAddress.getByName(Unknown Source)
         at java.net.InetSocketAddress.<init>(Unknown Source)
         at org.apache.commons.net.SocketClient.connect(SocketClient.java:176)
         at org.apache.commons.net.SocketClient.connect(SocketClient.java:268)
         at AppletExample.upload(AppletExample.java:88)
         at AppletExample.actionPerformed(AppletExample.java:111)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)* Please let me know, why it is not running in browser....?
    * Thanks in advance
    Regards,
    JavaImran

    * Thanks for your thoughts....
    * As sabre said to me sign external also, so that now i did the following upload program by sun API only(now there is no external API jar file)
    public void upload( String ftpServer, String user, String password,
             String fileName, File source ) throws MalformedURLException,
             IOException
          if (ftpServer != null && fileName != null && source != null)
             StringBuffer sb = new StringBuffer( "ftp://" );
             // check for authentication else assume its anonymous access.
             if (user != null && password != null)
                sb.append( user );
                sb.append( ':' );
                sb.append( password );
                sb.append( '@' );
             sb.append( ftpServer );
             sb.append( '/' );
             sb.append( fileName );
              * type ==> a=ASCII mode, i=image (binary) mode, d= file directory
              * listing
             sb.append( ";type=i" );
             BufferedInputStream bis = null;
             BufferedOutputStream bos = null;
             try
                URL url = new URL( sb.toString() );
                URLConnection urlc = url.openConnection();
                urlc.setDoOutput(true);
                //urlc.setUseCaches(false);
                bos = new BufferedOutputStream( urlc.getOutputStream() );
                bis = new BufferedInputStream( new FileInputStream( source ) );
                int i;
                // read byte by byte until end of stream
                while ((i = bis.read()) != -1)
                   bos.write( i );
             finally
                if (bis != null)
                   try
                      bis.close();
                   catch (IOException ioe)
                      ioe.printStackTrace();
                if (bos != null)
                   try
                      bos.close();
                   catch (IOException ioe)
                      ioe.printStackTrace();
          else
             System.out.println( "Input not available." );
       }* Now also, it is executing well in eclipse, but not in browser both IE and Mozilla2.0
    * I got the following error, when i run it in browser,
    java.net.ProtocolException: cannot write to a URLConnection if doOutput=false - call setDoOutput(true)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
         at sun.net.www.protocol.ftp.FtpURLConnection.getOutputStream(Unknown Source)
         at FileUploadAndDownload.upload(FileUploadAndDownload.java:76)
         at UploadAndDownload.actionPerformed(UploadAndDownload.java:67)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)* The erroe gives me to set setDoOutput(true) as true..., i did like that only in my coding........but throws erroe..... Why that...?
    * Please let me know your suggestions........
    Thanks and Regards,
    JavaImran

Maybe you are looking for