Java Applets with AWT

Hi,
I have the problem to display the applet with AWT. If I am running the same applet in the internal server it works fine.If I am running through the web its giving Class not found exception.That web server also is mapped into the same server.
Here is the code.
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class NotHelloWorldApplet extends Applet
public void init()
     try{
          setLayout(null);
          Label label1= new Label("Hello World!");
          label1.setSize(200,200);
          add(label1);
     }catch(Exception e){System.out.println(e);}
<html><body>
<applet
code="NotHelloWorldApplet"
codebase="."
width=600 height=400
>
</applet>
</body></html>
can anyone help me please.
Thanks

Hello,
Even I executed the program. Its works fine. I guess you must be having problem with the codebase. Just change the address in the codebase from current directory to the address where the class file is there and also change the permissions(set attributes to 755) of the class file. Hope this helps you.
Regards,
Sarada.

Similar Messages

  • How to start java applet with netbeans 6.1

    hey,
    I want to learn how to start java applet (with database) with netbeans.. I'm new to java...can you show me how can i start..if you have any doc about it can you send it to me..thank you..:)

    You really should be asking this NetBeans question at the NB site - these forums are for Java language topics, not NB support.
    [http://www.netbeans.org/kb/61/web/applets.html]
    Almost any NB question you have can be answered by either the NB web documentation or the NB program's Help.

  • Problem Launching Java Applet with Plug-in: Version 1.4.2_01

    Hello out there:
    I recently installed j2re-1.4.2_01 on my home computer but have been unable to access Web sites emmploying JAva applets. The following is an email exchange with Jeff Hall of Lowell Observatory, manager of an educational site hosted by Lowell, trying to resolve my problem. The messages are better understood if read in reverse order.
    I'm hoping that someone will recognize the source of my problem and can recommmend a solution. I would appreciate any help offered.
    Thanks,
    Mike Coucke
    Hi Jeff:
    Well, I guess the problem lies with me somewhere. Here's my answer/status to your questions/suggestions:
    1) I'm using MS Windows Me version 4.90.3000
    2) I do have the directory C:\Windows\.jpi_cache\jar\, but the only thing in it is an empty folder labeled "1.0". The file LP.jar does not exist anywhere on my hard drive.
    3) I tried several game sites that utilized Java applets and got the same results: the Java cup in the upper left corner followed a few seconds later by the red "X". So, evidently the problem is somewhere on my end.
    I'm going to post our email exchanges in a Java Users Forum managed by Sun to see if anyone out there can solve my problem. However, if you have any more suggestions, I'll be glad to try them.
    Thanks for the help.
    Mike Coucke
    [email protected]
    ----- Original Message -----
    From: "Jeffrey Hall" <[email protected]>
    To: "'Mike Coucke'" <[email protected]>
    Sent: Friday, September 05, 2003 1:02 PM
    Subject: RE: Registration with Lowell Education Online
    Mike,
    Rats! What version of Windows are you using? It's a little strange to
    see the user directory set to C:\Windows; if you're using XP, I'd expect
    it to be something like C:\Documents and Settings\Mike Coucke. In any
    event, the output that is of concern is these two lines:
    java.lang.ClassNotFoundException: LPRemote.class
    Caused by: java.net.UnknownHostException: proxy
    It looks like your browser is not finding our server's IP when it comes
    time to download the necessary Java code.
    LPRemote.class is the fundamental code that runs LOPARC, and your
    browser should be downloading it automatically when you click connect.
    LPRemote.class is stored along with a bunch of other classes in a file
    called "LP.jar" that you download from our server. So, if you go to C:
    in Windows Explorer and do a file search for LP.jar, you should find it.
    On my machine, it's stored in a directory called ".jpi_cache\jar\" in my
    user home directory. Let me know if you have this file, or the
    jpi-cache directory.
    One other thing you might try is going to a different site that you know
    uses Java applets -- I think some of the online game rooms at Yahoo use
    Java. See if other sites that use Java load correctly. Then we'll know
    if it's our server specifically, or a more general problem on your end.
    Jeff Hall
    Lowell Observatory
    Hello Jeff:
    I still have the Java "blues". I followed your instructions, but am still unable to launch a LOPARC session. After an initial failure, I uninstalled all three Java versions I had (1.4.0, 1.4.1, 1.4.2), then reinstalled 1.4.2_01 from the Sun website.
    Now, when I try to launch LOPARC, I initially get a blank window with the Java cup in the upper left corner. After about 20 seconds, the cup changes to a red "X". During those 20 seconds, the following appear in the IE message bar at the bottom of the window: "Applet LPRemote notinited" (their spelling) which changes to "Loading Java Applet Failed..." when the red "X" appears.
    Following is a copy of the log from my Java Console during all of this:
    Java(TM) Plug-in: Version 1.4.2_01
    Using JRE version 1.4.2_01 Java HotSpot(TM) Client VM
    User home directory = C:\WINDOWS
    Proxy Configuration: Manual Configuration
    Proxy: http=proxy,https=proxy,ftp=proxy,gopher=proxy
    Proxy Overrides:
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class LPRemote.class not found.
    java.lang.ClassNotFoundException: LPRemote.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    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)
    Caused by: java.net.UnknownHostException: proxy
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.plugin.net.protocol.http.HttpClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.http.HttpClient.privilegedOpenServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
    at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.createConnection(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.applet.AppletClassLoader.getBytes(Unknown Source)
    at sun.applet.AppletClassLoader.access$100(Unknown Source)
    at sun.applet.AppletClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 10 more
    I followed this up by executing the following three console commands:
    "dump system properties"
    "dump classholder list"
    "dump thread list"
    and obtained the following listings:
    Dump system properties ...
    acl.read = +
    acl.read.default =
    acl.write = +
    acl.write.default =
    application.home = C:\PROGRA~1\JAVA\J2RE14~1.2_0
    awt.toolkit = sun.awt.windows.WToolkit
    browser = sun.plugin
    browser.vendor = Sun Microsystems, Inc.
    browser.version = 1.1
    deployment.javaws.cache.dir = C:\WINDOWS\.javaws\cache
    deployment.javaws.jre.0.enabled = true
    deployment.javaws.jre.0.location = http://java.sun.com/products/autodl/j2se
    deployment.javaws.jre.0.osarch = x86
    deployment.javaws.jre.0.osname = Windows
    deployment.javaws.jre.0.path = C:\Program Files\Java\j2re1.4.2_01\bin\javaw.exe
    deployment.javaws.jre.0.platform = 1.4
    deployment.javaws.jre.0.product = 1.4.2_01
    deployment.javaws.jre.0.registered = true
    deployment.javaws.version = javaws-1.4.2_01
    deployment.system.cacerts = C:\PROGRA~1\JAVA\J2RE14~1.2_0\lib\security\cacerts
    deployment.system.home = C:\WINDOWS\Sun\Java\Deployment
    deployment.system.jssecacerts = C:\PROGRA~1\JAVA\J2RE14~1.2_0\lib\security\cacerts
    deployment.system.profile = C:\WINDOWS
    deployment.system.security.policy = file:/C:/WINDOWS/Sun/Java/Deployment/security/java.policy
    deployment.user.cachedir = C:\WINDOWS\Application Data\Sun\Java\Deployment\cache
    deployment.user.certs = C:\WINDOWS\Application Data\Sun\Java\Deployment\security\deployment.certs
    deployment.user.extdir = C:\WINDOWS\Application Data\Sun\Java\Deployment\ext
    deployment.user.home = C:\WINDOWS\Application Data\Sun\Java\Deployment
    deployment.user.jssecerts = C:\WINDOWS\Application Data\Sun\Java\Deployment\security\deployment.jssecerts
    deployment.user.logdir = C:\WINDOWS\Application Data\Sun\Java\Deployment\log
    deployment.user.profile = C:\WINDOWS\Application Data
    deployment.user.security.policy = file:/C:/WINDOWS/Application%20Data/Sun/Java/Deployment/security/java.policy
    deployment.user.tmpdir = C:\WINDOWS\Application Data\Sun\Java\Deployment\cache\tmp
    file.encoding = Cp1252
    file.encoding.pkg = sun.io
    file.separator = \
    file.separator.applet = true
    http.agent = Mozilla/4.0 (Windows Me 4.90)
    http.auth.serializeRequests = true
    https.protocols = SSLv3,SSLv2Hello
    java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob = sun.awt.windows.WPrinterJob
    java.class.path = C:\PROGRA~1\JAVA\J2RE14~1.2_0\classes
    java.class.version = 48.0
    java.class.version.applet = true
    java.endorsed.dirs = C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\endorsed
    java.ext.dirs = C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\ext
    java.home = C:\PROGRA~1\JAVA\J2RE14~1.2_0
    java.io.tmpdir = C:\WINDOWS\TEMP\
    java.library.path = D:\PROGRAM FILES\INTERNET EXPLORER 6;.;C:\WINDOWS\SYSTEM;C:\WINDOWS;D:\PROGRA~1\INTERN~1;;C:\WINDOWS;C:\WINDOWS\COMMAND
    java.protocol.handler.pkgs = sun.plugin.net.protocol|sun.plugin.net.protocol
    java.runtime.name = Java(TM) 2 Runtime Environment, Standard Edition
    java.runtime.version = 1.4.2_01-b06
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Sun Microsystems Inc.
    java.specification.version = 1.4
    java.util.prefs.PreferencesFactory = java.util.prefs.WindowsPreferencesFactory
    java.vendor = Sun Microsystems Inc.
    java.vendor.applet = true
    java.vendor.url = http://java.sun.com/
    java.vendor.url.applet = true
    java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
    java.version = 1.4.2_01
    java.version.applet = true
    java.vm.info = mixed mode
    java.vm.name = Java HotSpot(TM) Client VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Sun Microsystems Inc.
    java.vm.specification.version = 1.0
    java.vm.vendor = Sun Microsystems Inc.
    java.vm.version = 1.4.2_01-b06
    javaplugin.maxHeapSize = 96m
    javaplugin.nodotversion = 142_01
    javaplugin.proxy.config.list = http=proxy,https=proxy,ftp=proxy,gopher=proxy
    javaplugin.proxy.config.type = manual
    javaplugin.version = 1.4.2_01
    javaplugin.vm.options = -Djava.class.path=C:\PROGRA~1\JAVA\J2RE14~1.2_0\classes -Xbootclasspath/a:C:\PROGRA~1\JAVA\J2RE14~1.2_0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.4.2_01 -Djavaplugin.nodotversion=142_01 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\JAVA\J2RE14~1.2_0 -Djava.protocol.handler.pkgs=sun.plugin.net.protocol
    line.separator = \r\n
    line.separator.applet = true
    os.arch = x86
    os.arch.applet = true
    os.name = Windows Me
    os.name.applet = true
    os.version = 4.90
    os.version.applet = true
    package.restrict.access.netscape = false
    package.restrict.access.sun = true
    package.restrict.definition.java = true
    package.restrict.definition.netscape = true
    package.restrict.definition.sun = true
    path.separator = ;
    path.separator.applet = true
    sun.arch.data.model = 32
    sun.boot.class.path = C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\rt.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\i18n.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\sunrsasign.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\jsse.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\jce.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\charsets.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\classes;C:\PROGRA~1\JAVA\J2RE14~1.2_0\lib\plugin.jar
    sun.boot.library.path = C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\bin
    sun.cpu.endian = little
    sun.cpu.isalist = pentium i486 i386
    sun.io.unicode.encoding = UnicodeLittle
    sun.java2d.fontpath =
    sun.net.client.defaultConnectTimeout = 120000
    sun.os.patch.level =
    trustProxy = true
    user.country = US
    user.dir = C:\WINDOWS\Desktop
    user.home = C:\WINDOWS
    user.language = en
    user.name = Michael G. Coucke
    user.timezone =
    user.variant =
    Done.
    Dump classloader list ...
    codebase=http://kraken.lowell.edu/, key=http://kraken.lowell.edu/,IONJava/classes/ion_16.jar,IONJava/classes/LP.jar, zombie=false, cache=true, refcount=1, info=sun.plugin.ClassLoaderInfo@109de5b
    Done.
    Dump thread list ...
    Group main,ac=11,agc=2,pri=10
    main,5,alive
    AWT-Windows,6,alive,dameon
    AWT-Shutdown,5,alive
    Java2D Disposer,10,alive,dameon
    AWT-EventQueue-0,6,alive
    Group Plugin Thread Group,ac=3,agc=0,pri=10
    Main Console Writer,6,alive
    AWT-EventQueue-1,6,alive
    TimerQueue,5,alive,dameon
    Group http://kraken.lowell.edu/-threadGroup,ac=2,agc=0,pri=4
    thread applet-LPRemote.class,4,alive
    AWT-EventQueue-2,4,alive
    Done.
    I'm not a Java expert, so this may be more information than you ever wanted to see.
    Once again, I hope that you can help. My experience has been that I usually have some obscure option set incorrectly and that causes me great grief.
    Thanks fo your help,
    Mike Coucke
    [email protected]
    ----- Original Message -----
    From: "Jeffrey Hall" <[email protected]>
    To: "'Mike Coucke'" <[email protected]>
    Sent: Thursday, September 04, 2003 11:48 AM
    Subject: RE: Registration with Lowell Education Online
    Hi Mike,
    Try it now. I think this problem has arisen because Sun just
    released a new version of the Plug-in (1.4.2), and when we released the
    public beta of LOPARC, only one relevant version (1.4.0) was available
    and the LOPARC code was written to look for that by default. I have
    just recoded the relevant routines so they should now cause your browser
    to simply pick up the latest 1.4 version of the Plug-in you have
    installed, whatever it is. I "broke" Java on my machine to replicate
    your problem, and the code I inserted today did fix it. Hopefully it
    will have the same effect for you. I am running IE 6 and plugin
    1.4.2_01 (as accessed via Tools->Sun Java Console).
    One broader problem: some (non-LOPARC-specific) users on the Sun
    forums have reported the "JRE collision" you are seeing when multiple
    versions of the Plug-in are installed on the same machine. So if the
    fix I made to our code doesn't work, one option would be to uninstall
    all Java components from your computer and do a fresh install of the
    latest runtime environment.
    Let me know how/if this works. Thanks for the feedback and for your
    patience.
    Best regards,
    Jeff Hall
    Lowell Observatory
    -----Original Message-----
    From: Mike Coucke [mailto:[email protected]]
    Sent: Wednesday, September 03, 2003 6:30 PM
    To: [email protected]
    Subject: Re: Registration with Lowell Education Online
    Hello Jeff:
    So far, I have been unable to launch a LOPARC session. I repeatedly
    get the following error message:
    "Exception: java.lang.ClassNotFoundException: LPRemote.class"
    My browser is MS Internet Explorer version 6.0.2800.1106 Initially I was
    using Java Plug-In version 1.4.1 and received the error message. I went
    to the Sun website and downloaded/installed Java Plug-In version 1.4.2
    and still get the message.
    Before I try to launch LOPARC, I can select Tools->Sun Java Console from
    IE's pull down menu to check my Java Plug-In version. When I try to
    launch LOPARC, I get the following message:
    "Applet(s) in this HTML page requires a version of Java different from
    the one the browser is currently using. In order to run the applet(s)
    in this HTML page, a new browser session is required, press 'Yes' to
    start a new browser session." If I select 'No', I get the following
    message: "Java Plug-in detected JRE collission"
    If I select 'Yes', a new browser window opens and then I get the first
    message above.
    Can you help?
    Mike Coucke
    [email protected]
    ----- Original Message -----
    From: <[email protected]>
    To: <[email protected]>
    Sent: Monday, September 01, 2003 5:30 PM
    Subject: Registration with Lowell Education Online
    September 1, 2003
    Dear Michael Coucke:
    Thank you for registering with Lowell Observatory's online education
    site. We hope you enjoy using it and visit regularly as we continue to
    expand its features and capabilities. This is a one-time welcoming
    email.
    For your records, your user ID is xxxxx, and your password is #########.
    You'll need to supply these each time you log in.
    This site gives you access to research-grade equipment including a 16"
    telescope, CCD detector, and image processing software. Our online
    archive of data is now available 24/7. The telescope will be opening to
    our onsite users in May, and on select nights to the Internet at large
    in June.
    We have designed this site so you don't need a huge monitor or a
    supercomputer to use it. All pages are viewable on screens running at
    800x600 resolution or higher. To use LOPARC, you'll need a Java-enabled
    browser with the Java 1.4 plug-in installed. If you don't have the
    plug-in, you'll be prompted to download it the first time you attempt to
    connect. This is an admittedly large (9 MB) but one-time-only download.
    This site works correctly under Internet Explorer version 5 or higher.
    If you use Netscape, you must be running version 6 or higher, and
    display or applet behavior anomalies may occur.
    If at any time you can't connect to our server, simply try again later.
    We do experience several power outages each year, particularly during
    Flagstaff's summer thunderstorm season. Our server is fully protected
    and backed up, and can be quickly brought back on line, but any active
    user sessions will be lost. Thanks for your patience during these
    inevitable downtimes.
    Your questions, comments, suggestions, and bug reports about this site
    are always welcome. On behalf of the LOPARC development team, thanks
    for signing up!
    Jeffrey Hall
    Assistant Research Scientist
    Associate Director, Education and Special Programs
    Lowell Observatory
    Flagstaff, Arizona

    Hi Mike,
    I see this in your logs:
    Java(TM) Plug-in: Version 1.4.2_01
    Using JRE version 1.4.2_01 Java HotSpot(TM) Client VM
    User home directory = C:\WINDOWS
    Proxy Configuration: Manual Configuration
    Proxy: http=proxy,https=proxy,ftp=proxy,gopher=proxy
    Proxy Overrides:
    I just helped my Dad set up his computer with a new
    cable modem, and had the situation where we couldn't
    access any secure Web sites. The cable folks had us
    disable the proxy. It looks like the error message is
    saying it can't find your proxy server, and the logs
    you posted say that you've decided to configure your
    proxy manually, rather than using the settings from
    IE (which is how mine is set up in the plugin
    control panel.)
    Could that be the problem?
    --Steve                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Firefox allows Java Applet with elevated permissions

    I ended up with a virus on Friday when I selected "View" on an HTML attachment from the GMail web interface. The attachment started up java and proceeded to install the malware "Desktop Security 2010" and make changes to my system startup. I'm wondering how this happened and how to prevent it. My java security settings (Java Control Panel->Security->Certificates->Trusted Certificates) only lists Akamai Technologies and JavaFX as trusted certificates. Shouldn't that mean that I get prompted if any one else signs an applet that tries to run outside the sandbox? What else do I need to do to make sure that NO java applets run with elevated permissions?
    I've disabled java via an add-in in the meantime, but what do I need to do to secure my browser properly?
    == This happened ==
    Just once or twice
    == I selected "view" on a virus-infected email attachment in gmail

    Хорошо. Am now able to enter Cyrillic font into my applet. HOWEVER, another issue remains: After pressing enter to process input, new window opens as expected with correct information displaying in window EXCEPT for drop-down menu bar that should display in green square of open window. http://www.lesbaileyev.com/Project/RFvstem.html I will open another suport question for this new development.

  • Java Applet with Socket

    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.*;
    public class Simple extends Applet {
         TextArea text;
         Socket _socket;
         public void init(){
              setLayout(null);
              text = new TextArea("", 10, 10, TextArea.SCROLLBARS_VERTICAL_ONLY);
              text.setBounds(10, 10, 350, 300);
              text.setEditable(false);
              add(text);
              try {
                   _socket =  new Socket("de.quakenet.org", 6667);
              }catch(Exception e) { output(e.getMessage()); };                              
         public void output(String s) {
              text.append(s);
         public void paint(Graphics g) {
    It throws following exception:
    access denied (java.net.SocketPermission de.quakenet.org resolve)
    I've read, that Applet can only connect localy. But for example jIRC works also http://www.jpilot.com/java/irc/demo.html ...
    How can I manage that?

    You get a java signing cert (like from Verysign) - when you sign the applet according to their instructions, it allows the end user to specify if your applet has rights or not, if they say yes, you would have the ability to connect to other servers.
    If you want to avoid this problem, make your program an application instead of an applet.

  • Starting an Java-Applet with https

    Is it possible to start a java-applet
    from a secure web-page?
    https://..../applet.html
    If yes - HOW?
    null

    My code looks something like this
    StringBuffer queryString = new StringBuffer(Applet.getCodeBase().toString());
    // append all the variables I need here
    URL dataUrl = new URL(queryString.toString());
    BufferedReader br = new BufferedReader(new InputStreamReader(dataUrl.openStream()));This works from both http and https The protocol is the same as the how the page itself was loaded.

  • Java Applets with AS

    I am developing a web-based application using JDeveloper.
    when i test the application in JDeveloper it goes OK.. but when testing it in Internet Explorer it can't connect to the oracleDB. should i use Oracle Application Server to make it work ok or What?!
    and if i need an Application Server.. How could i use it..
    Thanx
    Fahd Hamad

    java applications.
    at last you can launch your applet by appletviewer.exe
    The ONLY purose of applets is to launch it by browser to make this techlology looks like a "web".
    Now browsers have no embedded JVM or have outdated JVM (so, "applet" techlology is dead) and you must install proprietary JVMs like Oracle JInitiator.
    It much more simple to install a standard JRE in all clients and make just a shortcut to your application.
    I think, all computers will have JRE or JDK installed by default.
    If you need to use Oracle Forms and JInitiator - it is a proprietary technology and you can ask Oracle support.

  • Safari for Mac, webpage with Java applet, drag and drop area not working.

    At my company, we have a web page that our users access to submit media files, (QuickTime, Audio, images...), for transcoding for delivery.  The web page consists of a java applet, with an area that our users drag and drop media file into.
    After updating to Safari 5.1.2, the applet will not work anymore. Instead, the browser will "open" the quicktime and play it, instead of allowing the Java Applet to do it's job.
    CAN I TURN THIS FUNCTIONALITY OFF??
    I read that Safari 5.1.2, (when it was initially released), broke something with the THEN current version of Java, and everyone was awaiting the latest update (build 1.6.0_29) to fix it. Unfortunately, this update did not fix my issue with the functionality of dragging and dropping media files into the web page.
    It seems to me, as if, there is an over-arching functionality setting (or something) that needs to be either turned off, or in some other way DE-prioritized.
    Anyone have any ideas?
    Safari 5.1.2
    MacOS 10.6.8
    MacBook Pro

    Thanks for quick reply and help. I am able to drag multiple files but this is giving problem in case of filename with spaces like "abc def.png". Can you please put some thoughts on this.
    DataFlavor uriListFlavor = new DataFlavor("text/uri-list;class=java.lang.String");
                   Reader in = (Reader)t.getTransferData(DataFlavor.plainTextFlavor);
                   BufferedReader br = new BufferedReader(in);
                   String uriStr;
                   while ((uriStr = br.readLine()) != null)
                       URL url = new URL(uriStr);
                       String category = GalleryUtils.contentsPanel.getCurrentCategoryPath();
                       GalleryUtils.generateILPFromFile(new File(url.getFile()), category);
                   }Thanks
    Kanni

  • Using external libraries over signed Java applet: InvocationTargetException when running locally with 7u51

    We have a signed Java applet that uses external libraries, specifically the OpenOffice application libraries.
    We have a problem running Java applet with 7u51 of "InvocationTargetException" when use these libraries OpenOffice, that is not signed; regardless of the browser used (Mozilla Firefox, Explorer, Chrome).
    Please, as you could solve this problem?   This problem can not arose with 7u40 and earlier..
    Best regards.

    In  java - JRE 1.7.0_51-b13 and signed applet - Stack Overflow found solution. I've missed to add in external jars manifest this: 
    Trusted-Library: true

  • Java Applets in Safari

    I'm trying to run a Java applet with safari, but everytime I go to the webpage all I get is a grey box with a picture of a coffee cup that has two arrows circling it. Nothing loads after that. Any idea how to fix this?

    Hi ad1054,
    Are you sure you have java 1.6 and if so, how did you get it? I believe the latest version available from apple is 1.5.0_06. Java 1.6 was only just released by Sun, and, if I'm not mistaken, only for PC and Linux. Apple may be waiting to force people to pay for Leopard to get Java 1.6. (Though you can get a beta version from developer.apple.com.) As Hawaiian_Starman mentioned above, you can check your java version.
    That said, you don't have to worry about lower versions of Java because Java is backwards compatible. In fact, if you use Firefox (sorry, but I just checked it in Safari, and got a blank page so I guess Safari, like IE, doesn't support this) and go to "about:plugins" you will see something like
    <pre>
    Java Embedding Plugin 0.9.5g2
    File name: MRJPlugin.plugin
    Runs Java applets using the latest installed versions of Java. For more information: Java Embedding Plugin. Run version test: Test Your JVM.
    MIME Type Description Suffixes Enabled
    application/x-java-vm Embedded JVM xjv Yes
    application/x-java-applet Embedded Java Applet xja Yes
    application/x-java-applet;version=1.1 Embedded Java Applet xja11 Yes
    application/x-java-applet;version=1.1.1 Embedded Java Applet xja111 Yes
    application/x-java-applet;version=1.1.2 Embedded Java Applet xja112 Yes
    application/x-java-applet;version=1.1.3 Embedded Java Applet xja113 Yes
    application/x-java-applet;version=1.2 Embedded Java Applet xja12 Yes
    application/x-java-applet;version=1.2.1 Embedded Java Applet xja121 Yes
    application/x-java-applet;version=1.2.2 Embedded Java Applet xja122 Yes
    application/x-java-applet;version=1.3 Embedded Java Applet xja13 Yes
    application/x-java-applet;version=1.3.1 Embedded Java Applet xja131 Yes
    application/x-java-applet;version=1.4 Embedded Java Applet xja14 Yes
    application/x-java-applet;version=1.4.1 Embedded Java Applet xja141 Yes
    application/x-java-applet;version=1.4.2 Embedded Java Applet xja142 Yes
    application/x-java-applet;version=1.5 Embedded Java Applet xja15 Yes
    </pre>
    You can see from this list that all versions up to and including the currently installed one are supported. The only thing you have to fear is that the applet you are trying to use was compiled with Java 1.6 and is not itself backwards compatible. However, when I made a test applet of this type, I got a red X, and no coffee cup.
    If you see the red X, and I think the coffee cup as well, you should be able to right-click (or ctrl-click) the icon. If so, this will give you a menu with "console" and "about" choices. "About" will give you the version of Java you have, and "console" is supposed to show you the errors that kept the applet from working. (However, with my Java 1.6 test, the console was empty.)
    I hope this helps.
    1.5GB, 2.16 GHz Core Duo, 15.4" Macbook Pro   Mac OS X (10.4.8)  

  • Html form - java applet

    Hi friends
    I have an html form with an editable textfield on it. Next to it is an Java Applet with an Button on it. If you klick the button, a Popup aperars where the textfield can be modified. There is also an OK Button on this Popup. If you klick the Button, I want that the value of my string will be plased into the html form.
    If anyone knows how that works. Please help me.
    thanks kendiman

    Sweet, I was wondering how to do that.
    So if one was to design a menu using java, the external Java Script can access the public variables within the applets?
    So if we had
    public class applet extends Applet {
       public int test;
       public applet() {
          test = 6;
    }then the javascript command
    document.applet.test
    would return a 6?
    Do I have this correctly?
    Dale M

  • Java Applet (Masking/Scrollbar)

    hi ppl out there.. i've some difficulties in my project.. can u all help me?
    i need to create a java applet, with a scrollbar.. <-- this i know..
    but how to create a image overlapping an image? what i mean here is that i have a image (A) appearing now.. i need to have another image(B) to be on top of it.. den when i click/drag the scrollbar, the image(B) will move alittle, showing abit of image(A).. it is like masking type.. can some kind soul share with me the source code??

    i need to create a java applet, with a scrollbar.. <-- this i know..Why not use a JSlider?
    i have a image (A) appearing now.. i need to have another image(B) to be on top of it.. You can add a JPanel to your JApplet's content pane. You'll need to create your own class that extends JPanel. By creating your own class, you can override the paintComponent() method, which is where drawing on a component takes place. paintComponent() is called automatically when the component is first displayed, and when you call repaint() on the component. You can create the JPanel and add it to your JApplet inside init().
    Inside paintComponent(), you can draw the second image on top of the first image doing this:
    public void paintComponent(Graphics g)
         super.paintComponent(g);
         g.drawImage(img1, 0, 0, this); //first image
         g.drawImage(img2, 0, 0, this); //second image
    }img1 and img2 must be objects of type Image. In a JApplet, you can create Image objects from a file name like this:
    URL pic1 = new URL(getCodeBase(), "yourPic.jpg"); //.jpg file is in same directory as applet's .class file
    Image img1 = getImage(pic1);
    but how to create a image overlapping an image?If you want to move the second image over 10 pixels so that the two images are overlapping, you can do this:
    g.drawImage(img2, 10, 0, this); //x coordinate was changed from 0 to 10
    den when i click/drag the scrollbar, the image(B) will move alittle, showing abit of image(A)..You can also add a JSlider to your JApplet. A JSlider will fire a ChangeEvent event when it is moved. You can register your JPanel to listen for that event. Once your JPanel is registered for that event, the JSlider will call a stateChanged() method inside your JPanel class, which you can define to perform the tasks you want.
    If you add a member variable to your JPanel class, like
    int img2x;  //x coordinate of 2nd imageYou can read that value inside the JPanel's paintComponent() method:
    g.drawImage(img2, img2x, 0, this); //x coordinate was changed from 0 to 10If you set img2x to 0 in the JPanel's constructor, then when your JPanel is first displayed, the second image will be on top of the first image. When the user moves the slider, the stateChanged() method that you define in your JPanel class will be called. Inside stateChanged(), you can get the value of the slider; and then set img2x to that value; and then call repaint() on your JPanel. Calling repaint() on your JPanel will cause paintComponent() to be called, which will read the new value for img2x, which will cause the second image to move to the new coordinates and reveal part of the first image.
    See here for more information on how to use a JSlider:
    http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html

  • Java applet loads too slow.

    I was wondering if there is anyway to remedy this situation:
    I am using TextPad to write my java code/html code. when i send my HTML code to Internet Explorer to view my applet, it takes several seconds to load. Even while looking at other java applets, it takes a while. Is there anything I can do to speed that up?
    dm0ca

    Yeah....thats not much help.
    I have a slower comp that can run java applets with no lag.
    Anyone else have a solution?
    dm0ca

  • Starting a Java applet???

    I want to start a Java applet with this one JAR file I have. What is the code I need to put into the HTML to initiate the applet. I have this so far, but I don't know the class required:
    <applet code = "whatclassdoineedhere.class"
         archive = "file.jar"
    width=256 height=256>
    </applet>
    I am wondering what class I need to get it running. I'm completely new to Java, and am just experimenting with some things.

    Let me know if it doesn't work, by the way, I suggest you to use the Object Tag like this, it makes the user behind the internet terminal, know if it has the Java Plug-in; if not, it tries to install it, like when using flash.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
        <HEAD>
            <TITLE>MyAppletSigned</TITLE>
        </HEAD>
        <BODY topmargin='0' leftmargin='0' rightmargin='0' bottommargin='0' BGCOLOR='black'>
            <OBJECT classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93'
                    codebase='http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0'
                    width='100%'
                    height='95%'>
                <PARAM name='code' value='MyApplet.class'>
                <PARAM name='codebase' value=''>
                <PARAM name='archive' value='MyJar.jar'>
                <PARAM name='type' value='application/x-java-applet;version=1.4'>
                <PARAM name='scriptable' value='false'>
                <COMMENT>
                    <EMBED type='application/x-java-applet;jpi-version=1.4'
                           width='100%'
                           height='95%'
                           code='MyApplet.class'
                           codebase=''
                           archive='MyJar.jar'
                           scriptable='false'
                           pluginspage='http://java.sun.com/j2se/1.4/index.html'>
                        <NOEMBED>
                        </NOEMBED>
                    </EMBED>
                </COMMENT>
                <P>
             You don't have Java 2 SDK, Standard Edition v 1.4
            </OBJECT>
        </BODY>
    </HTML>

  • Error:This page contains content of "application/x-java-applet" type. You do not have the plug-in required to view this content.

    Hi....i m using Mac OS x 10.5.8 with safari Version 5.0.2 (5533.18.5). I just updated the Java version to Java 6 and now m getting below error:
    This page contains content of “application/x-java-applet” type. You do not have the plug-in required to view this content.
    Please help me out on this....

    I am also having a problem with this. My website is hosted through "www.onlinepictureproof.com" and now that my laptop is back from repair with OS X 10.6.8 I am unable to upload my photos to my work website. It says "a plug-in is needed to display this content. Install plug-in" and then a window pops up that says "no suitable plug-ins were found".  Below that is "unknown plug-in (application/x-java-applet)" with a link to "manual install" which takes me to "http://www.oracle.com/technetwork/java/index-jsp-141438.html#download" which just leaves me lost. I've tried downloading the "JRE" but I have zero idea what that means or if Im downloading the proper thing. Once I click on the "download JRE" it brings me to a download page where there are WAY too many items for me to choose from to download, when I have no idea what I need or why I need it. please help, this is driving me insane. I actually preferred my constantly crashing laptop to the state its in now, "like brand new" back from apple repair...I have already updated everything that is promted through "Software Updates".
    "OnlinePictureProof.com" only directs me to apple support.
    Thank you for any help you can offer!
    Sheila

Maybe you are looking for

  • My iPhone 5c wont let me put a passcode lock.

    I looked  under my general setting and their isnt a button to click to add a passcode by the auto lock and restriction. It also wont connect to apple itunes when i plug my phone into my computer. It wont show up under device.

  • How can i remove my three associated email address

    how can i remove my three associated email address

  • Trackpad problem on macbook pro

    I have been having trackpad problems on my macbook pro (bought in 2010) for the past couple of days. Not only does it move erratically by itself, but the left click does not respond as it should. Whenever I use the left click, it works as a right cli

  • Open mutiple PDF report outputs with one button click

    I need to open multiple PDF outputs depending on check boxes on the front end (Asp.net C#) app connecting to Crystal report server XI. Here is my code. I'm able to open only one PDF not multiple. If I use Response.end() at the end except first nothin

  • BCV Bubble chart

    hi, i configured the bubble chart(in a review) to have Prob. of Comm. success on X-axis and Risk Assessed on Y- Axis.  Also the same parameters are mentioned against Series and Size as well(Prob.Comm. Success on Series and Risk assessed on Size).  No