Place to put swing.jar to enable Swing for IE?

I know I can extend the JVM in Netscape 4.7, or any of the JRE's from Sun by sticking extra JAR files into the lib/ext directory. Is there a similar place to do so to extend the Microsoft JVM for IE. Specifically, I want to do that for Swing. I know it's possible to put the swing classes I might need into a JAR file and add it to my applet download, but I'm hoping there is a way to install it into the Microsoft JVM.
Did Micro$oft avoid having a simple directory that class files or JAR files could be placed to extend the browser JVM?
Thanks,
Harold Shinsato

If you are forced to use the microsoft's virtual machine, you could try this solution:
(Everything is documented in the ms sdk for java docs)
Download the microsoft's sdk for java, unjar the file swing.jar, then use the dubuild tool to make a cab file, the command would be something like this:
dubuild filename.cab . /D "My Classes" /I *.class /V 1,0,0,0
The resulting cab file will have the half of the size that the original jar,
Then you have to change the applet tag:
<APPLET code="package.classname.class" width=342 height=390>
<PARAM name="cabbase" value="filename.cab" />
<applet />
Optionally you can use a feature in IE, that allows you to install classes in the user's computer.
First you must get a certificate, you can generate tests certificates using the tool makecert included in the ms sdk for java, it would be something like this:
C:\..\>makecert -sk MyKeyName -n "CN=My Publisher Name" MyTestCert.cer
C:\..\>cert2spc MyTestCert.cer MyTestCert.spc
C:\..\>signcode -j javasign.dll -jp medium -spc MyTestCert.spc
-k MyKeyName filename.cab
the parameter after -jp is the level of security if you change medium for low you get full permissions.
Again you need to change the applet tag:
<APPLET code="package.classame.class" width=342 height=390 >
<PARAM name="cabbase" value="filename.cab" />
<PARAM NAME=useslibrary VALUE="My Classes">
<PARAM NAME=useslibrarycodebase VALUE="filename.cab">
<PARAM NAME=useslibraryversion VALUE="1,0,0,0">
</Applet>
This will cause the user see a warning window when he watch the page, he will be asked for authorization to download and install software to his computer, if the user agrees the cab file filename.cab is copied to %winnt%\downloaded program files and acording to the documentation when he sees the page again he would not have to download all the files again.
As IE installs the files I think that is more easy for the unexperienced user that open the winnt dir search for the java folder and copy the classes by hand

Similar Messages

  • A tiny font is used in many places across Java Swing applications (help!)

    In many places in Java but mostly in text boxes I'm seeing a very small font that is quite hard to read.
    I am seeing this all over the place in Java programs and it is getting on my nerves.
    I'm not sure what is causing this.
    I also encountered this issue when running Java on Windows XP.
    I really need help on how to solve this,
    Or maybe it is actually a bug with Java itself and Windows?
    An image of the problem in SwingSet2:
    [SwingSet 2 Tiny Font Example|http://img687.imageshack.us/img687/1373/swingset2tinyfont.png]
    System spec:
    Windows 7 Professional 32-bit (Aero is on)
    Java 6 Update 20
    English system locale and language
    No special dpi settings (default)
    Screen Resolution: 1280x1024
    Avast Antivirus 5.0
    An intel graphics card
    Edited by: Temp111 on May 9, 2010 7:38 AM

    camickr wrote:
    That is not a problem. Somewhere in that code the programmer uses setFont(....) to make it a smaller font. The default font of a text component does not behave like that.
    For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org/], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.No, it's defiantly a problem. Probably in the default fonts that Swing uses in some places.
    I detected one place where I can easily trigger this issue, a JTextArea And the Windows Look and Feel, So here is a SSCCE for you:
    [Picture Of Tiny Font SSCCE With Tiny Font issue|http://img88.imageshack.us/img88/7876/tinyfont.png]
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    public class TinyFont {
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
              } catch (InstantiationException e) {
                   e.printStackTrace();
              } catch (IllegalAccessException e) {
                   e.printStackTrace();
              } catch (UnsupportedLookAndFeelException e) {
                   e.printStackTrace();
              JFrame frame = new JFrame("Tiny Font");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JTextArea textArea = new JTextArea("Tiny Font Test");
              frame.add(textArea);
              frame.setSize(150, 100);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
    }But I also encountered this issue in other places that use Swing.
    Try SwingSet2 Source Code Tab for example: [SwingSet2|http://java.sun.com/products/jfc/jws/SwingSet2.jnlp]

  • Where to put utility jar (used by EJB's and war)

    Hello all,
    In many cases when you create a web application including EJB's and a WAR file packaged together in an EAR file, you need some utility classes that are used in the EJB's as wel as in the servlets in the WAR. The utility classes might for example be value object classes that servlets use to exchange data with te EJB's.
    My question is: What is the best place to put the utility class files?
    There is a new article on JDC: http://developer.java.sun.com/developer/technicalArticles/J2EE/build/ that gives some tips. For example, it proposes to put the utility JAR in the EAR file and then add a "Class-Path:" entry to the MANIFEST.MF of the EJB's that use the utility classes.
    However, this approach does not work on BEA Weblogic 6.0. Weblogic's classloader just seems to ignore the "Class-Path:" in the EJB JAR's manifest.
    Any thoughts?
    regards
    Jesper

    The "CLASS-PATH" mechanism in that article is a new
    requirement in J2EE 1.3 (final draft 4). Therefore
    right now Weblogic does not support it yet. Now you
    need to put those utility classes in both the WAR (in
    WEB-INF/lib) and EJB JAR files. If you really want
    only 1 copy of the jar file deployed, you can manually
    add that jar file to weblogic server classpath in the
    start script under config/yourdomain.HI all,
    I have some Utility jar file for EJB and Web Application,
    In the second solution about one copy in weblogic,
    I tried it in the WLS60 it's ok
    But it didn't work in WLS61
    Anyone could give me any good suggestion?
    Moen

  • Swing for http

    Hello I want to ask how to know the difference on what I can do with Swing for http and Swing for desktop. I am programming an application in NetBeans for http and I don't know if all what I do work with http too or if there is some differences between desktop and http.
    Someone can tell me please?
    thanks

    GonzaloP wrote:
    Encephalopathic can you show me an example of this? I am begginer in java.Sure. But sorry if it's too long.
    The first class, MyAppPanel.java, creates a JPanel on demand: if you call getMainPanel() on a MyAppPanel object, you'll get its JPanel. This JPanel doesn't do anything except draw some components on the screen for demonstration purposes:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.GridLayout;
    import javax.swing.BorderFactory;
    import javax.swing.Box;
    import javax.swing.BoxLayout;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JSeparator;
    import javax.swing.JTextField;
    public class MyAppPanel
      private static final String[] LABEL_STRINGS =
        "What is your Quest?", "What is your Favorite Color?", "What is the Capital of Assyria?",
        "What is the Air-Speed Velocity?"
      private static final String TITLE = "Bridge Questions";
      private JPanel mainPanel = new JPanel();
      public MyAppPanel()
        JPanel titlePanel = createTitlePanel(TITLE);
        JPanel dataPanel = createCenterPanel(LABEL_STRINGS);
        JPanel btnPanel = createButtonPanel();
        int eb = 10;
        mainPanel.setBorder(BorderFactory.createEmptyBorder(eb, eb, eb, eb));
        mainPanel.setBackground(Color.lightGray);
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS));
        mainPanel.add(titlePanel);
        mainPanel.add(createMySeparator(15));
        mainPanel.add(dataPanel);
        mainPanel.add(createMySeparator(15));
        mainPanel.add(btnPanel);
      private JPanel createMySeparator(int vs)
        JPanel mySeparator = new JPanel();
        mySeparator.setOpaque(false);
        mySeparator.setLayout(new BoxLayout(mySeparator, BoxLayout.PAGE_AXIS));
        mySeparator.add(Box.createVerticalStrut(vs));
        mySeparator.add(new JSeparator());
        mySeparator.add(Box.createVerticalStrut(vs));
        //mySeparator.setBorder(BorderFactory.createLineBorder(Color.blue));
        JPanel outerPanel = new JPanel(new BorderLayout());
        outerPanel.setOpaque(false);
        outerPanel.add(mySeparator);
        return outerPanel;
      private JPanel createButtonPanel()
        JPanel btnPanel = new JPanel(new GridLayout(1, 0, 20, 0));
        btnPanel.setOpaque(false);
        JButton saveBtn = new JButton("Save");
        JButton cancelBtn = new JButton("Cancel");
        btnPanel.add(saveBtn);
        btnPanel.add(cancelBtn);
        return btnPanel;
      private JPanel createCenterPanel(String[] labelStrings)
        JPanel westPanel = new JPanel(new GridLayout(0, 1, 0, 5));
        JPanel centrPanel = new JPanel(new GridLayout(0, 1, 0, 5));
        westPanel.setOpaque(false);
        centrPanel.setOpaque(false);
        for (int i = 0; i < labelStrings.length; i++)
          JLabel label = new JLabel(labelStrings);
    westPanel.add(label);
    centrPanel.add(new JTextField(12));
    JPanel dataPanel = new JPanel();
    dataPanel.setOpaque(false);
    dataPanel.setLayout(new BorderLayout(10, 10));
    dataPanel.add(westPanel, BorderLayout.WEST);
    dataPanel.add(centrPanel, BorderLayout.CENTER);
    return dataPanel;
    private JPanel createTitlePanel(String text)
    JPanel titlePanel = new JPanel();
    titlePanel.setOpaque(false);
    JLabel label = new JLabel(text);
    label.setFont(label.getFont().deriveFont(Font.BOLD, 32));
    titlePanel.add(label);
    return titlePanel;
    public JPanel getMainPanel()
    return mainPanel;
    Now if I want to use the produced JPanel in a stand-alone program, all I need to do is create a JFrame, place the JPanel in the JFrame's contentPane, pack and set the JFrame to visible, and I'm done. This next class, MyAppJFrame, does just that:
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class MyAppJFrame
      private static void createAndShowUI()
        MyAppPanel myappPanel = new MyAppPanel();  //create a myappPanel object
        JPanel panel = myappPanel.getMainPanel();  // get its JPanel
        JFrame frame = new JFrame("MyAppPanel"); // create the JFrame 
        frame.getContentPane().add(panel);   // and add the JPanel to the contentPane
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      public static void main(String[] args)
        java.awt.EventQueue.invokeLater(new Runnable()
          public void run()
            createAndShowUI();
    }Now if I want to create a JApplet, I do the exact same thing, only this time place the JPanel into a JApplet's content frame, as this class MyAppApplet demonstrates:
    import java.awt.Dimension;
    import java.lang.reflect.InvocationTargetException;
    import javax.swing.JApplet;
    import javax.swing.JPanel;
    import javax.swing.SwingUtilities;
    public class MyAppJApplet extends JApplet
      @Override
      public void init()
        try
          SwingUtilities.invokeAndWait(new Runnable()
            public void run()
              MyAppPanel myAppPanel = new MyAppPanel();
              JPanel myPanel = myAppPanel.getMainPanel();  // get the JPanel from the MyAppPanel object
              getContentPane().add(myPanel); // place it in the JApplet just like we did for the JFrame
              setSize(new Dimension(myPanel.getPreferredSize()));
        catch (InterruptedException e)
          e.printStackTrace();
        catch (InvocationTargetException e)
          e.printStackTrace();

  • How to keep minimized files docked in the place you put them and not at bottom of screen?

    I'm using CS3 on Windows. When I minimize a file it automatically goes to the bottom of the screen. How do I get a minimized file to stay where I place it on the screen so that everytime I close the file it will go to the designated place I put it?

    You can't, fort the most part. Windows does not provide this functionality natively. You may be able to enable it by using tools such as Windowblinds or the settings of your graphics card driver, but that's it. Or you could upgrade to CS4, where this is handled by Adobe's own layout engine...
    Mylenium

  • Where to put RXTXcomm.jar so NetBeans can find it?

    I am trying to write a program for the RPi in Java, that will read and write a serial port.  I have downloaded RXTXcomm.jar and the appropriate so file.  So far I have benn unable to find the right place to put the RXTXcomm.jar file so that NetBeans can find it.  I have tried Java_ME_platform_SDK_8.0/lib/ext and jre1.8.0_20\lib\ext.  I have also gone into the project properties and specifically told it to look in the  Java_ME_platform_SDK_8.0/lib/ext director but NetBeans still does not find the classes.  I have also imported the gnu.io.* package in my program but NetBeans doesn't find the package.  Any help would be greatly appreciated.

    Hi!
    To read/write serial port you don't' need any side libraries. Simply use either Device IO API or MEEP GCF.
    /Sergey

  • Where to put custom .jar-files in order to use them in scripting QPAC?

    Hi,
    For testing purposes, I wrote a simple class and put it in a .jar-file to use in scripting QPAC. Unfortunately, I get the following error message in JBOSS:
    Class: FooBar not found in namespace
    Where do I have to put custom library (jar-)files in order for JBOSS to find them? I already tried
    [...]\jboss\lib as well as
    [...]\jboss\server\all\lib.
    Regards,
    Steve

    Hi Steve
    You need to put them in two places:
    1. In the server classpath, so that they can be found at runtime. jboss\server\all\lib should work, or you can even drop them into the server/all/deploy directory. I think if you put them in the lib directory, you need to restart Jboss, whereas if you put them in the deploy directory, they should be dynamically picked up.
    2. For testing purposes, the extra jars need to be in the classpath of the Workflow Designer. Please download our SQLPlus QPAC from:
    http://www.avoka.com/avoka/qpac_library.shtml
    It includes a document that describes a technique for adding extra jars to the classpath.
    Regards,
    Howard
    http://www.avoka.com

  • Can I use Time Capsule for Time Machine and a place to put my iPhoto Library

    Can I use Time Capsule for Time Machine and a place to put my iPhoto Library?

    Only if you partition the Time Capsure into two partitions, one for TM and one for the iPhoto LIbrary.  But you won't be able to backup that library as it will be on the same drive as the TM backups.
    It's not recommended.  An alternative solution is to get another EHD, move the library to it and run it from there. Then TM can backup both your boot drive and the working EHD drive.
    OT

  • Brand new macbookpro; recent install Yosemite; computer now opens to my name and image but no place to put the password but nothing happens when trying to click on restart etc.

    Macbook Pro purchased December 2014.....was fine until update iOS  to Yosemite 2 days ago. Now, when turned on my image with my name comes up on the screen...no place to put your password.....at the bottom...restart, but used cursor to click on the restart and also my name, the image etc....nothing happens.
    I shutdown to go into the Recovery OS....and got the screen about resetting the password....which doesn't need reset. The third choice seemed more appropriate regarding the keyboard...but could not click on any of them with the cursor.
    Spent an hour with Apple support who ended up referring me to an Apple store that's a 100 mile round trip from me. Can't believe they can't help me...and can't believe this is happening to a brand new Mac.....guess Apple is no different than any other computer...install an update or upgrade...and immediately have problems.
    Exasperated,
    Joe......good thing my Dell is working

    Resetting User Password in Lion and Mountain Lion
    Boot into your Recovery Partition by holding down the Command and R keys whilst booting.
    When the Recovery screen appears, go to the Utilities menu and open Terminal.
    In Terminal, type:
    resetpassword
    ...a small app will open and allow you to choose the user for whom you want to change the password. If you are the admin, be certain that you choose your admin user. Type in your new password twice and give yourself a good hint. Click OK (or Done or whatever) and reboot, enjoying the use of your new, hopefully memorable, password.
    Good luck,
    Clinton

  • Where is the correct place to put a property file to be read by bpel ?

    Hi.
    I need to create a custom property file and configure SOA Suite to load it as it's own resource during its start. So i can read this property file from my BPEL embedded activity with some code like this:
    Properties prop = new Properties();
    InputStream in = getClass().getResourceAsStream("foo.properties");
    prop.load(in);
    in.close()
    Avoiding the use of the FileInputStream (constant IO, fixed paths..).
    Is there some default place to put this file ? I have tried to put it under applib and configure this directory as a shared-library directory but without success.
    I'm using SOA Suite 10.1.3.5 with OC4J.
    Thanks.

    Properties can also be defined in and read from bpel.xml. you can define token with any name and define the value for it. In your configuration you can use tokens and at run time it will read the values from bpel.xml.
    Thanks,
    Vikas Manchanda

  • Where to place my customed mbean jar file?

    Hi all,
    I am totally new to weblogic, and our server is version 6.1. I would like to know
    where should I place my mbean class jar file?
    Mike

    Thanks Bala.
    "Bala" <[email protected]> wrote:
    >
    Hi Mike,
    Adding to start script (startwls.cmd/sh) is fine.
    Bala
    "Mike" <[email protected]> wrote:
    Would you please give more details on what is server's classpath?
    Should I place under %JAVA_HOME%/lib? Or Add the jar to the startWLS.cmd?
    Satya Ghattu <[email protected]> wrote:
    If you have written a custom MBean and would like to register in wls
    mbean server, you should make these classes available to the system
    class loader, i.e place the classes in the server's classpath.
    -satya
    Mike wrote:
    Hi all,
    I am totally new to weblogic, and our server is version 6.1. I wouldlike to know
    where should I place my mbean class jar file?
    Mike

  • Trying connect my itunes remote from my iphone and when it gives me the passcode there is no place to put it in

    trying to connect my itunes remote from my iphone 4 but when it gives me the passcose there is no place to put it. And when it is connected to my computer it won't as well

    jghowse wrote:
    I did see this but it does not have a place to put in the passcode.
    if i'm not mistaken, the instructions say
    Setting up Remote app
    Remote app 2.0 or later uses Home Sharing for setup and control with iTunes 10.0.1 and/or Apple TV (2nd generation).
    iTunes (10.0.1 or later)
    Open iTunes on your Mac or PC.
    Turn on Home Sharing in iTunes by going to Advanced > Turn on Home Sharing
    Connect iPhone, iPad or iPod touch to a Wi-Fi network that is connected to the local network that your Mac or PC is also connected to.
    Open the Remote app (software version 2.0 or later) on your mobile device.
    Turn on Home Sharing in the Remote Settings screen. Make sure to sign into the same Home Sharing account you used to sign in to from iTunes on your computer.
    where does it mention entering a passcode ?

  • Where is the best place to put programs to start on X/Openbox startup?

    Hi,
    There are several places to put programs to startup when you start X or a WM.  I'm using Openbox and presently have placed these into my .xinitrc file, but I'm not sure this really the best place.  Openbox has a autostart file, which sorta looks like a better bet.
    Any suggestions would be great.
    Thanks,
    Jon

    Hadn't heard of consolekit; it's not clear to me from looking at their website what it's supposed to be offering? Maybe after it matures more, the documentation will improve, and all will become clear.
    When I used Openbox, I just launched everything such as conky from the Openbox autostart file. I guess if you had a weird set up such as some of your Openbox configs sitting on unmounted partitions, their mount commands would go in .xinitrc, otherwise autostart.sh seems better.
    Just IMO of course, do what you want on your own machine :-)
    Last edited by /dev/zero (2011-10-27 21:04:37)

  • Where is the best place to put custom functions?

    Hi,
    I have a composition which has a number of symbols. I have to call some custom methods externally and was wondering where is the best place to put the custom methods?
    I have seen posts that I should put the code in the CompositionReady event of the stage but I would like to put it a bit closer to the symbol.
    Is this the best place?
    Sham.

    Here is a case:
    It's a good idea if you well understand global and local variables.
    About complete event, you are right.

  • Where is the best place to put cfqueries?

    Where is the best place to put cfqueries, in the <head> </head> or before the html tag? Thanks

    So before the doctype tag? Thanks
    I just doesn't really matter.  the doctype, head, body, etc only matter to the browser; the CF tags only matter to CF.  The browser doesn't see the CFML, and CF doesn't care about the mark-up one bit: it just ignores it.
    The best place - as I said - is not in the same file at all.  But if you insist on slapping your business logic in with your display logic, then the only consideration is that you need to set your variables before you use them.  Other than that: it simply doesn't matter.
    One consideration you might make is - even if it's all thrown into the same one file - at least separate the file itself into sections: have all your CFML code that gets your data at the top, and try to limit the CFML you have mixed in with the mark-up, eg: limit it to stuff like loops and conditionals.
    But, seriously, separate your concerns.  Dan's pretty much just wrong when he said it's over-engineering. It's just sloppy to not to write tidy, well-maintained, well-organised code.
    Adam

Maybe you are looking for