Applet notinited .. it runs in eclipse, but not in web browser --urgent

hi,
firstly i'm sorry for the "urgent" remark in the title, but I actually really need some help to this problem, since I have to pass up this assignment in about 2 more hours.
on to the question,this is my full code:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
public class reza extends JApplet{
     public static void main(String[] args){
          JFrame myWindow = new JFrame("Sample reza");
          myWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          reza testReza = new reza();
          myWindow.setContentPane(testReza);//add to the window
          myWindow.pack();
          myWindow.setVisible(true);
     double sum;     //sum of values entered by user
     private ImageIcon board;
     private JPanel topPanel,boardPanel;
     private JLabel l1,l2,l3,l4,l5,l6,lTotal,lAndryusha,lBorya,lVolodya,lGiveUp,lGiveUp2,boardLabel,lRules;
     private JTextField a[],aTotal, b[], bTotal, c[], cTotal;
     private JButton clear,checkAnswer,solve;
     private Container container;
     String A1,A2,A3,A4,A5,A6,ATOTAL,B1,B2,B3,B4,B5,B6,BTOTAL,C1,C2,C3,C4,C5,C6,CTOTAL;
     public reza(){
          container = getContentPane();
         container.setLayout(new BorderLayout());
         topPanel = new JPanel(new GridLayout(6,8,5,5));
         boardPanel = new JPanel(new GridLayout(1,2,5,5));
         board = new ImageIcon("board.jpg");
         boardLabel = new JLabel(board);
         topPanel.setBackground(Color.WHITE);
         boardPanel.setBackground(Color.white);
         //utk handle button clear ngan solve
         ButtonHandler handler = new ButtonHandler();
         lGiveUp = new JLabel("           Give up?");
         lGiveUp2 = new JLabel("Press this >>>");
         lRules = new JLabel("Rules: User may only use the number shown in the dart board");
         l1 = new JLabel("   1");
         l2 = new JLabel("   2");
         l3 = new JLabel("   3");
         l4 = new JLabel("   4");
         l5 = new JLabel("   5");
         l6 = new JLabel("   6");
         lTotal = new JLabel("   Total");
         lAndryusha = new JLabel("Andryusha");
         lBorya = new JLabel("Borya");
         lVolodya = new JLabel("Volodya");
         a = new JTextField[7];
         b = new JTextField[7];
         c = new JTextField[7];
         aTotal = new JTextField();
         bTotal = new JTextField();
            cTotal = new JTextField();
            clear = new JButton("CLEAR");
         solve = new JButton("SOLVE");
         checkAnswer = new JButton("ANSWER");
         topPanel.add(new JLabel("       "));
         topPanel.add(l1);
         topPanel.add(l2);
         topPanel.add(l3);
         topPanel.add(l4);
         topPanel.add(l5);
         topPanel.add(l6);
         topPanel.add(lTotal);
         topPanel.add(lAndryusha);
         int i=1;
         for (i=1;i<=6;i++){
              a[i] = new JTextField();
              a.getDocument().addDocumentListener(new textFieldListenerA());
          topPanel.add(a[i]);
     topPanel.add(aTotal);
     topPanel.add(lBorya);
     for (i=1;i<=6;i++){
          b[i] = new JTextField();
          b[i].getDocument().addDocumentListener(new textFieldListenerB());
          topPanel.add(b[i]);
     topPanel.add(bTotal);
     topPanel.add(lVolodya);
     for (i=1;i<=6;i++){
          c[i] = new JTextField();
          c[i].getDocument().addDocumentListener(new textFieldListenerC());
          topPanel.add(c[i]);
     topPanel.add(cTotal);
     clear.addActionListener(handler);
     solve.addActionListener(handler);
     checkAnswer.addActionListener(handler);
     topPanel.add(new JLabel(" "));
     topPanel.add(new JLabel(" "));
     topPanel.add(new JLabel(" "));
     topPanel.add(new JLabel(" "));
     topPanel.add(new JLabel(" "));
     topPanel.add(new JLabel(" "));
     topPanel.add(clear);
     topPanel.add(solve);
     topPanel.add(new JLabel(" "));
     topPanel.add(lGiveUp);
     topPanel.add(lGiveUp2);
     topPanel.add(checkAnswer);
     topPanel.add(new JLabel(" "));
     topPanel.add(new JLabel(" "));
     topPanel.add(new JLabel(" "));
     topPanel.add(new JLabel(" "));
     boardPanel.add(boardLabel,BorderLayout.WEST);
     boardPanel.add(lRules,BorderLayout.EAST);
     container.add(boardPanel,BorderLayout.NORTH);
     container.add(topPanel,BorderLayout.CENTER);
     setSize(750,700);
     setVisible(true);
     class textFieldListenerA implements DocumentListener{
          public void insertUpdate(DocumentEvent e){
               int i,count=0;
               for (i=1;i<=6;i++){
                    try{                    
                         count = count + Integer.parseInt(a[i].getText());
                    }catch(Exception e1){
               aTotal.setText("" + count);
          public void changedUpdate(DocumentEvent e){
          public void removeUpdate(DocumentEvent e){               
     class textFieldListenerB implements DocumentListener{
          public void insertUpdate(DocumentEvent e){
               int i,count=0;
               for (i=1;i<=6;i++){
                    try{                    
                         count = count + Integer.parseInt(b[i].getText());
                    }catch(Exception e1){                         
               bTotal.setText("" + count);
          public void changedUpdate(DocumentEvent e){
          public void removeUpdate(DocumentEvent e){               
     class textFieldListenerC implements DocumentListener{
          public void insertUpdate(DocumentEvent e){
               int i,count=0;
               for (i=1;i<=6;i++){
                    try{                    
                         count = count + Integer.parseInt(c[i].getText());
                    }catch(Exception e1){
               cTotal.setText("" + count);
          public void changedUpdate(DocumentEvent e){
               int i,count=0;
               for     (i=1;i<=6;i++){
                    try{                    
                         count = count + Integer.parseInt(c[i].getText());
                    }catch(Exception e1){
               cTotal.setText("" + count);
          public void removeUpdate(DocumentEvent e){
               int i,count=0;
               for (i=1;i<=6;i++){
                    try{                    
                         count = count + Integer.parseInt(c[i].getText());
                    }catch(Exception e1){
               cTotal.setText("" + count);
     private class ButtonHandler implements ActionListener{
          //handle button event
          public void actionPerformed(ActionEvent event){
               //clear all the text fields
               if (event.getActionCommand().equals("CLEAR")){
                    int i=0;
                    for (i=1;i<=6;i++){
                         a[i].setText("");
                    aTotal.setText("");
                    for (i=1;i<=6;i++){
                         b[i].setText("");
                    bTotal.setText("");
                    for (i=1;i<=6;i++){
                         c[i].setText("");
                    cTotal.setText("");                    
               else if (event.getActionCommand().equals("SOLVE")){
                    int aCount[],bCount[],cCount[],i,aTotal=0,bTotal=0,cTotal=0;
                    aCount = new int[7];
                    bCount = new int[7];
                    cCount = new int[7];
                    //make sure all fields have been filled in
                    if (a[1].getText().equals("") || a[2].getText().equals("") || a[3].getText().equals("")|| a[4].getText().equals("")|| a[5].getText().equals("")|| a[6].getText().equals("")|| b[1].getText().equals("")|| b[2].getText().equals("")|| b[3].getText().equals("")|| b[4].getText().equals("")|| b[5].getText().equals("")|| b[6].getText().equals("")|| c[1].getText().equals("")|| c[2].getText().equals("")|| c[3].getText().equals("")|| c[4].getText().equals("")|| c[5].getText().equals("")|| c[6].getText().equals("")){
                         JOptionPane.showMessageDialog(null,"Please fill in ALL the scores!!");
                    //if yes, then only proceed
                    else{
                         //for andryusha
                         for (i=1;i<=6;i++){
                              try{
                                   aCount[i] = Integer.parseInt(a[i].getText());
                                   aTotal = aTotal + aCount[i];
                              }catch(Exception e1){
                         //check andryusha's 1st and 2nd shots. They must be equal to 22 when added
                         if (aCount[1] + aCount[2] != 22){
                              JOptionPane.showMessageDialog(null,"Andryusha's 1st + 2nd shots must be equal to 22!!");
                         if (aTotal==71){
                              JOptionPane.showMessageDialog(null,"Andryusha's scores is right! Well done!!");
                         }else if (aTotal !=71){
                              JOptionPane.showMessageDialog(null,"You got it wrong for Andryusha's scores. Please try again.");
                         //for Borya
                         for (i=1;i<=6;i++){
                              try{
                                   bCount[i] = Integer.parseInt(b[i].getText());
                                   bTotal = bTotal + bCount[i];
                              }catch(Exception e1){
                         if (bTotal==71){
                              JOptionPane.showMessageDialog(null,"Borya's scores is right! Well done!!");
                         }else if (bTotal !=71){
                              JOptionPane.showMessageDialog(null,"You got it wrong for Borya's scores. Please try again.");
                         //for Volodya
                         for (i=1;i<=6;i++){
                              try{
                                   cCount[i] = Integer.parseInt(c[i].getText());
                                   cTotal = cTotal + cCount[i];
                              }catch(Exception e1){
                         if (cCount[1] != 3){
                              JOptionPane.showMessageDialog(null,"Volodya's first score is wrong!!");
                         if (cTotal==71){
                              if (cCount[2] == 50 || cCount[3] == 50 || cCount[4] == 50 || cCount[5]==50 || cCount[6]==50){
                                   JOptionPane.showMessageDialog(null,"Volodya's score is right! Well done!!");
                              }else if (cCount[2] != 50 && cCount[3] != 50 && cCount[4] != 50 && cCount[5]!=50 && cCount[6]!=50){
                                   JOptionPane.showMessageDialog(null,"Volodya hits the bull's eye once!!");
                         }else if (cTotal!=71){
                              JOptionPane.showMessageDialog(null,"Volodya's score is wrong!!");
               }else if(event.getActionCommand().equals("ANSWER")){
                    a[1].setText("20");
                    a[2].setText("2");
                    a[3].setText("25");
                    a[4].setText("3");
                    a[5].setText("20");
                    a[6].setText("1");
                    aTotal.setText("71");
                    b[1].setText("25");
                    b[2].setText("20");
                    b[3].setText("20");
                    b[4].setText("3");
                    b[5].setText("2");
                    b[6].setText("1");
                    bTotal.setText("71");
                    c[1].setText("3");
                    c[2].setText("50");
                    c[3].setText("10");
                    c[4].setText("5");
                    c[5].setText("2");
                    c[6].setText("1");
                    cTotal.setText("71");
     }//end private class ButtonHandler
I run the program using Eclipse; run as> Java applet
and in runs perfectly well. I then tried running it using internet explorer and firefox, but only a gray box appeared and the browser says "applet notinited" and "Loading Java Applet Failed.."
what did i do wrong? any help is really appreciated.. thanks

thank God i already found the cause of the problem..
it's because the application has an ImageIcon which links to a local jpeg file, so perhaps security restriction on the browser doesn't allow my applet to access local file, that's why it fails to load.
either using signed applet (not tested) or removing the picture solved my problem.
thanks anyway :)

Similar Messages

  • New Install - Can access the internet but not with Web Browser

    I just installed Solaris 10 11/06 with my new Ultra 20 M2 workstation. I can ping, complete NSLOOKUP commands on public domain names and can telnet; however, when I try to use the browser it says it cannot connect to the internet. I made sure of the following:
    - Web Browser is not using proxy
    - resolv.conf is accurate
    - defaultrouter is accurate
    - hosts, hostname.. are good
    - netmasks is fine.
    Any thoughts? thanks for your help.

    Is there a firewall between the server and the internet, try telneting the fully qualified domain name again but on port 80 (or 8080) (i.e. telnet www.yahoo.com 80), do you have another machine on this network that can access the internet through a browser (if so check it's settings) also if you have an intranet see if the browser can access that, if these don't work then the problem is settings\config in your browser.
    also try a traceroute and see where the packets are routed and how many hops it takes.

  • Applet works on eclipse but not on reg browser (not inited error)

    Hi everybody,
    I've just made an applet, but I don't know why it can't be shown. I'm working with Eclipse, and when I run the .java file, everything works fine. It even works fine when I specify parameters through the eclipse build file parameter arguments.
    Now I would like this to work by using the appletviewer and my html file. When I do this, the application doesn't work anymore and I get this error: Start applet not inited and shows loading java Applet failed when I scroll over to the java applet box on the browser. (Mozilla)
    I used this code in the html file:
    <html>
    <head>
    <title>MicroToolBus Example Plugin Applet 2 </title>
    </head>
    <body>
    <h1>MicroToolBus Example Plugin Applet 2 </h1>
    <hr>
    <applet code =MicroToolBus.class width=400 height=100>
    <param name="ModelName" value="edu.vt.vbi.pathport.client.plugin.microarray.MicroarrayModel">
         <param name="DataLocation" value="c:/eclipse/workspace/PathPort/xml/samples/mageml/pmml.xml">
    </applet>
    </hr>
    </body>
    </html>
    which is located at
    C:\eclipse\workspace\PathPort\build\edu\vt\vbi\pathport\client\toolbus\MicroToolBus.html
    The MicroToolBus.class file is located in the same directory. What am I doing wrong. I tried putting the class file and the html in the same directory as the actual .java file of the applet, but that didn't seem to work either. Thanks in advance; your help and suggestions are much appreciated,

    What am I doing wrong?Your getting caught in the Sun/Microsoft war. Numerous casualties. For rehab, see:
    http://www.MartinRinehart.com
    Click "Articles", "Launching Applets".
    Warning: make a big mug of java before you start. This is not trivial stuff.

  • Applet working perfectly in the appletviewer but not in the browser

    I have tried everthing that came upto mind to get the applet working in the browser, which includes
    using of the HTML Converter, downloading the java plugin, newest netscape nevigator6.23 and installing j2sdk 14. still i am unable to get the applet working in the browser where as it works perfectly fine in the appletviewer. Applet takes the gif name and the time deplay to dipaly the pictures after the delay.

    Can we see the HTML source code .and hope ur using the <object > or <embed> tag ..

  • I am having trouble with CSS.  Displays right in DW but not in web browser

    Hello,
    I am having difficultiy getting my webpage to look the way it does in Dreamweaver in a browers (All 5 of them).  My problems are with:
    - Title Heading Content
    - Sidebar
    I have two lines in my heading with the name of the organization.  I made two rules.  Header H1 and a sub header.  For some reason while previewing them in a browser there is a gap between the two words.  But in DW there is not.  I do not want the gaps.  How can I fix it?
    In a browser the side bar does not come all the way down.  There is a small gap between it and the footer.  Like the other problem this does not appear in DW only in the browers.
    Any help would be appreciated!  I am still learning CSS.
    I believe these are the only two files you need to look at.
    Thanks for the help!

    Also how can you see if your ISP offers the free web server space?
    Contact your internet service provider (ISP).  Often this is your telephone or cable broadband provider too.  If not, there are many free or very low cost remote server hosts around.   Do a Google search.
    I did do the validator and it told me I was fine.  I did not do a CSS one though.
    Good. So we know it's not an HTML error.  Get the FF Web Developer Toolbar.  It permits you to edit CSS in your browser to see how changes effect the layout plus a lot of other cool stuff.
    Sorry I'm still new to all of this.
    Don't fret, Tim. We all started in the same place.  You'll catch on soon enough. 
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Applet Works in Eclipse but not Online?

    I've got everything working in eclipse but now when I uploaded it to unix it wouldn't run. Any ideas? I chmod 664 all the java and class files. It won't print to the TextArea for some reason when I uploaded it.
    Here is my source
    http://www2.hawaii.edu/~akinsey/CD.java
    http://www2.hawaii.edu/~akinsey/CDStorage.java
    http://www2.hawaii.edu/~akinsey/CDStorage.html
    That will all compile and run in eclipse but doesn't work online :(

    If it runs in Eclipse, but not when deployed, the problem is probably classpath or security related. This is why those of us who use Eclipse in real production work, rarely use its builds. I always build with ANT and never run from within Eclipse. I alway use what Eclipse calls an "Externally Launched Server".

  • I can't figure out why this page splits in live preview... but not in the browser?

    I've finally got my site up and it all runs great... except I can't figure out why this one page behaves like it's too wide.
    http://www.johnnez.com/mainbooks.html
    It comes apart in the Live Preview.... but not in the browser preview.
    Thanks for any tips...
    jn

    john nez wrote:
    HTML is a total incrutable mystery to me... a mystery inside a mystery inside a mystery!
    Sounds to me like you've almost cracked it!
    You have one error that could cause problems and that's the stray </blockquote> tag.  Just delete it.
    The alt="" text will show as an error on the validator but that's easy to fix and worth doing.
    Here's an easy article on that: http://www.456bereastreet.com/archive/200412/the_alt_and_title_attributes/
    In one of your CSS files (JonzheaderindexCSS.css) you have this:
    body {
    margin-top: 20px;
    padding: 0;
    color: #666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: normal;
    background-attachment: fixed;
    background-color: #E1B852;
    background-image: url(../images/orange%20plaid.jpg);
    background-repeat: repeat;
    html { overflow-y: scroll; }
    It should be like this:
    html {
    overflow-y: scroll;
    body {
    margin-top: 20px;
    padding: 0;
    color: #666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: normal;
    background-attachment: fixed;
    background-color: #E1B852;
    background-image: url(../images/orange%20plaid.jpg);
    background-repeat: repeat;
    It looks like you have that rule repeated further down the page like this:
    html { overflow-y: scroll; }
    There's an extra curly brace there (}) anyway, so it is badly formed but the whole rule and extra curly brace can go.
    You can fix those errors but I have a sneaky suspicion that it isn't gong to solve the issue you describe.
    Fix those issues anyway and post back.  Maybe if you can show a screen shot of what you are seeing in DW it might help?
    Martin
    PS: It's never a good idea to have file names on the web that have spaces in.  Your background rule has this:
    background-image: url(../images/orange%20plaid.jpg);
    That .jpg should be orangeplaid.jpg or orangePlaid.jpg or orange_plaid.jpg and the change should be reflected in the reference to the image so, orangePlaid.jpg should be:
    background-image: url(../images/orangePlaid.jpg);

  • Flash work in preview but not in the browser!?

    Hi there:)
    I have a .swf file in a table in Dreamweaver. When I preview it in place and in Safari, it plays. When I upload eveything, it is not in any browser on the server.. any ideas?
    Thanks!
    V

    Hi John!
    Yes, sorry about that.. here it is.
    http://farmingtonfarm.com/appraisal.html
    Thanks for your help!!
    v
    Date: Thu, 8 Apr 2010 18:52:05 -0600
    From: [email protected]
    To: [email protected]
    Subject: flash work in preview but not in the browser!?
    Can't really help without a link to the site. Can you provide one?
    >

  • Is it possible to run a java application within a web browser?

    Hello everyone here! I have a question about running a java application within a web browser and I would appreciate it very much if anyone here can give me some answers.
    I have a standalone java application written with AWT. Basically this free application lets users to select spectral lines from a big file based on some criteria and plot those selected lines. Yes, it is a very simple application. Now I want to run this application within a web browser so that users don't need to download the application from the ftp site and thus don't need to install in their machine. Is it possible to run this application within browser? If yes, can we get the same plotting function as we run the application separately and where should I start out?
    Thanks in advance!
    kuilian

    Please see the signed applet discussion group for details of how to avoid the applet security restrictions. You can sign the applet, or use the policy file containing {AllPermission} for testing purposes (though not suitable for widespread deployment).
    Regards
    Matthew

  • Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Hi I would like to know, how do I add a Hyperlink on Flash, that opens a PDF in adobe reader and not the web browser.

    Yoh, what is FSCCommanr ? sorry man I am an absolute beginner in Flash. I tried the code:
    /* Click to Go to Web Page
    Clicking on the specified symbol instance loads the URL in a new browser window.
    Instructions:
    1. Replace http://www.adobe.com with the desired URL address.
       Keep the quotation marks ("").
    instance_name_here.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
    function fl_ClickToGoToWebPage(event:MouseEvent):void {
      navigateToURL(new URLRequest("http://www.adobe.com"), "_blank");
    this is the same code I used before and it opens a pdf file in a web browser, and it doesn't open an AutoCAD file.

  • MBA not opening web browser after WiFi connection

    MBA not opening web browser after WiFi connection.  Browser (Safari) starts and stalls frequently.  My MacBook Pro whoks fine on my same WiFi using Airport Extreme.  any suggestions?

    Hello,
    The closest Microsoft forum would be the
    Windows 7 forum on Microsoft Community.
    However, this is not a Microsoft product, so I'd ask on
    http://help.ask.com/link/portal/30015/30018/ArticleFolder/9/Ask-com-Q-A-Community
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog:http://unlockpowershell.wordpress.com
    My Book:Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • My applet can access an image in Eclipse, but not when I put it online...

    Basically, I have an applet that displays images among other things.
    I stuck the images in the bin directory, and when I run the applet from Eclipse, there's no problem.
    But when I put the applet on my webpage, it crashes with a NullPointerException because
    image = ImageIO.read( new File( imageName ) ) can't seem to get the image.
    The images are in the same directory as my class files. I tried turning on all permissions.
    My html code is very simple:
    <applet code="ImageGenerator.class" width=1000 height= 500> </applet>
    Am I missing anything?
    Any idea what the problem is?

    Meteor,
    Can you shed some light on how big these files are?
    If these images are 200K each and you have 10 of them, then you're loading 2MB across the network each time the application loads. Depending on what you are doing, that may not be a good design.
    If these slow-loading images are needed right away, then embed them with your applet (preferably a Jar) and they should load pretty fast.
    If these slow-loading images are needed later, then thread the loading of them to a background task and use some form of visual feedback (like a "please wait" image) until they're finished.
    Lastly, if these images are relatively small and you are experiencing a significant speed difference between accessing them locally (such as on the server's file system or through a mapped-drive) and accessing them through http (or url, etc) then make sure your web server is feeding them up in a timely fashion and that there's no outstanding issues with the URL loading method and the Java version you're using.
    Please read Andrew's posts closely as you should not be designing an applet that loads files as a local resource unless you really need to. Signing the applet will allow you to save them locally to the filesystem (as a "cached" version to be loaded later), but don't try to load the images as files directly from the web server's file system. The signed applet will only be able to access the local file system of the station it's being run on, hence, usually not the server!
    As far as caching the files locally, Java webstart has potentially a better ways of doing that sort of stuff for you.
    -Tres

  • Native library working in Eclipse but not in command line ...

    I was working on a Nutch project combing CMeCab with the analyzer.
    It uses:
    System.load('CMeCab');
    where the problem occured. I have the file libCMeCab.so in /usr/lib/ and it was working fine inside eclipse.
    But when I complie with ant (by the way I'm not familiar with this great tool, but followed the easy tutorial), and then run everything inside terminal like normal Nutch project. Everything was fine until the index process which uses native library CMeCab to analyze.
    The error was:
    java.io.IOException: Job failed!
    And in the hadoop.log in detail:
    java.lang.UnsatisfiedLinkError: no CMeCab in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
         at java.lang.Runtime.loadLibrary0(Runtime.java:823)
         at java.lang.System.loadLibrary(System.java:1028)
    I didn't have runtime -D option in Eclipse run configuration for library path, and didn't know what was the difference that's causing the trouble. I googled trying hard, but most of the MeCab documentations is in Japanese and merely had the problem I had.
    Please help me.
    Thanks in advance.

    Hello,
    I was working on a Nutch project combing CMeCab with the analyzer.No idea what Nutch and CMeCab are (but apparently this latter has unkempt hair ;o).
    I didn't have runtime -D option in Eclipse run configuration for library path, and didn't know what was the difference that's causing the trouble.I won't know either why it works in Eclipse, but have you tried adding -Djava.library.path=/usr/lib to the command line, to check how it works? If it works, would this be a problem to use this configuration?
    Regards,
    J.

  • Mail.jar javabeans runs in beans but not in browser

    I have added the mail.jar to java beans and have written a program to access smtp mail
    The program compiles and runs ok in the beans development client but when i try to run it outside of beans in a web browser it wont run.
    If I then remove the Mail part from the program it will run outside of beans.
    I have added the mail.jer to the library within beans
    The exception im getting points to the Mail.jar being missing.
    Is there any other way to register the mail.jar with java beans or even with the javac compiler.
    Thanks in advance

    I include the full code im trying to get to work outside of the design environment. I tried adding the path of the mail.jar to the html path but it did absolutely nothing. I cannot find any reason why this code works in the designer and not outside of it. Works great in and out of the designer without the mail.jar library. Once the mail.jar library is there it will only work in the designer. I would have thought during the packaging process the designer would pass over all of the relative files and settings ready for deployment as it does with running in the designer but apparently not.
    package request;
    import java.awt.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    public class request extends java.applet.Applet{
         Button sendrequest,clear;
         TextField tex1,tex2,tex3,tex4,tex5;
    @Override
         public void init(){
              setLayout(new GridLayout(6,2,2,5));
              add(new Label("Customer Name"));
              tex1=new TextField(22);
              add(tex1);
              tex2=new TextField(22);
              add(new Label("Account Number"));
              add(tex2);
              tex3=new TextField(22);
              add(new Label("Viewing Card Number"));
              add(tex3);
              tex4=new TextField(22);
              add(new Label("Request Type"));
              add(tex4);
              tex5=new TextField(22);
              add(new Label("Request Reason"));
              add(tex5);
              sendrequest = new Button("Send Request");
              add(sendrequest);
              clear=new Button("Clear");
              add(clear);
    @Override
         public boolean action(Event evt,Object arg){
              if(evt.target instanceof Button){
    try {
    makechoice((Button) evt.target);
    } catch (Exception ex) {
    Logger.getLogger(request.class.getName()).log(Level.SEVERE, null, ex);
                   return true;
              } else return false;
         void makechoice(Button b) throws Exception{
              if (b==sendrequest){
                   String mess=null;
                   Date date;
                   date=new Date();
                   mess=date.toString() + "\r\n";
                   mess=mess + "Customer Name: "+ tex1.getText() + "\r\n";
                   mess=mess + "Account Number: "+ tex2.getText() + "\r\n";
                   mess=mess + "Card Number: "+ tex3.getText() + "\r\n";
                   mess=mess + "Request Type: "+ tex4.getText() + "\r\n";
                   mess=mess + "Request Reason: "+ tex5.getText() + "\r\n";
    postmail(mess);
    }else {
                   tex1.setText("");
                   tex2.setText("");
                   tex3.setText("");
                   tex4.setText("");
                   tex5.setText("");
    void postmail(String mess) throws MessagingException
    boolean debug = false;
    String recipient="YOUR EMAIL ADDRESS HERE";
    String subject="change request";
    String from="YOUR EMAIL ADDRESS HERE";
    //Set the host smtp address
    Properties props = new Properties();
    props.put("mail.smtp.host", "YOUR SMTP SERVER ADDRESS HERE");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, null);
    session.setDebug(debug);
    // create a message
    Message msg = new MimeMessage(session);
    // set the from and to address
    InternetAddress addressFrom = new InternetAddress(from);
    msg.setFrom(addressFrom);
    InternetAddress addressTo = new InternetAddress(recipient);
    msg.setRecipient(Message.RecipientType.TO, addressTo);
    // Setting the Subject and Content Type
    msg.setSubject(subject);
    msg.setContent(mess, "text/plain");
    Transport.send(msg);
    }

  • I want a user to use only import, it run with export but not import

    Hi,
    i create a user for use only for import and for export.
    batch_export with exp_full_database role <- It run
    batch_import with imp_full_database role <- don't run
    P:\>sqlplus batch_export/batch
    SQL*Plus: Release 10.1.0.2.0 - Production on Lun. Ao¹t 21 17:21:58 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-00604: une erreur s'est produite au niveau SQL rÚcursif 1
    ORA-20000: Connexion refusee
    ORA-06512: Ó ligne 41
    Entrez le nom utilisateur :
    P:\>sqlplus batch_import/batch@rfsage
    SQL*Plus: Release 10.1.0.2.0 - Production on Lun. Ao¹t 21 17:03:36 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ConnectÚ Ó :
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    the trigger as run
    create or replace trigger batch_export.check_connexion after logon on database
    declare
    V_MODULE SYS.V_$SESSION.module%TYPE;
    V_TERMINAL SYS.V_$SESSION.terminal%TYPE;
    V_SID SYS.V_$SESSION.SID%TYPE;
    V_SERIAL SYS.V_$SESSION.SERIAL#%TYPE;
    V_COMMAND varchar2(100);
    V_CURRENT_USER varchar2(20);
    V_CURRENT_SID SYS.V_$SESSION.SID%TYPE;
    cursor connexion is
    select substr(module,1,7) module, substr(terminal,1,12) terminal, sid, serial# from v$session T1 where schemaname='BATCH_EXPORT';
    cursor ID_CUR is
    select user from dual;
    cursor SID_CUR is
    select SYS_CONTEXT('USERENV','SID') sessionid from dual;
    --select SYS_CONTEXT('USERENV','CURRENT_USERID') current_userid from dual;
    Begin
    open SID_CUR;
    loop
    fetch SID_CUR into V_CURRENT_SID ;
    EXIT WHEN SID_CUR%NOTFOUND;
    dbms_output.put_line('V_CURRENT_SID:'||V_CURRENT_SID);
    end loop;
    close SID_CUR;
    open ID_CUR;
    loop
         fetch ID_CUR into V_CURRENT_USER ;
         EXIT WHEN ID_CUR%NOTFOUND;
         if V_CURRENT_USER='BATCH_EXPORT' then
         open connexion;
         loop
              fetch connexion into V_MODULE,V_TERMINAL,V_SID,V_SERIAL ;
              EXIT WHEN connexion%NOTFOUND;
              if V_MODULE<>'EXP.EXE' then
              dbms_output.put_line('V_SID:'||V_SID);
              dbms_output.put_line('V_CURRENT_USER:'||V_CURRENT_USER);
                   if V_CURRENT_SID=V_SID then
                   dbms_output.put_line('MODULE:'||V_MODULE);
                   RAISE_APPLICATION_ERROR (-20000,'Connexion refusee');
                   end if;
              end if;
         end loop;
         close connexion;
         end if;
    end loop;
    close ID_CUR;
    End;
    as the same for import user.
    I try with role in trigger but it don't, i see this in forum Oracle.
    But i think EXP_FULL_DATABASE have not DBA rule, but IMP_FULL_DATABASE have.
    How i do this ?
    I want just to use a user to imp utilities, but not connexion in sqlplus.
    Thanks for your help
    Christophe

    thanks for your help.
    it run !
    for example :
    as the system user
    SQL> INSERT INTO PRODUCT_USER_PROFILE values ('SQL*Plus', 'BATCH', 'CONNECT',null,null, 'DISABLED', NULL, NULL);
    1 ligne créée.
    SQL> grant create session to batch;
    Autorisation de privilèges (GRANT) acceptée.
    SQL> INSERT INTO PRODUCT_USER_PROFILE values ('SQL*Plus', 'BATCH', 'SELECT',null,null, 'DISABLED', NULL, NULL);
    1 ligne créée.
    the result
    oracle@debian:~$ sqlplus batch/batch;
    SQL*Plus: Release 10.2.0.1.0 - Production on Mar. Août 22 06:53:00 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connecté à :
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select user from dual;
    SP2-0544: Commande "select" désactivée dans le profil utilisateur du produit
    SQL>
    oracle@debian:~$ exp batch/batch owner=batch file=test.dump
    Export: Release 10.2.0.1.0 - Production on Mar. Août 22 06:54:32 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connecté à : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export fait dans le jeu de car WE8DEC et jeu de car NCHAR AL16UTF16
    le serveur utilise le jeu de caractères WE8ISO8859P1 (conversion possible)
    Prêt à exporter les utilisateurs spécifiés ...
    . export des actions et objets procéduraux de pré-schéma
    . export des noms de bibliothèque de fonctions étrangères pour l'utilisateur BATCH
    . export des synonymes de type PUBLIC
    . export des synonymes de type PRIVATE
    Thanks for all

Maybe you are looking for

  • ITunes sharing between accounts on same Mac

    Hello, Is there a way to share iTunes content (music, movies, etc.) between different user accounts on the same Mac? We have a "family" iMac with different login accounts (me, my spouse and our kids). When my spouse or kids are logged on as themselve

  • How do I insure that Firefox is my full-time browser -- I was using Internet Explorer prior to downloading Firefox. Shud I delete Internet Explorer?

    I want to only use Firefox as my full-time browser. I do not want to use Internet Explorer because it doesn't work on a web site I want to use, but Firefox does work. All I want to know is how do I insure that Firefox will be my full-time browser?

  • Create an Application Object schedule from command line?

    Hi everyone - long-time lurker, first-time poster here. Is there a way create an availability schedule for an Application Object via a command line (or any other programmatic method)? The utilities I've obtained from Cool Solutions are great for repl

  • Linking to PDFs

    Ok, heres a quick run through of the issue i've been having. When I want the captivate file to link to a pdf file I use the link to file option on a click button and pop in the URL of the PDF document. Only problem is when the user clicks on the butt

  • My ipad 2 won't update past 5.1.1

    I have an iPad 2 with IOS 5.1.1.  When I try to update, either by device or iTunes, it stays system is up-to-date already.  I have already reset the device twice.  I would like to upgrade this to IOS6 or higher.  Does anyone have any further suggesti