LookAndFeel in Applets

Hi,
we are writing an applet. To set the applets LookAndFeel we implemented the following code:
static {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
catch (Exception e) {
If we use this applet in a browser on Windows, the applets LookAndFeel is switched to the Windows-LookAndFeel. Perfect.
But...
If we use the browsers Back-Button and then the Forward-Button, the LookAndFeel will switch to Metal???
What's going wrong ?
Is there a way to change the above code to make this work ?
Thanks for help

only things that works:
putting this in the start() method
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(this);
} catch (Exception e) {
e.printStackTrace();
}

Similar Messages

  • How to change  "window LookAndFeel" of applet?

    hi~~
    I have changed the LookAndFeel of Applet with following code:
    try{
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    SwingUtilities.updateComponentTreeUI(frame);
    catch(Exception e){}
    ,but WindowsLookAndFeel seem not to be shown when it run on IE.
    why no any change?

    I assume this is a windows box, and that you've tested that that look and feel exists already.
    My guess would then be that Windows has an option, somewhere, that tells windows not to
    use the LAF. It's labeled as "Do not decorate buttons", or something equally odd. Unfortunately,
    I have no idea whatsoever where the option is.

  • LookAndFeel in Applet

    How do i set the LookAndFeel in an Applet?
    i know that for an app i do UIManager.setLookAndFeel(); but ive no idea how to do it for applet
    Thank you
    Ivo

    It's the same thing as it would be in an application. Of course, you must mean JApplet. Here's a simple example:
    import javax.swing.*;
    public class MyApplet extends JApplet
        public void init()
            try
                UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
            } catch(Exception e) {}
            JButton button = new JButton("Hello");
            getContentPane().add(button);
    }

  • LookAndFeel issue reloading an Applet in a Web page

    Hey all,
    I have an Applet that runs on a web page (loaded by servlets and JSP's using Tomcat 3.2.1 and Apache). I created my own LookAndFeel class and have a static function in the applet that sets the LookAndFeel to my new class. Everything works fine when the Applet is first loaded. However, when you exit the applet and then reload it, the custom LookAndFeel is gone and all I get is the default Metal. If I load the applet with appletviewer, I can reload it as much as I want and it always loads my LookAndFeel class.
    The static function is as follows
    /** Static initializer to set the LookAndFeel
    static {
    try {
    UIManager.setLookAndFeel(new MyNewLookAndFeel());
    catch (Exception e) {}
    I do not get any exceptions and like I said, everything works great when loaded with appletviewer.
    I have tried adding the SwingUtilities.updateComponentTreeUI(this); in either the start(), init(), or my own createGUI() function and it still does not work.
    Any ideas? Could this be a problem with the browser caching the applet? I am using IE 5.50.

    I have the same problem
    putting them in static doesn't keep the look and feel
    putting them in the applet constructor does'nt keep it
    putting them in init() doesn't keep it
    putting them in start() doesn't keep it
    heck, even putting them in all 4 of them together doesn't keep the look and feel, it always reverts back to metal

  • Applet not opening a socket on its own host. Please help.

    I have also posted this in JSC2 forum.
    My applet is not able to open a socket on its own host.
    The applet is being served by a JSP (developed using Sun Creator2) from my laptop behind a DHCP broadband router at (say) 125.238.104.132 at my residence. I have a URL �samsub.no-ip.biz� that redirects port 80 calls to 29080 where my application runs. All required router rules/mapping are done and the JSPs run perfectly fine. In one of the pages, I have inserted an applet inside an escape disabled statictext field as follows:
    <applet code="AppClient.class" width=540 height=440></applet>
    The applet code and the test server code are shown below for your analysis. Note that, when run on the same machine (at home), the applet works fine. The commented lines will show other failed test. The error reported at the java console was: null pointer at line 56
    Could someone help me please. Thanx. MarySam
    The applet code
    1     import java.util.*;          
    2     import java.awt.*;          
    3     import java.applet.*;          
    4     import java.text.*;          
    5     import javax.swing.*;          
    6     import com.sun.java.swing.plaf.windows.*;          
    7     import java.awt.event.*;          
    8     import java.net.*;          
    9               
    10     public class AppClient extends Applet {          
    11     JInternalFrame jif;          
    12     JTextArea jta1, jta2;          
    13     Socket kkSocket = null;          
    14               
    15     public void init() {          
    16          try {     
    17               LookAndFeel lf = new WindowsLookAndFeel();
    18               UIManager.setLookAndFeel(lf);
    19          kkSocket = new Socket("125.238.104.132", 4444);
              //kkSocket = new Socket("samsub.no-ip.biz", 4444);
              //kkSocket = new Socket("125.238.104.132:29080", 4444);
              //kkSocket = new Socket("samsub.no-ip.biz:29080", 4444);
    20          }      catch(Exception e) {}
    21               
    22          setLayout(null);      
    23          setBackground(Color.black);     
    24          jif = new JInternalFrame();     
    25          jif.setLocation(20,20);     
    26          jif.setSize(500,400);     
    27          Container con1 = jif.getContentPane();     
    28          con1.setLayout(null);     
    29               
    30          jta1 = new JTextArea();      
    31          JScrollPane jcp1 = new JScrollPane(jta1);     
    32          jcp1.setBounds(10,10,410,100);     
    33          con1.add(jcp1);     
    34               
    35          jta2 = new JTextArea();     
    36          JScrollPane jcp2 = new JScrollPane(jta2);     
    37          jcp2.setBounds(10,115,470,245);     
    38          con1.add(jcp2);      
    39               
    40          JButton jb = new JButton("Go");     
    41          jb.setBounds(425,10,60,30);     
    42          jb.addActionListener(this);     
    43          con1.add(jb);      
    44               
    45          JLabel jlb = new JLabel();     
    46          jlb.setOpaque(true);     
    47          jlb.setBackground(Color.gray);     
    48          jlb.setForeground(Color.white);      
    49          jlb.setBounds(425,50,60,30);     
    50          con1.add(jlb);      
    51               
    52               
    53          jif.setVisible(true);     
    54          add(jif);      
    55          //jta2.setText(getCodeBase().toString());     
    56          jta2.setText(kkSocket.getInetAddress().toString());     
    57               
    58     }          
    59               
    60     public void start() {}          
    61               
    62     public void stop() {}          
    63               
    64               
    65     }          
    66               
    67               
    The test server Code
    1     import java.net.*;                         
    2     import java.io.*;                         
    3                              
    4     public class MyServer {                         
    5     public static void main(String[] args) throws IOException {               
    6                              
    7     ServerSocket serverSocket = null;                    
    8     try {                         
    9     serverSocket = new ServerSocket(4444);                    
    10     } catch (IOException e) {                         
    11     System.err.println("Could not listen on port: 4444.");          
    12     System.exit(1);                         
    13     }                         
    14                              
    15     Socket clientSocket = null;                         
    16     try {                         
    17     clientSocket = serverSocket.accept();                    
    18     System.out.println(clientSocket.getInetAddress().toString());          
    19     } catch (IOException e) {                         
    20     System.err.println("Accept failed.");                    
    21     System.exit(1);                         
    22     }                         
    23                              
    24     clientSocket.close();                         
    25     serverSocket.close();                         
    26     }                         
    27     }                         
    28                              
    29

    Hi Guys,
    I'm not actually from Mozilla Firefox, but I've had this problem before, and I've solved it with the help from another website.
    What you need to do is download a programme called "tdsskiller" from here:
    http://www.geekpolice.net/t23369-computer-infected
    scroll down the page and you should see a link. (I know the article itself seems irrelevant to your problem, but trust me, the programme they recommend works on this virus too.) It's only 1.3MB or so, so it doesn't take up huge amounts of space either! :)
    I can safely say that it is COMPLETELY safe to download this from geekpolice.net, as this website is a free website which helps people with viruses on their computer. If you ever have another problem with anything to do with computers, go and have a look on geekpolice.net, they should have something that might help you.
    Before anyone wonders why I am singing its praises so much, no I am not advertising them for any personal gain, but they have helped me get rid of some pretty nasty viruses on my computer before, so I am very grateful to them :)
    SO, anyway, after you've downloaded the tdsskiller, you should run it, and it may find some infected files, in which case let it repair them. After rebooting your computer, the annoying opening tab thing should be gone!
    I hope this works for anyone who's stuck :) If it doesn't, I'm really sorry, but it has definately worked for me!
    Good luck!
    Yashmeee :)

  • Applet runnning jre7 sends tons of PersistenceDelegate requrests to server:

    Our server runs jdk1.6. Applet runs on IE7. Just recently, some clients with jre1.7 experiences slow down. By monitoring our Apache Mod_jk log, we see tons of requests from client such as:
    GET /epen-webapp/java/lang/ClassPersistenceDelegate.class
    GET /epen-webapp/java/util/PropertiesPersistenceDelegate.class
    GET/epen-webapp/java/util/HashtablePersistenceDelegate.class
    GET/epen-webapp/java/lang/IntegerPersistenceDelegate.class
    This is likely because of some changes in java 1.7 on XmlEncoder change. As we use XmlEncoder in transporting data between client and server. Somehow, the XmlEncoder in 1.7 does not know how to persists Integer, Propertyies and Hashtable?
    We don't recognize these classes and don't know why these are being requested by the applet.
    Applets running jre1.6 do not have this problem.
    Our server is jboss 4.3 eap running on jdk1.6.
    Here is how the applet is embedded:
    document.write('<object classid="clsid:xxxxxx" width="100%" height="100%" align="baseline">');
    document.write(' <param name="type" value="application/x-java-applet;jpi-version=1.6.0">');
    document.write(' <param name="image" value="images/logo_1.jpg">');
    document.write(' <param name="cache_option" value="Plugin">');
    document.write(' <param name="cache_archive" value="' + appletJars + '">');
    document.write(' <param name="codebase" value="' + codeBase + '">');
    document.write(' <param name="code" value="' + appletClass + '">');
    document.write(' <param name="mediaCodecPlugins" value="' + mediaCodecPlugins + '">');
    document.write(' <param name="mediaViewFactoryPlugins" value="' + mediaViewFactoryPlugins + '">');
    document.write(' <param name="hardCloseURL" value="' + hardCloseURL + '">');
    document.write(' <param name="jSessionId" value="' + jSessionId + '">');
    document.write(' <param name="requestURL" value="' + requestURL + '">');
    document.write(' <param name="lookAndFeel" value="' + lookAndFeel + '">');
    document.write(' <param name="java_arguments" VALUE="-Djnlp.packEnabled=true">');
    document.write(' <param name="jnlp.altCrossDomainXMLFiles" value="' + requestURL + 'crossdomain.xml' + '">');
    document.write(' <comment>');
    document.write('<embed width="100%" height="100%" align="baseline" type="application/x-java-applet;version=1.6.0" image="images/epen_logo_1.jpg" cache_option="Plugin" cache_archive="' + appletJars + '" codebase="' + codeBase + '" code="' + appletClass + '" mediaCodecPlugins="' + mediaCodecPlugins + '" mediaViewFactoryPlugins="' + mediaViewFactoryPlugins + '" hardCloseURL="' + hardCloseURL + '" requestURL="' + requestURL + '">');
    document.write(' <noembed>');
    document.write(' </comment>');
    document.write(' No Java v 1.6.0 support found!');
    document.write(' </noembed>');
    document.write('</embed>');
    document.write('</object>');
    Thanks.
    Edited by: user7440563 on Mar 15, 2013 8:54 PM
    Edited by: user7440563 on Mar 16, 2013 12:28 PM

    My organization is experiencing very similar problems.  We have resolved it through several steps.
    We upgraded the client to Java 8 and we saw in the console that the hanging connection with the Domain Controller no longer occurs.  This may be all that is necessary for your environment as well. 

  • Changing LookAndFeel for JSP

    Can some1 help me in changing the LookAndFeel of a JSP page?? What i want to do is create JButtons, JTextfields etc..... with a new LookAndFeel..just like we do for a swing JFrame...how can I do this for a jsp page ??

    I want hardware access on the server and not the client browserWell that makes things easier for you, you wont need to bother with an applet, you can use jsp.
    I have coded for accessing the hardware ports on server by using JavaOk so you have classes written already.
    You can access these classes / methods from your jsp page, however you will have to take out all the GUI stuff, so it is just the code for accessing the ports left in the classes.
    You then create your user interface using html etc. in a jsp page.
    Within your jsp you can call the methods of your java classes to embed information into the html.
    If you read up on accessing java beans, this will show you how to access your classes (even though your classes are not beans).

  • Macintosh support for Java applets

    Is there a way to auto-install the Java Runtime and plugin for Mac browsers like Internet Explorer and Netscape?
    Do the <object classid...> tags work on Macs too?
    I do know that Mac OS X shipped with Java 1.3.1. But how can I find out if the plugin is supported by a Mac user's browser?
    thank you very much.

    Has anyone gotten applets with on OS X?!?!? I have an applet that is in signed JARs on my web server. Once they get cached, I get the following in the Java Console:
    Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
    baseURL is https://myserver:11443/iBiomaticsPortal/ppv/
    documentURL is https://myserver:11443/iBiomaticsPortal/ppv/yo.jsp
    Referencing classloader: sun.plugin.ClassLoaderInfo@49d886, refcount=1
    Added trace listener: com.apple.mrj.JavaEmbedding.JE_AppletViewerPanel[com.ibiomatics.ppv.applet.Applet,0,0,0x0,invalid,layout=java.awt.BorderLayout]
    Sending events to applet. LOAD
    Determine if the applet requests to install any JAR
    Jar cache option: Plugin
    Jar archive(s): DEapplet.jar,DEserverstubs.jar,jcchart451Kplus.jar
    Jar cache version(s): 1.0.3.0,1.0.3.0,3.0.0.1
    Check if DEapplet.jar exists as entry in cache table
    Check if DEapplet.jar actually exists in cache
    Check if DEapplet.jar is upto-date
    DEapplet.jar is upto-date in cache
    Check if DEserverstubs.jar exists as entry in cache table
    Check if DEserverstubs.jar actually exists in cache
    Check if DEserverstubs.jar is upto-date
    DEserverstubs.jar is upto-date in cache
    Check if jcchart451Kplus.jar exists as entry in cache table
    Check if jcchart451Kplus.jar actually exists in cache
    Check if jcchart451Kplus.jar is upto-date
    jcchart451Kplus.jar is upto-date in cache
    Sending events to applet. INIT
    Applet Installation finished.
    Sending events to applet. START
    java.lang.ClassFormatError: com/ibiomatics/ppv/applet/Applet (Bad magic number)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:138)
         at sun.plugin.security.PluginClassLoader.access$201(PluginClassLoader.java:47)
         at sun.plugin.security.PluginClassLoader$1.run(PluginClassLoader.java:284)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:272)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:107)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:463)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:581)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1334)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:510)
         at sun.applet.AppletPanel.run(AppletPanel.java:288)
         at java.lang.Thread.run(Thread.java:491)
    If I look at the actual contents of the JAR file(s) in the cache, they are not JARs at all. They are HTML (text) files that look like this:
    <html><head><title>302 Moved Temporarily</title></head>
    <body bgcolor="#FFFFFF">
    <p>This document you requested has moved temporarily.</p>
    <p>It's now at /iBiomaticsSecurity/Login.jsp;jsessionid=211MQ0XryekiU1PrEyFAjBt8oe47JOlNJJnf7lvpgFMrXLPCl8Uw!-713944120!-1069893353!11800!11443.</p>
    </body></html>
    I have tried just about everything. My client is OS 10.2 running IE 5.2. I get the same results in Mozilla and Safari.
    Here is the the HTML that contains my applet tag:
    <HTML>
    <HEAD>
    <TITLE>P21 (TM) Data Explorer</TITLE>
    </HEAD>
    <BODY>
    <APPLET WIDTH=100% HEIGHT=100% CODEBASE="https://myserver:11443/iBiomaticsPortal/ppv" CODE="com.ibiomatics.ppv.applet.Applet">
    <PARAM NAME="CACHE_OPTION" VALUE="Plugin"/>
    <PARAM NAME="CACHE_ARCHIVE" VALUE="DEapplet.jar,DEserverstubs.jar,jcchart451Kplus.jar"/>
    <PARAM NAME="CACHE_VERSION" VALUE="1.0.3.0,1.0.3.0,3.0.0.1"/>
    <PARAM NAME = "MAYSCRIPT" VALUE="true"/>
    <PARAM NAME = "ibioConnectionType" VALUE="servlet"/>
    <PARAM NAME = "ibioPPVhostname" VALUE="https://myserver"/>
    <PARAM NAME = "ibioPPVportnumber" VALUE="11443"/>
    <PARAM NAME = "ibioPPVDAM" VALUE="com.ibiomatics.analysis.server.demoDAM"/>
    <PARAM NAME = "ibioPPVProjectID" VALUE="NDA"/>
    <PARAM NAME = "ibioPPVStudyID" VALUE="NDA~PHCSAMPLE"/>
    <PARAM NAME = "ibioStudyManagerClass" VALUE="com.ibiomatics.analysis.server.ppvStudyManager"/>
    <PARAM NAME = "ibioGDBenabled" VALUE="false"/>
    <PARAM NAME = "lookAndFeel" VALUE="metal"/>
    </APPLET>
    </BODY>
    </HTML>
    Thanks in advance,
    Drew

  • LookAndFeel=oracle in Formsconfig

    Dear All
    can any one tell me if i changed lookAndFeel=oracle to Generic then what will happened ?
    And also tell me what else i can give here ?
    And also tell me i have to changed here only or in the below also .. What is the difference ?
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar,statusbarflasher.jar
    archive=frmall.jar,statusbarflasher.jar
    *lookAndFeel=oracle*
    # Forms applet parameter
    background=
    # Forms applet parameter
    *lookAndFeel=Oracle*
    # Forms applet parameter
    colorScheme=teal
    # Forms applet parameter

    LuKKa wrote:
    can any one tell me if i changed lookAndFeel=oracle to Generic then what will happened ?An easy method would be to try it ;) ? Nothing bad will happen if you change it (except your forms application will look different).
    lookAndFeel and colorScheme control the way the applet appears. LookAndFeel is used to control...well...the Look and Feel. To compare: this is like in Swing where you have MetalLookAndFeel, Motif, (you have different look and feels in forms)...ColorScheme controls the default colors of the forms components (e.g. color of Tab Pages etc.)
    For legal values for lookAndFeel and colorScheme take a look here:
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14032/configure003.htm#sthref178
    if you set the look and feel to generic then colorScheme is ignored (just as indicated in the documentation :p ) so there would be no point in changing the look and feel to generic and changing the color scheme too.
    cheers

  • Lookandfeel 10g

    Hi.
    I'm developing a Forms/Report 10g application.
    It is a migration from a previous 6i application.
    That application (the same code) runs under 2 different Application Servers.
    One has Linux, the other one Windows.
    In both apps servers, the configuration of lookandfeel is setted "generic",
    but the canvas in the applet are significantly different.
    Under linux, it has the same look of the 6i client/server version.
    Under windows, some fonts, background color, etc. are changed; Strings are of the same color of the background, making them not readable. Fonts are not clear.
    Why this could be? There's a sort of configuration for default fonts and color in the Application server?
    Thanks!
    Sebastian

    Hello,
    see your <DEVSUITE_HOME>\forms\java\oracle\forms\registry\Registry.dat file
    # Defaults for the Font details, all names are Java Font names.  Each of
    # these parameters represents the default property to use when none is
    # specified.
    # defaultFontname represents the default Java fontName.
    # defaultSize     represents the default fontSize.  Note that the size is
    #                 multiplied by 100 (e.g. a 10pt font has a size of 1000).
    # defaultStyle    represents the default fontStyle, PLAIN or ITALIC.
    # defaultWeight   represents the default fontWeight, PLAIN or BOLD.
    default.fontMap.defaultFontname=Dialog
    default.fontMap.defaultSize=900
    default.fontMap.defaultStyle=PLAIN
    default.fontMap.defaultWeight=PLAIN
    ...Francois

  • Blank applet using Sun JRE plug-in on 10g

    I have successfully run multiple forms using WebUtil with JInitiator on 10g DS and
    AS. I have been struggling with getting forms to show up in the applet when I try to
    use webutiljpi.htm. When I try to run a form from the builder, It loads an applet with
    a broken image icon in the upper left hand corner and the status bar reads:
    Loading Java Applet Failed...The java console gives me this(removed header stuff):
    Java Plug-in 1.5.0_12
    Using JRE version 1.5.0_12 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\xxxxxx
    load: class oracle.forms.webutil.common.RegisterWebUtil not found.
    java.lang.ClassNotFoundException: oracle.forms.webutil.common.RegisterWebUtil
    I looked in Metalink and found an article talking about the webutil.cfg file and
    assuring that the path to frmwebutil.jar isn't identified properly, but I think it is.
    Anyway, I'm stuck and I must be missing something easy. Here are the entries for
    my JInitiator and JPI configs and my default.env file. Any help would be greatly
    appreciated.
    [jasonjpi]
    WebUtilArchive=frmwebutil.jar,jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljpi.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar
    archive=frmall.jar,frmwebutil.jar,Jacob.jar
    lookAndFeel=oracle
    pageTitle=10g Development
    width=950
    height=600
    splashscreen=false
    background=false
    #colorScheme=blue
    logo=false
    codebase=c:\oracle\ora10g\forms\java
    workingDirectory=f:\oraapps\dev\assist\fmb10g\jason_conversion\
    envFile=default.env
    jpi_classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
    jpi_codebase=https://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,4,2,4
    jpi_mimetype=application/x-java-applet;version=1.4.2
    jpi_download_page=https://java.sun.com/j2se/1.5.0/download.html
    [jasonwebutil]
    WebUtilArchive=frmwebutil.jar,jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar
    archive=frmall.jar
    lookAndFeel=generic
    pageTitle=Assist - 10g Development
    width=950
    height=600
    splashscreen=false
    background=false
    colorScheme=blue
    logo=false
    workingDirectory=f:\oraapps\dev\assist\fmb10g\jason_conversion\
    default.env
    ORACLE_HOME=C:\oracle\ora10g
    FORMS_PATH=C:\oracle\ora10g\forms;c:\oracle\ora10g\forms\java;F:\oraapps\dev\Assist\fmb10g\Jason_Conversion;g:\oraapps\prod\assist\icons
    WEBUTIL_CONFIG=C:\oracle\ora10g\forms\server\webutil.cfg
    FORMS_RESTRICT_ENTER_QUERY=TRUE
    PATH=C:\oracle\ora10g\bin;C:\oracle\ora10g\jdk\jre\bin\client
    FORMS=C:\oracle\ora10g\forms
    CLASSPATH=C:\oracle\ora10g\j2ee\OC4J_BI_Forms\applications\formsapp\formsweb\WEB-INF\lib\frmsrv.jar;C:\oracle\ora10g\jlib\repository.jar;C:\oracle\ora10g\jlib\ldapjclnt10.jar;C:\oracle\ora10g\jlib\debugger.jar;C:\oracle\ora10g\jlib\ewt3.jar;C:\oracle\ora10g\jlib\share.jar;C:\oracle\ora10g\jlib\utj.jar;C:\oracle\ora10g\jlib\zrclient.jar;C:\oracle\ora10g\reports\jlib\rwrun.jar;C:\oracle\ora10g\forms\java\frmwebutil.jar

    Hi,
    Can you define
    [jasonjpi]
    WebUtilArchive=frmwebutil.jar,jacob.jar -- you use jacob.jar but it isn't in your classpath in your default .env . You must add it there too
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljpi.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar
    archive=frmall.jar,frmwebutil.jar,Jacob.jar -- remove frmwebutil an jacob.jar here
    lookAndFeel=oracle
    pageTitle=10g Development
    width=950
    height=600
    splashscreen=false
    background=false
    #colorScheme=blue
    logo=false
    codebase=c:\oracle\ora10g\forms\java --replace by codebase=/forms/java should be virtual directoryworkingDirectory=f:\oraapps\dev\assist\fmb10g\jason_conversion\
    envFile=default.env
    this is a little messy ;-)
    jpi_classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
    jpi_codebase=https://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,4,2,4
    jpi_mimetype=application/x-java-applet;version=1.4.2
    jpi_download_page=https://java.sun.com/j2se/1.5.0/download.html
    should be
    jpi_classid=clsid:CAFEEFAC-0015-0000-0012-ABCDEFFEDCBA
    jpi_codebase=https://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,5,0,12
    jpi_mimetype=application/x-java-applet;version=1.5.0
    jpi_download_page=https://java.sun.com/j2se/1.5.0/download.html
    then try again. Normally you even don't have to restart your OC4J
    Hope it helps
    Erwin

  • Problem with threads within applet

    Hello,
    I got an applet, inside this applet I have a singleton, inside this singleton I have a thread.
    this thread is running in endless loop.
    he is doing something and go to sleep on and on.
    the problem is,
    when I refresh my IE6 browser I see more than 1 thread.
    for debug matter, I did the following things:
    inside the thread, sysout every time he goes to sleep.
    sysout in the singleton constructor.
    sysout in the singleton destructor.
    the output goes like this:
    when refresh the page, the singleton constructor loading but not every refresh, sometimes I see the constructor output and sometimes I dont.
    The thread inside the singleton is giving me the same output, sometime I see more than one thread at a time and sometimes I dont.
    The destructor never works (no output there).
    I don't understand what is going on.
    someone can please shed some light?
    thanks.
    btw. I am working with JRE 1.1
    this is very old and big applet and I can't convert it to something new.

    Ooops. sorry!
    I did.
         public void start() {
         public void stop() {
         public void destroy() {
              try {
                   resetAll();
                   Configuration.closeConnection();
                   QuoteItem.closeConnection();
              } finally {
                   try {
                        super.finalize();
                   } catch (Throwable e) {
                        e.printStackTrace();
         }

  • Open web pages from an applet

    I'm developing an applet that has to open some web pages.
    The only way I know is to use the method showDocument that
    needs and URL. So, how to pass parameters to the web page?
    I don't want to put them in the URL: everyone can see
    "secret data"!
    Help me, please.

    Take a look at this example that uses a JEditor pane to hold the HTML page.
    //Create a new JEditor Pane
    jep = new JEditorPane( );
    //Ensure the pane is not editable
    jep.setEditable(false);  
    //Use this to get local HTML file
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");
    //add the html page to the JEditorPane
    jep.setPage(fileURL);Ok the core line of code here is this.
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");The standard method for accessing a html file via a URL is thus. As you can see its very similar.
    URL fileURL = new URL("http://www.comp.glam.ac.uk/pages/staff/asscott/progranimate/docs/Manual/Manual.htm");this.getClass().getResourse() will return the file location of the class you are working with.
    By doing the following you can access manual.html in a folder called Manual that sits in the same file location as the class file you are using.
    URL fileURL = this.getClass().getResource("Manual/Manual.htm");I hope this helps.
    Andrew.

  • Unable to load database driver from my applet's jar file

    I'm trying to set up an applet that will talk to a MySQL database. I have no problem connecting to the database as I'm developing the code ("un-jarred"), but when I create a jar file of my code to test through a web browser, I cannot connect to the database due to the usual ClassNotFoundException. I have included mysql-connector-java-3.1.12-bin.jar (the current driver) in the jar, but I don't know if I'm supposed to supply some info through an attribute to the applet tag to let it know that the jar contains the driver it needs or if I have to call the driver differently in my code.
    Any help is appreciated, thanks.

    The simplest approach is always the best. :)Abso-lutely.
    Awesome, that worked perfectly. I Included the extra
    jar file in the applet tag and now my applet makes
    some sweet lovin' to the database.And you have succeeded where thousands have failed. Congratulations.

  • Applet java file not refreshing in browser

    I have an applet that I am updating and I am not seeing the corresponding update when I open the web page. I can manually download the java class file and look inside it and it definitely is the updated file. I have deleted the browser history. (I am running tests with Firefox 3, IE7, and Safari 4 public beta). Is there something else I need to do to make sure the browser pulls in the latest version of the class file referenced in the html?
    Here is the code:
    <HTML>
    <HEAD>
       <TITLE>A Simple Program</TITLE>
    </HEAD>
    <BODY>
       <CENTER>
          <APPLET CODE="SendRequest.class" WIDTH="500" HEIGHT="150">
          </APPLET>
       </CENTER>
    </BODY>
    </HTML>The applet refers to a hard coded URL to read through a urlconnection. It is always reading a file and showing content, but it is not showing the right file. If I change the name of the referenced file in the java program, it looks like the browser has cached the referred file, rather than throwing and error and saying the file doesn't exist.
    Here is the java
    import java.applet.*;
    import java.awt.*;
    import java.net.URLConnection;
    import java.net.URL;
    import org.w3c.dom.Document;
    import java.lang.String;
    import java.io.*;
    public class SendRequest extends Applet {
        @Override
        public void paint(Graphics g) {
            g.drawRect(0, 0, 499, 149);
            g.drawString(getResponseText(), 5, 70);
        public String getResponseText() {
            try {
                URL url = new URL("http://myserver.com/stats/logs/ex20090603000001-72.167.131.217.log");
                URLConnection urlconn = url.openConnection();
                BufferedReader in = new BufferedReader(
                                    new InputStreamReader(
                                    urlconn.getInputStream()));
                String inputLine;
                String htmlFile = "";
                try {
                    while ((inputLine = in.readLine()) != null)
                        htmlFile += inputLine;
                    in.close();
                    return htmlFile;
                } catch (Exception e) {
                    return "Can't get the string.";
            } catch (Exception e) {
                return "Problem accessing the response text.";
    }Any help would be appreciated. I heard that some files may cache more persistently than others, but I don't fully understand the details.
    Thanks,
    Jim

    Check this [document loader example|http://pscode.org/test/docload/] & follow the link to sandbox.html for tips on clearing the class cache. That relates specifically to caching a refused security certificate, but class caching is much the same. As an aside, getting a console can be tricky in modern times (unless the applet fails completely). It is handy to configure the [Java Control Panel|http://java.sun.com/docs/books/tutorial/information/player.jnlp] to pop the Java console on finding an applet (Advanced tab - Settings/Java Console/Show Console).
    Of course there are two better tools for testing applets, especially in regard to class caching. AppletViewer and Appleteer both make class refresh fairly easy. Appleteer is the better of the two. I can tell you that with confidence, since I wrote it. ;-)

Maybe you are looking for

  • Expanding Text Options

    I'm putting together a photo book of old photos that I have scanned and need to include a lot of annotations. The formal theme I have been using doesn't seem to allow additional text to be added once you fill the text box frame. Is there any way to e

  • Multiple apple devices using one library

    I have two i-pod classics with 30 GB capacity. I love them, and they still work well. I have purchased them probably 5 years ago. I have one at home and one at work. I sync them to the same i-tunes library. I have upgraded my computer 5 times since I

  • Managing Distribution Groups with hidden membership (when hideDLMembership is true)

    Hi All, I have a situation in a Exchange 2010 SP2 messaging environments where we want to manage two distribution groups through Outlook client and want to ensure that its membership is visible to none but the distribution group owners. I have follow

  • How we cn avoid the sequence in remote tables through global temporary tabl

    Hi, We have table xx_interface_qualifiers in the remote db and we are inserting the data like this and its on a loop INSERT INTO xx_interface_qua (interface_id, list_line_interface_id, excluder_flag, qualifier_context, qualifier_attribute, qualifier_

  • BAPI for parking an FI invoice

    My dear savior, How shall I go about parking an FI invoice over BAPI. I've read around that there is no such BAPI. I just can't believe that. How shall one enter an FI invoice from an external system into the SAP R/3? Posting the invoice seems like a