Java GUI updates

Hey. I'm having issues where elements of my GUI that I am updating are plain not showing or they're flickering on updates rather than running smoothly. Any help would be greatly appreciated. I've included methods that I feel might be of use below.
     public void mouseDragged(MouseEvent event) {
          if(
                    event.getLocationOnScreen().x < 700 && event.getLocationOnScreen().x > 100 &&
                    event.getLocationOnScreen().y > 100)
               if(oldSource != null)
                    eraseRectangle(oldLocation, oldSource);
               Point newPoint = calculateRectangle(event.getLocationOnScreen(), event.getSource());
               drawRectangle(newPoint, event.getSource());
               oldLocation = newPoint;
               oldSource = event.getSource();
     public void mouseReleased(MouseEvent event) {
          // REMOVE RECTANGLE
          if(oldSource != null)
               eraseRectangle(oldLocation, oldSource);
     public void mousePressed(MouseEvent event) {          
          //DRAW RECTANGLE
          if(
                    event.getLocationOnScreen().x < 700 && event.getLocationOnScreen().x > 100 &&
                    event.getLocationOnScreen().y > 100)
                         Point newPoint = calculateRectangle(event.getLocationOnScreen(), event.getSource());
                         drawRectangle(newPoint, event.getSource());
                         oldLocation = newPoint;
                         oldSource = event.getSource();
                         System.out.println(newPoint.y + "fuck!");
    private void drawRectangle(Point locationOnScreen, Object obj){
         ScreenPanel p = (ScreenPanel) obj;
         Graphics g = p.getGraphics();
         g.setColor(Color.RED);
         g.fillRect(locationOnScreen.x, locationOnScreen.y, 50, 500 - locationOnScreen.y);
         update();
    private void eraseRectangle(Point locationOnScreen, Object obj){
         ScreenPanel p = (ScreenPanel) obj;
         Graphics g = p.getGraphics();
         g.setColor(Color.WHITE);
         g.fillRect(locationOnScreen.x, locationOnScreen.y, 50, 500 - locationOnScreen.y);
         update();
    }I realize I've included a lot of code, sorry! Thanks :)

cmoney wrote:
So are you suggesting I create a Graphics object at the top of my class and set that graphics object in the paintComponent method and then use that around?oh no, no, no.
You instead may wish to have a collection such as an ArrayList of Points where rectangles are to be located. Your Mouse Listeners will then change points or add or delete points as needed. The paintComponent will then iterate through the collection drawing the rectangles based on the locations of the Points.

Similar Messages

  • Updating a Java GUI with c++

    Hi,
    I've been working with JNI for a few months now, but I am struggling with an important piece of the application I'm creating. What I have is a Java GUI which I use to create an existing c++ application through JNI. What I would like to do is have the c++ print all of its output to a window within the Java GUI. I thought surely others have wanted to do the same thing, but I have not found any threads addressing the idea. Here is what I've tried/thought of so far without success:
    1) I could have Java poll the c++ application to see if there are any updates to be printed, but that seems clunky and I'm not even sure how well it would work. I would like it to print as it happens (i.e. have c++ tell the gui to print as it becomes available)
    2) It seemed intuitive that I could simply pass the JNIEnv pointer, methodID, and the object to the c++ class to be stored for later use. But after it crashed I found a thread (http://forum.java.sun.com/thread.jspa?threadID=755242&tstart=225) which says you should never pass the JNIEnv (I don't know why). This same thread also gave some suggestions on how to attach to a current thread and then destroy, but also mentioned that once you destroy the VM, it can't be recreated and that won't work for me.
    Any suggestions are greatly appreciated.
    -Mark

    And before anyone says "Google" or "check the documentation" I've torn through the MATLAB (mathworks) site and read every page that even mentions Java (beans or otherwise) and I've googled, trust me I've googled.

  • JAVA GUI window content does not fill out when window is enlarged (Win,Mac)

    I've been using the SAP JAVA GUI on a Windows XP workstation as well as a couple of MacBooks running OS X over the last year and a half or so, running versions from 7.10 r 7(maybe earlier) thru 7.10 r 10 (installed today.) The GUI has performed generally well on these platforms, but has one major irritation.
    When I open certain pop-up windows, such as the SPAD [List of Output Requests > Status Description |http://img171.imageshack.us/i/screenshot20091006at241.png/|screenshot], it usually does not open a  large enough window to display all the data - one must scroll horizontally and/or vertically to see the entire window content.  The real aggravation is that if [one enlarges the window|http://img101.imageshack.us/i/screenshot20091006at242.png/|screenshot] so as to see more data, the resizing is ignored.  The contents of the window are still displayed within the original window boundaries instead of filling out the expanded window.   It is not possible to get the entire window contents displayed, it is still necessary to scroll around.
    What am I missing here?   How can I get window resizing to work correctly?   (Or is there a way to make such windows at least open up at a larger initial size??)
    I only found one other thread in this forum, Sap gui screen size in ubuntu., which seemed to be addressing the same problem, but the suggestion was to apply the latest patch to the GUI and get JAVA 1.6.   One would think that since that post in 2008, any patches would have made it into the latest revisions.  I'm already running Java 1.6.
    SAPGUI for Java 7.10 rev 10
    (Version ID 071000041000)
    Tue Sep 8 09:49:53 MEST 2009
    uw1059, 710_REL, 1093492
    Java VM: Apple Inc. Version 1.6.0_15
    OS: Mac OS X(i386) Version 10.6.1
    SAPGUI for Java 7.10 rev 10
    (Version ID 071000041000)
    Tue Sep 8 09:49:53 MEST 2009
    uw1059, 710_REL, 1093492
    Java VM: Sun Microsystems Inc. Version 1.6.0_15
    OS: Windows XP(x86) Version 5.1
    Any suggestions?  Anyone else even seeing this?
    Thanks!
    Rich

    I'm now running
    SAPGUI for Java 7.10 rev 11
    (Version ID 071000041100)
    Tue Dec 8 16:04:41 MET 2009
    uw1059, 710_REL, 1119101
    Java VM: Apple Inc. Version 1.6.0_17
    OS: Mac OS X(i386) Version 10.6.2
    I've also updated my XP system to 7.10 rev 11 and both continue to display the same failure to resize corrrectly.  
    Here's a [video capture of this behavior|http://img163.yfrog.com/i/sapresizebug.mp4/].
    Given that installs on two separate operating systems have consistently misbehaved like this, I have a hard time believing it is something  we are doing.  (But not that hard...)  I find it hard to believe that is the way these screens present on most SAP sites...
    Any comments or suggestions would be welcome!
    Rich

  • Great Challenge !! No one is able to Tell Solution ? Dynamic GUI Updation

    Topic: Dynamic GUI Updation on msWindows when user changes Display properties.
    (I post this Question last month and have't got any answer, Is there no way for this ?)
    I want to dynamicly Update my UI on msWindows when user changes Display properties, Like other windows applications.
    i am doing this procedure-
    1.to get windows look & feel-
    UIManager.getSystemLookAndFeelClassName()
    2.To receive Events when when user changes Display properties-
    Toolkit.getDefaultToolkit().addPropertyChangeListener( "win.desktop.backgroundColor" ,new Java.beans.PropertyChangeListener()
    public void propertyChange(java.beans.PropertyChangeEvent e)
    3.To Reflect it in GUI-
    SwingUtilities.updateComponentTreeUI(TOP COMPONENT);
    But it only reflects the Border & Title Bar of My application.
    pls. suggest what can i do ?
    Regards
    Naveen Sharma

    I seem to remember looking at a similar thing in the Java demos that came with jdk1.3. I could be wrong...
    Let me see...
    Aha! Here it is.
    on my pc the path is
    C:\jdk1.3\demo\jfc\Metalworks
    then click on the jar file. The demo allows you to change the background color, font size on the toolbar etc..Another demo Swingset2 allows you to dynamically change the look and feel. I hope this helps. If you don`t have these demos I could always send you the code.
    Regards
    Grahame

  • Functionality of Java Gui Through Portal

    I'm running an EP 6.0 SP2 implementation (patch 5) on an AIX environments.
    Our JRE/Javagui deployment is working properly and it is loading the gui onto the end users machines once they hit a transactional iView.
    My question is around the actual functionality of Java Gui.
    I have been asked by several of our functional teams about a difference in funcctionality that apppears to exist.  This difference is as follows.
    In Windows Gui when you make a selection and select 'enter' the fields following the selection update based on the selection criterea.  In Java Gui it appears that the user has to 1) make the selection, 2) click their cursor into the box where the selection appears and then hit enter to update the selection criterea.
    Would someone please confirm that this is the way the Java Gui was meant to operate and if not suggest a way to eliminate the extra click in the operation.
    Thanks
    James

    Hi James,
    Sorry that I can't tell you how to get around this but wanted to let you know that there are differences in the Java Gui and the SAPGui in general.  Since the Java Gui is a web based implementation and the SAPGui is a client application installed on the desktop, you will get these differences.
    Not sure about Java Gui, but there are certain transactions you can't run at all from the WebGui for Microsoft browsers.  So, you are more than likely stuck with what you have!
    Hope this helps,
    Andrew

  • Lighter Java GUI than awt and swing?

    I had recently came across a company website (http://www.bambookit.com) where they developed a java gui library without using awt and swing (seems to what they claim). And on top of that it uses xml to generate the gui components (they call widgets) and the whole library size is only 95kb and supports java 1.1.x and above. Their demos on the applets loads super fast, never know/experience that java applets can actually be this quick. But this confuses me, how is it possible to develop a gui alternative to awt with the basic java classes and no dependency on awt? But since the applets are awt based, it means that they must have some dependencies.
    This is an extract from their website (that it seemed they did not use awt)
    "Java has a fundamental flaw in its paint thread that made it very difficult to build extremely large applications without getting severe performance and resource penalties (This affects both AWT and Swing based applications). It�s main repaint queue\thread when assigning paint regions to various controls uses the Graphics objects to �clip� them. On a Sun Solaris machine this does not cause any problems, however on a windows machine each Graphics object consumes a system resource/handle, (a limit of around 16,000 exists on Win 95 and Win 98 machines). Each Bitmap image, each font object, each icon consumes a single system resource or handle. If a full repaint is performed on an application containing 1000 controls, it would consume at LEAST 1000 system resource handles. If the application was updated many times a second, lets say 10 times a second, then that equates to 10,000 handles a second. This is not taking into account labels within controls, the various fonts styles and sizes created, the various images that get loaded. This could easily exceed 20,000 system resource requests a second. Bambookit on the other hand utilizes the clip routines and passes along a SINGLE Graphics objects to all its various controls. This alone is a HUGE savings in system resources and performance."
    Two questions came to my mind:
    1) Is it possible to build applet gui without using awt and swing in java? If so the only way to do is to use JNI calls?
    2) Am I wrong in interpreting www.bambookit.com's message that they are not using awt?
    Any comments about this?
    Regards,
    Stanly

    They use AWT as basis for their drawing-layer, as any other lightweight toolkits too.
    If you just want a very fast & light alternative to swing/awt have a look at www.lwvcl.com !
    I use it for a large applet-applikation that has to be java-1.1 compatible. It was a horor when using AWT which was implemented different over all JVMs available and very slow (although native widgets were used).
    With lwvcl (which has only 150kB!) I can use state of the art applets that work very fast on modern jvms like 1.4, give me the ability to compile my applikation to native code using GCJ (using the swt-prt of the library) or distribute it to old-school 1.1 browser where it also runs quite fine...
    Its free for GPL and very cheap for commercial use.
    lg Clemens

  • Is there a forum for Java GUI Application Design?

    Hi all,
    I've used this forum a lot and found a lot of help on it for Swing usage specifics. However, whenever I ask a question about broader design or architecture of a full Swing app I get little or no response. Sadly I'm no stranger to "view 50, replies 0" :o(
    Either I'm asking stupid questions or I'm asking the in the wrong forum - does anyone know of a good place to ask about design/best practices for Java, GUI applications? I've seen some of the "programmer"/"developer" groups on Google Groups.
    Many thanks.
    Yours, hoping for at least one reply,
    Chris

    You're right, I typed that wrong. The method signature should be addDataChangeListener(DataChangeListener lis, DataChangeType type)
    When a component registers itself as a change listener, say it wants to know whenever an object of type Foo is changed, it calls DataChangeType.addDataChangeListener(this, DataChangeType.FOO). (the Enum elements coorespond to the objects we want to listen for) Then it implements the dataChanged(DataChangeType type, Object obj) method that will be called by the controller when objects of type Foo are changed. (obviously this is an interface) Whenever a component updates an object of type Foo, it calls DataChangeControl.dataChanged(DataChangeType.FOO, theFooObject), and then the controller will notify all listeners who are interested in Foo objects changing.
    The DataChangeControl maintains a hashmap of <DataChangeType, List < DataChangeListener> >. So when a new listener is added, it checks the type to see if a list is already keyed to that object type in the hashmap. If so it adds the listener to that list, if not it creates a new list in the hashmap with the type as the key. That way when an object is changed, it notifies only those listeners who are registered to listen to that type of object being changed. Hopefully that makes sense.

  • All java GUI apps suddenly never repaint

    This isn't really a programming question, but I've had a hell of a time finding help resources elsewhere (Sun's got the balls to charge money for the support document that will most likely help me!). Does anyone know anything about what might cause all Java GUI apps to never repaint? I just installed the Java 1.5 update 4 JRE & JDK, I'm running Windows XP SP2, and I have dual monitors, although turning the second one off (via the control panel) doesn't seem to help.
    Neither my own software nor commercial software will work (even NetBeans). They all load an empty JFrame, or paint themselves once and never again. Console apps seem to work just fine, though. If anyone knows how to fix this, has any suggestions on what I should try, or can tell me where to look for a solution, I'd be very grateful.
    Thanks,
    Tim

    I appreciate the help, and maybe I'm not following you, but this is happening for ALL Java GUI apps, even NetBeans itself won't repaint. Not sure how I have control over NetBeans's UI thread?
    Thanks
    Tim

  • GUI Update and Threads

    Hello all, I'm new to Java and am having a hard time trying to understand how to implement multi-threading. I've built a simple app with GUI for converting files between encodings. The program works fine but some files take a long time to convert so I want to show the user some status text in the GUI. The conversion function is called from within a button click event, and further from within a loop that cycles through a directory of files to convert. I'm trying to show the name of the file being converted in a label in the GUI, but the label won't update until the button click event finishes, so only the last file converted is displayed.
    I've read through countless examples on this forum and others, and in several online books. I understand the concept of multi-threading and some of the issues surrounding them, but can't seem to grasp the mechanics of getting them set up in code at this point.
    Can anyone provide some coding tips? The code is provided below minus the NetBeans generated layout code. I can provide this also if needed. You'll see some lines commented out in the For loop that I tried but that didn't work.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class EnCon4 extends javax.swing.JFrame {
        //Declare variables and set default values
        String fname="UTF-16";
        String tname="UTF8";
        String infile;
        String outfile;
        /** Creates new form EnCon4 */
        public EnCon4() {
            initComponents();
        private void encodingToListActionPerformed(java.awt.event.ActionEvent evt) {                                              
            tname=(String)encodingToList.getSelectedItem();
        private void encodingFromListActionPerformed(java.awt.event.ActionEvent evt) {                                                
            fname=(String)encodingFromList.getSelectedItem();
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            jLabelStatus.setText("Converting From: " + fname + "  To: " + tname);
            jLabelStatus.repaint();
         File dir1 = new File ("."); //Set current directory
         //Create new subdirectory for converted files
         String newDirName = dir1 + File.separator + "Conv"; 
             File dir2 = new File(newDirName);
             if (!dir2.exists()) {
                dir2.mkdir();
             try {
                //Set path to current directory
                File pathName = new File(dir1.getCanonicalPath());
                File[] contents = pathName.listFiles();
                for (File file : contents) {
                    if (!file.isDirectory()) {
                        //Create the converted files
                    //Set variables
                    infile = dir1.getCanonicalPath() + File.separator + file.getName();
                    outfile = dir2.getCanonicalPath() + File.separator + file.getName();
                    //Check file names to exclude converting the java class file
                    if (!infile.endsWith("class") & !infile.endsWith("jar")) {
                            //Print the file name
                            jLabelStatus.setText("Converting file:  " + file.getName());
                            jLabelStatus.repaint();
                            //catch (Exception econ) {
                            //    System.out.print(econ.getMessage());
                            //    System.exit(1);
                            //System.out.println(file.getName());
                       //Call conversion function in a new thread.
                       //Example with static args //try { convert("NamesASCII.txt", "UTF8.txt", "ISO8859_1", "UTF8"); }
                           //Thread t = new Thread(new Runnable() {
                                //public void run() {
                                try {convert(infile, outfile, fname, tname);
                                catch (Exception econ) {
                                    jLabelStatus.setText(econ.getMessage());
                                    jLabelStatus.repaint();
                                    //System.out.print(econ.getMessage());
                                 //System.exit(1);
                            //t.start();
                //jLabelStatus.setText("Conversion complete.");
                //jLabelStatus.repaint();
             catch(IOException econ) {
                jLabelStatus.setText("Error: " + econ);
                //System.out.println("Error: " + econ);
        public static void convert(String infile, String outfile, String from, String to)
            throws IOException, UnsupportedEncodingException {
            // set up byte streams
            InputStream in;
            if (infile != null) in = new FileInputStream(infile);
            else in = System.in;
            OutputStream out;
            if (outfile != null) out = new FileOutputStream(outfile);
            else out = System.out;
            // Set up character stream
            Reader r = new BufferedReader(new InputStreamReader(in, from));
            Writer w = new BufferedWriter(new OutputStreamWriter(out, to));
            // Copy characters from input to output.  The InputStreamReader
            // converts from the input encoding to Unicode, and the OutputStreamWriter
            // converts from Unicode to the output encoding.  Characters that cannot be
            // represented in the output encoding are output as '?'
            char[] buffer = new char[4096];
            int len;
            while((len = r.read(buffer)) != -1)
              w.write(buffer, 0, len);
            r.close();
            w.flush();
            w.close();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new EnCon4().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JComboBox encodingFromList;
        private javax.swing.JComboBox encodingToList;
        private javax.swing.JButton jButton1;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabelStatus;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration                  
    }

    There are two key principles here. The first is "remove long-running
    processes from the event dispatch thread". If in doubt, you
    can check with SwingUtilities.isEventDIspatch(). The second is
    "put GUI updates on the event dispatch thread", preferable
    with SwingUtilities.invokeLater().
    Today is my last day at work, so here's a fish:
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    public class EnCon extends JFrame{
        String fname="UTF-16";
        String tname="UTF8";
        String infile;
        String outfile;
        /** Creates new form EnCon4 */
        public EnCon() {
            super("EnCon");
            jButton1.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent ae) {
                    final Thread t = new Thread(new MyRunner());
                    t.start();
            final JPanel container = new JPanel();
            container.add(jButton1);
            container.add(jLabelStatus);
            this.getContentPane().add(container);
            this.pack();
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        private class MyRunner implements Runnable {
            public void run() {
                sendMessage("Converting From: " + fname + "  To: " + tname);
                File dir1 = new File ("."); //Set current directory
                //Create new subdirectory for converted files
                String newDirName = dir1 + File.separator + "Conv";
                File dir2 = new File(newDirName);
                if (!dir2.exists()) {
                    dir2.mkdir();
                try {
                    //Set path to current directory
                    File pathName = new File(dir1.getCanonicalPath());
                    File[] contents = pathName.listFiles();
                    for (File file : contents) {
                        if (!file.isDirectory()) {
                            infile = dir1.getCanonicalPath() + File.separator + file.getName();
                            outfile = dir2.getCanonicalPath() + File.separator + file.getName();
                            if (!infile.endsWith("class") & !infile.endsWith("jar")) {
                                sendMessage("Converting file:  " + file.getName());
                                try {
                                    convert(infile, outfile, fname, tname);
                                    sendMessage("Done");
                                catch (Exception econ) {
                                    sendMessage(econ.getMessage());
                catch(IOException econ) {
                    sendMessage("Error: " + econ);
            private void sendMessage(final String message) {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        jLabelStatus.setText(message);
        public static void convert(String infile, String outfile, String from, String to)
        throws IOException, UnsupportedEncodingException {
            // set up byte streams
            InputStream in;
            if (infile != null) in = new FileInputStream(infile);
            else in = System.in;
            OutputStream out;
            if (outfile != null) out = new FileOutputStream(outfile);
            else out = System.out;
            // Set up character stream
            Reader r = new BufferedReader(new InputStreamReader(in, from));
            Writer w = new BufferedWriter(new OutputStreamWriter(out, to));
            // Copy characters from input to output.  The InputStreamReader
            // converts from the input encoding to Unicode, and the OutputStreamWriter
            // converts from Unicode to the output encoding.  Characters that cannot be
            // represented in the output encoding are output as '?'
            char[] buffer = new char[4096];
            int len;
            while((len = r.read(buffer)) != -1)
                w.write(buffer, 0, len);
            r.close();
            w.flush();
            w.close();
        public static void main(String args[]) {
            new EnCon().setVisible(true);
        // Variables declaration - do not modify
        private JButton jButton1 = new JButton("Convert");
        private JLabel jLabelStatus = new JLabel("jLabelStatus");
        // End of variables declaration
    }

  • 'A file or directory doesn't exist' error during java stack update

    Dear All,
    I've done a fresh installation of solution manger system on IBM iseries box (OS400 & DB2 combo).
    As part of post installation activity, I've updated the kernel patch, updated the ABAP stack to sp4, and am currently doing the java stack update.
    I'm struck with one error. The log file shows:
    Feb 23, 2012 7:54:35 PM  Error: /usr/sap/SLM/SYS/global/j2eeclient/META-INF/SAP_MANIFEST.MF (A file or directory in the path name does not exist.)
    Feb 23, 2012 7:54:35 PM  Error: Error deploying Fileset Complete to /usr/sap/SLM/SYS/global/j2eeclient
    Feb 23, 2012 7:54:35 PM  Info: ***** End of File-System Deployment com.sap.engine.client *****
    Feb 23, 2012 7:54:35 PM  Error: Aborted: development component 'com.sap.engine.client'/'sap.com'/'SAP AG'/'7.0209.20110628100654.0000'/'1', grouped by :
    Deployment was not successful
    I've checked the file system and found that the directory META-INF is not present in /../../global/j2eeclient
    Please suggest a solution.
    Thank You.
    regards,
    vin

    Hi,
    This is an easy solution:
    From the OS command line, do WRKLNK, go to /usr/sap/SLMS/global/j2eeclient,  at the top where it shows the directory, do a copy on this. Then at the command line type MD, do F4, paste the directory name in the first line, then after j2eeclient add /META-INF'
    IMportant*** Make sure the full directory name is in single quotes.*
    *On the next 2 lines change INDIR to RWX.  Then press enter and re-run your job.  If you have any problems let me know.

  • Java 7 update 51 cause the following error: java.util.HashMap cannot be cast to java.awt.RenderingHints

    Since I installed Java 7 update 51 accessing the EMC VNX Unisphere Console cause the following error: java.util.HashMap cannot be cast to java.awt.RenderingHints.
    I rolled back to Apple Java 1.6 -005 now I am getting the following error: plug-in failure.
    I think this is cused by the fact that the EMC console application has been written for java 7 and not java 6. Has anybody faced and solved the "java.util.HashMap cannot be cast to java.awt.RenderingHints." error ?

    Hi Yaakov,
    The error is thrown from the  eclipselink.jar:2.5.1 which is a JPA provider .
    Is the above jar bundled in the Oracle Product you are working upon or was this downloaded from external site ?
    If the jar is bundled with the Oracle Product, go ahead a log a SR with Oracle Support with Toplink product group to drill down on the issue, as the issue is happening internally or thrown by the Eclipselink implementation and we've no control....
    Hope it helps!!
    Thanks,
    Vijaya

  • Webstart no longer works after update from Java 7 Update 67 to Java 7 Update 71/72

    Hi,
    We have an application that is launched via Webstart.  Last year, we had to make a bunch of changes to the application in order to work with Java 7 Update 45.  It has been working fine up to and including Java 7 Update 67.  However, it is no failing with Java 7 Update 71 and 72.  Upon launch it is giving the error below. I have searched online and found other articles related to the AccessControlException but they are about 7 years old.  I also tried adding this to the java.policy file with no luck.  Any ideas or help would be appreciated to determine what I can do to get this to work for update 71.
    java.security.AccessControlException: access denied ("java.util.PropertyPermission" "eclipse.exitcode" "write")
        at java.security.AccessControlContext.checkPermission(Unknown Source)
        at java.security.AccessController.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at org.eclipse.osgi.framework.internal.core.FrameworkProperties.setProperty(FrameworkProperties.java:64)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:216)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
        at org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartMain.java:78)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
        at org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain.java:56)

    krubar wrote:
    I have same problem on Sparc system (Solaris 10). Does anybody know how to fix it ? I can't change symbolic link for javaAre you certain that you are experiencing exactly the same issue? Did you follow the hyperlinks to the Sun Solve documents above?
    The Sun Solve document itself states:
    1. Solaris 8 and 9 and OpenSolaris and Solaris 10 on the SPARC platform are not impacted by this issue.I would suggest that you open a Support Call with your local solutions centre.

  • Can I Open an HTMLHelp (*.CHM) File from Java GUI Application?

    I ussually use Delphi to develop my applications and I can open an HTMLHelp (*.CHM) file from my application. Can you show me the ways to do it from my Java GUI applications?
    Thanks for everyone.
    Budi Raharjo
    http://budiraharjo.blogspot.com

    http://www.google.com/search?q=java+chm
    Seems like there is some 3rd party software available for that.

  • Mavericks (10.9.1) blocking Java 7 update 51

    I am trying to play the NY Times Java Acrostic.  Every couple of months I have to update Java in order to get the applet to load (I get a message that my Java is out of date). This time I updated to Java 7 update 51, installed it, verified that it is successfully installed. But every time I try to click on the Java Acrostic, I get an error message where the Acrostic normally is located reading "Error. Click for details." I click and get a box headed "Application Blocked. Click for detais" with a red stop sign icon (the first few times it was just a white "i" in t blue circle icon) that states "Your security settings have blocked an untrusted application from running." There are three buttons: Details, Ignore, Reload.  "Ignore" and "Reload" accomplish nothing. "Details" gets me a "Java Console" box which reads:
    Java Plug-in 10.51.2.13
    Using JRE version 1.7.0_51-b13 Java HotSpot(TM) 64-Bit Server VM
    User home directory = /Users/sandina
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    The menu bar in the Java Console reads "Java Applet---www.nytimes.com"
    The Times is stumped. I went to Safari Preferences (Security) and both the Times website and Java Applet are set to "Always Allow." Java Preferences' Security tab is set to "Medium" as several tech websites instruct (apparently this is a HUGE known issue with the latest updates to Mavericks and Java).  This did not happen until I updated Mavericks to 10.9.1.
    HELP!!! (Warning--I am NOT comfortable trying to write code and don't understand half the complicat

    I'm not an expert, but I've gotten around this problem in the following way.
    Go to the Java Control Panel
    Click on the Security Tab
    Look for the Exception Site List toward the bottom, and click "Edit Site List"
    I added these sites to the list. Not sure if all are needed, but I was able to do the acrostic afterwards.
    http://nytsyn.pzzl.com
    http://www.nytimes.com
    http://query.nytimes.com
    You may need to quit Safari and restart it.  Good luck.

  • HT5945 Java has updated again today, i use a jave plug in to run my virtual software to access my work from home, today i have an error message saying security will not allow access to my website that i use to log in to work from, this is a JREdetection e

    Java has updated again today,
    i use a java plug in to run my virtual software to access my work from home,
    today i have an error message saying that security will not allow access to my website
    i use to log in to work from, this is a JREdetection error,
    my system runs off java and citrix, i tried chrome,firefox and safari - same issue, if my system cannot detect java it wont run, it runs on plug ins.
    How to i change my sec settings to allow access to this website, as i can only see that i can add apps not web addresses?

    If you get an error that says can't backup, try moving the existing backup file to a safe location and thry again. again. You can find the location of the backup file here:
    iPhone and iPod touch: About backups

Maybe you are looking for