Applets in browsers

Has anyone gotten an applet to work in a browser so it can use an as400 database without have to sign it. I would like this to be on my intranet and I just don't think I should have to sign it if it is my applet and is accessing my rescources. Thanx in advance.

oh... you have the DB in the folder with the applet,.... You mean you have the DB files in that folder?
That's fine, but that's now how the applet connects to the DB. The applet can connect to the DB thru JDBC connections over the network.
How is it supposed to access the DB files? An applet is restricted to the confines of the web server/browser environment, generally. It can't acces files on the local system for security reasons, without being signed. And HTTP does not allow for just writing to files on servers for other security reasons. And it's not a simple thing of using File objects and Java I/O classes anyway. URLConnections and that's not simple either, cuz it requires special stuff on the server.
If you want to access this DB files as Files, you'd need a servlet or something that the applet could POST requests to to do the queries and updates on the applet's behalf and return the results.
Or use JDBC and talk to the database engine directly.

Similar Messages

  • Java 3d applets and browsers

    i'm looking into putting 3d content on the web.
    i was thinking of using the 3d api to create an applet which showed a 3d product object which the user could then rotate and which i could load .wml objects (or some3d format) into the applet.
    i know this is possible.
    but i've read somewhere that in order for the user to use it they must have jre 1.2 and the java 3d extension installed. because java 3d needs java 1.2 VM to run (which i'mled to believe most browsers dont support).
    my understanding is that most browsers at most support 1.1 vm which means that if i went ahead i would disenfranchise a large part of my audience (which i am not prepared to do)
    the whole reason i decided to go through the java route was because i wanted 3d content on the web without having to have the user download a player in order to view it.
    so my question is, assuming what i believe to be true is correct. is it possible to write the sort of 3d applet i want without using the 3d api, and thereby keeping my applet to 1.1 spec and therefore keep my audience?
    i'm basically looking for a workaround. i want 3d content, i dont want the user to have to use a player.
    any means of doing this i will do
    java is'nt really my background i'm just having a bash to solve a problem. so excuse my ignorance if i've written crap
    any help would be gratefully received
    cheers
    if you wish you can email me direct at [email protected]

    The JRE 1.1 is very common because M$ uses this ancient version. But browserls like Opera and Netscape come together with newer versions of the JRE, at least 1.2 is used here.
    I think there is no way to use J3D together with the JRE 1.1 - and it is not recommended to use this much too old java version generally.

  • Jbuttons and applets and browsers

    hello folks. Well, I finally got my jbuttons to appear in by applet in ie5.5 and it is working fine except when someone resizes the browser window, the jbuttons dissapear. Does anyone know why this my occur? Does anyone know what I can do about it?
    The buttons are added to the panel and the panel into the container into init(). I add the container in paint(). Also in paint() I have .setVisible(true) for each button and the container.

    Hi!
    The reason why your buttons disappear is the layout you
    are using.
    Flow layout manager gives your components the prefered
    size.
    Grid layout manager does not.
    Border layout is a - let me say - a "mix" of both.
    If you use border layout with NORTH, SOUTH, EAST and
    WEST your components will be were they used to be.
    Add your buttons BorderLayout.SOUTH and they will
    stay there even if you resize.
    Somebody may correct me if I'm wrong.

  • Applets and Browsers

    Does anyone know why a very simple applet works correctly with applet viewer, but does not seem to do anything with Internet Explorer 5.0 or FrontPage 2000? Here a simple applet and html that I am using.
    //Applet Template
    import javax.swing.*; //has .JApplet
    import java.awt.Graphics;
    public class BrowserTest1 extends JApplet {
         public void paint(Graphics g)
              g.drawString("This is a test applet", 10,10);
    // html file shown below
    <HTML>
    <HEAD>
    <TITLE>
    APPLET TEST PAGE
    </TITLE>
    </HEAD>
    <BODY>
    <APPLET code="BrowserTest1.class" width=500 height="250">
    </APPLET>
    Applet should appear above
    </BODY>
    </HTML>

    I think questions like yours have been answered to many times. In case you haven't noticed, there is a search button...
    As a "quick" hint, you are using a Swing applet. For that kind of applets, there are special speps to follow...

  • Why do applets in browsers run slowly

    Now that I hav the Java compiler installed on my machine, applets execute slower than when I didnt have it installed. Whenever i encounter a page that has a Java applet, the Java console first loads automatically (which thakes about 30 secs and puts a java coffe cup in the lower left of my screen). Then I get a box on my screen where the applet will appear and all I see for a few seconds is a progress bar that says loading so and so class. Then the actual applet executes.
    Why does applet execution slow down when a Java compiler is installed? Before I downloaded and installed it, all the applets (from the sites I browsed) used to execute quickly. Also is there anything i can do to speed up things with applet execution so I dont have to wait, and 3everything is quick like it was before I installed the compiler?
    Lastly, if applet executions are slowed down, then why does every tutorial book ive read say java is fast?

    I suppose that you are talking about Internet Explorer and that you did not have SUN's Java Runtime Environment installed before installing the JDK.
    If that is the case, then the Java implementation you had before was from Microsoft. Their Java implementation is a highly outdated version of Java (version 1.1). However, it does have the advantage of being quite fast - especially the startup time is fast. Now you have a modern Java implementation (version 1.4) from SUN installed as a plug-in for IE. Unfortunately, the startup time is much slower than that of Microsoft's Java.
    There is not much you can do about this. But you can disable SUN's Java for applets in the Control Panel. It will then again use Microsoft's implementation for applets.
    Other people agree with you that the startup time is slow. There is an RFE on the Top25 list on this very matter: http://developer.java.sun.com/developer/bugParade/bugs/4607280.html
    Lastly, if applet executions are slowed down, then why
    does every tutorial book ive read say java is fast?Do they really? Fast compared to what?

  • Help with Applets causing Browsers (IE,NETSCAPE) to crash..?

    Whenever there is an applet on a website, and I view it in either IE or netscape, it always crashes the browser.
    I have downloaded the latest VM, so this isn't the problem. Any help would be great, thanks. :)

    "I have downloaded the latest VM, so this isn't the problem."
    Well, it might be. Your brower(s) might not support the JVM you have downloaded.
    Try this "Start | Programs | Java Plug-in Control Panel" and then try and run Version 1.1. Does it work?
    /Stephane

  • Applets on the Mac

    I am getting royally confused as to how to deploy applets in a way that will work on the Mac platform. I already know that the plugin2 mechanism as described in the current Java Tutorial under "Developing an Applet", i.e.,
    http://download.oracle.com/javase/tutorial/deployment/applet/deployingApplet.html
    won't work. But what exactly is the "old" mechanism? Is it what is described under "Deploying With the Applet Tag" (still in the current tutorial), i.e.,
    http://download.oracle.com/javase/tutorial/deployment/applet/html.html
    or do I need to go all the way back to pre-1.6 times, e.g., to this description:
    http://download.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/contents.html
    The discussion of the applet tag in these two documents is especially confusing. The current tutorial implies that it it still perfectly valid but the Java 1.5 plugin guide referenced above say: "The HTML specification states that the applet tag is deprecated, and that you should use the object tag instead. However, the specification is vague about how browsers should implement the object tag to support Java applets, and browser support is currently inconsistent. Sun therefore recommends that you continue to use the applet tag as a consistent way to deploy Java applets across browsers on all platforms." So, which is it: can we depend on the applet tag or not?
    Thanks a lot for any enlightenment.

    Thanks for the answer. I just coded a test applet without JNLP and using the applet tag and, glory be, it works in IE8! Presumably it works in IE9, too. As for IE7/6/5 etc, well, that's just too bad; it's high time to desupport these antiquities.
    OTOH a friendly tester told me that the plugin2 version of the applet works even on the Mac but only with the Chrome browser. I am baffled by this since I don't see what would make Chrome special (AFAIK it doesn't bundle its own Java) and would like it double-checked but, not having a Mac myself, I cannot investigate. Can anyone confirm of deny?

  • Applets and OC4J

    Hi,
    we have developed an applet which calls EJBs deployed in OC4J.
    The applet runs in the Java Plug-In 1.3.1. After granting the
    privileges 'java.io.SerializablePermission "enableSubstitution"'
    and 'java.lang.RuntimePermission "createClassLoader"' it
    really worked, except that after a reload of the document the
    browser hang, because the applet could not start. There is no
    exception in the Java console.
    1) Has anybody a clue where the problem is?
    2) Will a future release of OC4J support applets without granting
    these privileges, perhaps by supporting the standard RMI of sun.

    Hi Elmar,
    I'll respond to your questions in reverse order.
    2. OC4J doesn't "support" applets, web browsers do (MSIE and
    Netscape). Applet security restrictions are making you grant
    permissions to allow you applet to create a custom class loader.
    I really don't think these restrictions are going to be relaxed
    in future (rather the opposite, I would imagine, if anything).
    It is a known fact that Micro$oft Internet Explorer's JVM does
    NOT support RMI (even though there is a patch for RMI support
    buried deep in the bowels of Micro$oft's website), but if you are
    using the plug-in, then you should have no trouble using RMI from
    your applet.
    1. I'm just guessing, but it could be that your custom class
    loader class is being garbage collected by the web browser's JVM
    whenever you leave the web page with the applet in it, so that
    when you return to that web page, you can't reconnect to the EJB
    since you don't have the classes you need in order to do it. I
    suggest maybe moving your special class loading mechanisms to the
    "start" method of the applet instead of the "init" method.
    Good Luck,
    Avi.

  • Why Applet in the Java Card?

    I'm studying the Java Card and GP. I have one question which just hit my head.
    Why did the Java Card choose Applets? There are applications, servlets, and so on which can be developed using Java technology.
    Does anyone know?
    Thanks,
    Julie.

    No, Java Card applets run on the card. What runs off the card can be ANY language because that's what called middleware. It sits in the middle of the OS and the CAD. PCSC is a middleware. It's written in C. Java Cards don't know anything about an OS or middleware because all communications is to a CAD.
    As far as client side Java, that can be a Java Application, or a Java Applet for browsers.

  • No such method found...

    Hello everybody,
    following exception...
    java.lang.NoSuchMethodError: java/net/URL: method getQuery()Ljava/lang/String; not found
    was thrown when I tried running a simple test applet in browsers IE 5 and 5.5! the same worked with Netscape 6.2!!
    here is a part of the code...
    =========================================
    import java.net.*;
    String s = getDocumentBase().getQuery();
    System.out.println("s = "+s);
    =========================================
    is there something to do with the which version of JVM is running in IE?

    The method getQuery() has only been around since 1.3 and unless you have the plugin installed and you are using it, IE only supports JVM 1.1.8

  • Any lightweight version of JDBC or any way to trim the mysql jdbc driver?

    Hi, I am doing an web app in j2ee that also shows an applet in which a virtual 3d map is rendered. the applet is a kind of heavy so downloading it takes many time beucasse it has to download many things. Then I must use a database connection from the database to send things to my web server. The problem is that the jdbc driver is about 500k and I want to minimize the downloading time of the applet, is there any way to get a very very small version of JDBC???
    Or do I have to do my own type 2 jdbc??

    MelGohan wrote:
    The app will be in internet, and the clients will mostly use dial up at 36.6kbps. 500K is important considering they must download about 3 MB of the applet.Eek!
    Why use applets and browsers at all?
    You should have an installer that installs an application on the client box. And that uses TCP over the modem to communicate data and nothing else.
    Other than that it is certainly possible to set up the html pages such that the only down load updated components, and that includes the driver. Your application should be broken into pieces as well.
    By the way you did harden MySQL right? Because if you expose it to the internet directly it is going to get hit.

  • Why JApplet and JSP cannot connect to MySQL

    When i use applet connect to MySQL, it show that no suitable driver.
    My program is
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class fuck extends JApplet implements ActionListener
    private JButton bb = new JButton("update");
    private JTextArea aa = new JTextArea(1,7);
    private JTextArea ss = new JTextArea(1,7);
    private JPanel pp = new JPanel();
    public fuck()
    Container c=getContentPane();
    pp.add(aa);
    pp.add(ss);
    pp.add(bb);
    c.add(pp);
    bb.addActionListener(this);
    public void actionPerformed(ActionEvent ee)
    try
    Class.forName("org.gjt.mm.mysql.Driver");
    catch(ClassNotFoundException e)
    System.out.println(e.getMessage());
    try
    Connection con =
    DriverManager.getConnection("jdbc:mysql://localhost/air","root","");
    Statement st = con.createStatement();
    //PreparedStatement pst = con.prepareStatement(
    // "update aa set condition=? where temp=?");
    //pst.setInt(1,3);
    //pst.setString(2,"hg");
    //pst.executeUpdate();
    ResultSet rs=
    st.executeQuery("select * from aa");
    while (rs.next())
    aa.setText(rs.getString("temp"));
    ss.setText(rs.getString("condition"));
    st.close();
    con.close();
    catch(SQLException ex)
    System.err.println("SQLException:"+ex.getMessage());
    If I using JSP, it also have some condition

    Clearly it is in the classpath, otherwise the error would have been "Class not found". But here's a quote from the documentation for the driver, the part that explains how to make a connection:// The newInstance() call is a work around for some
    // broken Java implementations
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();The "broken Java implementations" it refers to are certain JVMs that run applets in browsers...

  • Strange behaviour with combo boxes.

    Has anyone else noticed strange behaviour of combo boxes with applets?
    What happens is that on selecting the combo drop down, the dialogue the combo is sitting on moves behind its parent window. You just end up seeing the combo list, and no dialogue. Select a combo item, and sometimes the dialogue reappears, and sometimes it is still hidden.
    I've only seen this whilst running an applet in browsers. In Eclipse I don't see the behaviour.
    The behaviour is also very intermittent.
    I'm using Java Plug-in 1.6.0_10-rc2, Using JRE version 1.6.0_10-rc2 Java HotSpot(TM) Client VM, on Windows Vista, Google Chrome browser.
    I'd raise it as a bug, it certainly seems quite serious, but I don't have a reliable test case.
    I have a work around, on all my dialogues with combo's on them, I have setAlwaysOnTop(true). Not really the correct behaviour though.

    GeoffTitmuss wrote:
    No, I believe I am just using Swing components.Ok, then I'm out of ideas

  • Mozilla requiring click to run jre 6 or  7 currently

    https://blog.mozilla.org/security/2013/01/11/protecting-users-against-java-vulnerability/
    "Mozilla is aware of a security vulnerability in the current version of Java (Java 7 Update 10) that is being actively exploited and affects any browser using the Java plugin."
    "There is no patch currently available for this issue from Oracle. To protect Firefox users we have enabled Click To Play for recent versions of Java on all platforms (Java 7u9, 7u10, 6u37, 6u38). Firefox users with older versions of Java are already protected by existing plugin blocking or Click To Play defenses."
    Well I don't see why they are requiring click to play with the jre 6 but they are. Thing is there are a lot of ways to
    call IE such as via MS Office as discussed here:
    http://www.kb.cert.org/vuls/id/625617
    So next month will be the last month that jre 6 users will get free updates and then we have to get jre updates
    from oracle support, right? Unfortunately the jre 7 is just not maturing properly. We need the jre 6 to continue!

    Note that oracle has released the jre 7u11 to patch the version 7 problems:
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    BTW I don't think the vendor took very long to fix this particular bug, it's just that there is a succession of them that has unfortunately greatly weakened the credibility of the 7 lineage. If only we could get some control over some aspects of this! Running forms as applets in browsers has too many points of failure. The browser can at any time suddenly decide to block or partly block launching applets, like mozilla click blocking 6u38 just because maybe the version 7 bug was more widespread as they said here:
    https://blog.mozilla.org/security/2013/01/11/protecting-users-against-java-vulnerability/
    "Why are you blocking the jre 6u38? I thought only 7 was vulnerable to these problems."
    "We are being extra cautious to ensure all users are protected in the event the scope of the vulnerability is larger than the initial reports have indicated. We are erring on the side of caution."
    Most browsers now autoupdate on their own so there is no telling what they may decide to do at any time. Mozilla has consistently for months refused to recognize the jre 6 lineage as valid and tries to get the users to upgrade to 7 which doesn't work with our forms due to the vendor having changed the vendor name in the jre.
    As you can see here Mozilla will not recognize 6u38 as a valid version of java and it has not even hit the end of life yet:
    https://www.mozilla.org/en-US/plugincheck/
    After february 2013 I fear firefox will totally block the jre 6 even if we keep getting up updated via oracle support. I don't know any browser that will accept more than one jre plugin at a time so it's not possible to run jre 6 requiring applets and jre 7 requiring applets. One would wish the vendor was working with the browser providers and solving some of these problems!
    Edited by: lake on Jan 14, 2013 8:51 AM

  • About Applet displaying in different browsers

    Hi,
    When I am running my applet application in mozilla and IE browsers, its running properly. But In some versions of IE its not working properly that is I have a JTable where I am using the filter option from JDK1.6, in this table i will get some request data through server, but when I am running the applet in IE6.0, its not working with properly. Any body come across with this type of issue in past give some suggestion or solution.
    Regards,

    Are you sure IE6 is using Sun's plugin 6?
    If I'm right, IE is using M$'s JRE plugin by default, leading to crappy and unpredicable behavior.

Maybe you are looking for

  • Miro no. range error

    while miro posting error msg" In company code 1200(ccode), the number range 51 is missing for the year 2010",how i can know the object to maintain no range in snum. regards, nishith

  • Can't create a temporary document from an XmlInputStream

    Attempts to create an XmlDocument fail when reading it from an XmlInputStream MainXmlInput.java package com.kitfox.dbtest; import com.sleepycat.db.DatabaseException; import com.sleepycat.db.Environment; import com.sleepycat.db.EnvironmentConfig; impo

  • How do you create monthly/ weekly calendars in Visual web pack?

    Would anyone have suggestions on how you would create monthly/ weekly/ daily calendars as in the example below, and populate them with data from a database. http://coba.usf.edu/departments/isds/faculty/agrawal/projects/java/cal.gif This example is fr

  • How do i get itunes to download on my external, and not my desktop?

    I've been trying to get iTunes to download in my external hard drive instead of on my desktop; but every time I download iTunes it starts downloading automaticly onto the desktop. I don't have enough memory on my desktop to transfer all my music onto

  • Photoshop layers palette greyed out

    I just upgraded from MacOSX 10.5.8 to 10.6 and using Photoshop CS4. Not sure if this is related to what happened today, but... "About Photoshop" is greyed out. Can't tell what version I have. I need to duplicate a layer in a high res RGB image. The L