Dj native swing work in 10.8 but not work on 10.7.5

hallo..
this a problem..
first i build java program on eclipse use swt-3.8M5-cocoa-macosx-x86
in mac 10.8.. it's work fine..
but when i try to run in 10.7.5 this not working..
and i build again in 10.7.5 it's work fine..
how can i handle this problem...
the message error show
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/eclipse/swt/SWT
at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.initialize_(SWTNativeInt erface.java:208)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java: 71)
at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.open_(SWTNativeInterface .java:332)
at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:100)
it's the path problem or something else???
thanks...

The last Java update disabled Java plug-in and removed Java Preferences.app from your Utilities folder. This is because Apple is no longer supporting Java, if you need it follow these instructions...
You can re-enable Java 6 by following this support article
http://support.apple.com/kb/HT5559
Or, you can update to Oracle's Java 7 here
http://www.java.com/en/download/mac_download.jsp?locale=en

Similar Messages

  • Native Process running from Flash Builder but not from the installed exe

    I have created an AIR application to launch a native process. The   application works fine when tested in Flash Builder but doesn't runs   when I create and AIR  installer and run the installed exe. Any idea  what might be wrong?

    Have you created a native installer instead of just an AIR file.
    -ted

  • Creator Freeze Often -- SWING Worker thread also

    I'm developping an app with creator. And I have many freezes in several minutes long as some people mentioned before.
    I'm running win XP on an opeteron 244(1.8G) x2 , with 2G memory. I've updated creator to the latest updates, but it doesn't seem to be better.
    The things I found is that when I edit Session Bean , Creator takes especially long time to come up.
    At that time, SWING worker thread of Creator IDE also stopping, No update of display , I only look window frame.
    You know the SWING has a Single thread model ,so if some logic uses SWING worker's thread long time, all displying process will be stopped.
    Below is the stacktrace just after a few seconds when Creator freeze by editing Session Bean.
    I use the stacktrace tool at http://tmitevski.users.mcs2.netarray.com/trace.do
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode):
    "StackTrace Remote Thread" prio=5 tid=0x48b10418 nid=0x368 waiting on condition [0x00000000..0x4e85fbac]
    "Inactive RequestProcessor thread [Was:TimedWeakReference/org.netbeans.modules.projectapi.TimedWeakReference]" daemon prio=2 tid=0x48cc9e78 nid=0x634 in Object.wait() [0x4e89f000..0x4e89fbe8]
         at java.lang.Object.wait(Native Method)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:692)
         - locked <0x1eeb8620> (a java.lang.Object)
    "Inactive RequestProcessor thread [Was:Default RequestProcessor/org.netbeans.modules.editor.NbEditorUI$2]" daemon prio=2 tid=0x48d00d18 nid=0x814 in Object.wait() [0x4e79f000..0x4e79fce8]
         at java.lang.Object.wait(Native Method)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:692)
         - locked <0x1eeb8690> (a java.lang.Object)
    "Inactive RequestProcessor thread [Was:Java Children Provider/org.netbeans.modules.java.ui.nodes.elements.SourceChildren$4]" daemon prio=2 tid=0x48ce0d98 nid=0xd8c in Object.wait() [0x4e65f000..0x4e65fae8]
         at java.lang.Object.wait(Native Method)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:692)
         - locked <0x1edbfe00> (a java.lang.Object)
    "Inactive RequestProcessor thread [Was:Suggestions Broker/org.netbeans.modules.tasklist.suggestions.SuggestionsBroker$2]" daemon prio=2 tid=0x473e1c80 nid=0x9fc in Object.wait() [0x4b84f000..0x4b84fbe8]
         at java.lang.Object.wait(Native Method)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:692)
         - locked <0x1ed09d38> (a java.lang.Object)
    "Timer-48" prio=7 tid=0x492d4748 nid=0x930 in Object.wait() [0x4e43f000..0x4e43fa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1eb90290> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-46" prio=7 tid=0x4831ede8 nid=0xff0 in Object.wait() [0x4e71f000..0x4e71fae8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1ea9f428> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-44" prio=7 tid=0x48b26ab0 nid=0xc50 in Object.wait() [0x4e81f000..0x4e81fb68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1dc0d688> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-42" prio=7 tid=0x50f3bb68 nid=0x8f0 in Object.wait() [0x4e7df000..0x4e7dfa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1db078b8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-40" prio=7 tid=0x48bbde20 nid=0xf0c in Object.wait() [0x4e75f000..0x4e75f9e8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1d85d2b8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-38" prio=7 tid=0x50e67840 nid=0x8a4 in Object.wait() [0x4e6df000..0x4e6dfae8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1d7bc160> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-36" prio=7 tid=0x48ba3f50 nid=0xf58 in Object.wait() [0x4e5df000..0x4e5dfd68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1d7bc1d8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-34" prio=7 tid=0x48abb270 nid=0xee8 in Object.wait() [0x4e53f000..0x4e53fb68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1d339d68> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-32" prio=7 tid=0x47a6e050 nid=0xe98 in Object.wait() [0x4e69f000..0x4e69fa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1b93e2e8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-30" prio=7 tid=0x4925bd38 nid=0x9a8 in Object.wait() [0x4e4bf000..0x4e4bfa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1b3022f0> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-28" prio=7 tid=0x4930aae8 nid=0x620 in Object.wait() [0x4b70f000..0x4b70fae8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1af19770> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-26" prio=7 tid=0x485620c8 nid=0x120 in Object.wait() [0x4e59f000..0x4e59fb68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1978f0f8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-24" prio=7 tid=0x46d7e9e8 nid=0xaf8 in Object.wait() [0x4e61f000..0x4e61fbe8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x196f19e8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "VCS Command Tasks Starter Loop" daemon prio=2 tid=0x48aeed00 nid=0x96c in Object.wait() [0x4e4ff000..0x4e4ffbe8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x18841770> (a org.netbeans.modules.vcscore.commands.CommandProcessor)
         at java.lang.Object.wait(Object.java:474)
         at org.netbeans.modules.vcscore.commands.CommandProcessor.executorStarterLoop(CommandProcessor.java:757)
         - locked <0x18841770> (a org.netbeans.modules.vcscore.commands.CommandProcessor)
         at org.netbeans.modules.vcscore.commands.CommandProcessor.access$700(CommandProcessor.java:65)
         at org.netbeans.modules.vcscore.commands.CommandProcessor$5.run(CommandProcessor.java:776)
         at java.lang.Thread.run(Thread.java:595)
    "Timer-16" prio=7 tid=0x46fa81a8 nid=0x69c in Object.wait() [0x4e3ff000..0x4e3ffd68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x151bf408> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "Timer-12" prio=7 tid=0x479eacf0 nid=0x2ec in Object.wait() [0x4b4df000..0x4b4dfce8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.util.TimerThread.mainLoop(Timer.java:483)
         - locked <0x1499b4e8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "URLdisplayer" prio=7 tid=0x4865de20 nid=0xe2c in Object.wait() [0x4727f000..0x4727fd68]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x12a02bb0> (a org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer)
         at java.lang.Object.wait(Object.java:474)
         at org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer.getNextTask(NbDdeBrowserImpl.java:223)
         - locked <0x12a02bb0> (a org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer)
         at org.netbeans.modules.extbrowser.NbDdeBrowserImpl$URLDisplayer.run(NbDdeBrowserImpl.java:235)
         at java.lang.Thread.run(Thread.java:595)
    "Text-Layout" prio=2 tid=0x475967e8 nid=0xa68 in Object.wait() [0x4b68f000..0x4b68fae8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x129e8cd0> (a org.netbeans.editor.view.spi.ViewLayoutQueue)
         at java.lang.Object.wait(Object.java:474)
         at org.netbeans.editor.view.spi.ViewLayoutQueue.waitForTask(ViewLayoutQueue.java:128)
         - locked <0x129e8cd0> (a org.netbeans.editor.view.spi.ViewLayoutQueue)
         at org.netbeans.editor.view.spi.ViewLayoutQueue$LayoutThread.run(ViewLayoutQueue.java:182)
    "MDR event dispatcher" daemon prio=2 tid=0x47b8b450 nid=0x9c8 in Object.wait() [0x4b88f000..0x4b88fa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at org.netbeans.mdr.util.EventNotifier$EventsDelivery.run(EventNotifier.java:257)
         - locked <0x087d1b10> (a java.util.LinkedList)
         at java.lang.Thread.run(Thread.java:595)
    "DestroyJavaVM" prio=5 tid=0x00038890 nid=0x4e4 waiting on condition [0x00000000..0x0007fae8]
    "TimerQueue" daemon prio=5 tid=0x46da6908 nid=0x768 in Object.wait() [0x4716f000..0x4716fb68]
         at java.lang.Object.wait(Native Method)
         at javax.swing.TimerQueue.run(TimerQueue.java:233)
         - locked <0x07b22b68> (a javax.swing.TimerQueue)
         at java.lang.Thread.run(Thread.java:595)
    "AWT-EventQueue-1" prio=7 tid=0x46ea8478 nid=0x990 runnable [0x4820e000..0x4820fbe8]
         at java.net.Inet4AddressImpl.getHostByAddr(Native Method)
         at java.net.InetAddress$1.getHostByAddr(InetAddress.java:842)
         at java.net.InetAddress.getHostFromNameService(InetAddress.java:532)
         at java.net.InetAddress.getHostName(InetAddress.java:475)
         at java.net.InetAddress.getHostName(InetAddress.java:447)
         at java.net.InetSocketAddress.getHostName(InetSocketAddress.java:210)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:341)
         at java.net.Socket.connect(Socket.java:507)
         at java.net.Socket.connect(Socket.java:457)
         at java.net.Socket.<init>(Socket.java:365)
         at java.net.Socket.<init>(Socket.java:207)
         at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:142)
         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280)
         at com.mysql.jdbc.Connection.createNewIO(Connection.java:1774)
         at com.mysql.jdbc.Connection.<init>(Connection.java:437)
         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
         at com.sun.rave.sql.DesignTimeDataSource.getConnection(DesignTimeDataSource.java:238)
         at com.sun.rave.sql.DesignTimeDataSource.getConnection(DesignTimeDataSource.java:214)
         at com.sun.sql.rowset.JdbcRowSetXImpl.connect(JdbcRowSetXImpl.java:410)
         at com.sun.sql.rowset.JdbcRowSetXImpl.prepare(JdbcRowSetXImpl.java:532)
         at com.sun.sql.rowset.JdbcRowSetXImpl.execute(JdbcRowSetXImpl.java:349)
         at caico.jsf.svc.itemSvc.<init>(itemSvc.java:81)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at com.sun.rave.insync.beans.BeansUnit.instantiateBean(BeansUnit.java:884)
         at com.sun.rave.insync.live.LiveUnit.ressurectDesignBean(LiveUnit.java:339)
         at com.sun.rave.insync.live.LiveUnit.resurrect(LiveUnit.java:406)
         at com.sun.rave.insync.live.LiveUnit.sync(LiveUnit.java:294)
         at com.sun.rave.insync.live.LiveUnitWrapper.sync(LiveUnitWrapper.java:115)
         at com.sun.rave.insync.models.FacesModel.syncImpl(FacesModel.java:899)
         at com.sun.rave.insync.Model.sync(Model.java:207)
         at com.sun.rave.insync.Model.sync(Model.java:173)
         at com.sun.rave.insync.ModelSet$WindowManagerPropertyRegistry.processNodes(ModelSet.java:107)
         at com.sun.rave.insync.ModelSet$WindowManagerPropertyRegistry.propertyChange(ModelSet.java:125)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
         at org.netbeans.core.windows.RegistryImpl.doFirePropertyChange(RegistryImpl.java:249)
         at org.netbeans.core.windows.RegistryImpl.tryFireChanges(RegistryImpl.java:222)
         at org.netbeans.core.windows.RegistryImpl.selectedNodesChanged(RegistryImpl.java:186)
         at org.netbeans.core.windows.RegistryImpl.topComponentActivated(RegistryImpl.java:138)
         at org.netbeans.core.windows.WindowManagerImpl.notifyRegistryTopComponentActivated(WindowManagerImpl.java:893)
         at org.netbeans.core.windows.Central.setActiveMode(Central.java:182)
         at org.netbeans.core.windows.Central.userActivatedMode(Central.java:1451)
         at org.netbeans.core.windows.view.DefaultView.userActivatedModeView(DefaultView.java:591)
         at org.netbeans.core.windows.view.ui.TabbedHandler$ActivationManager.handleActivation(TabbedHandler.java:477)
         at org.netbeans.core.windows.view.ui.TabbedHandler$ActivationManager.eventDispatched(TabbedHandler.java:425)
         at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2206)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2100)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2099)
         at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:3867)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    "Creator Error Handler Listener" prio=5 tid=0x4665f3d8 nid=0xf70 runnable [0x481cf000..0x481cfce8]
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
         - locked <0x0793baf0> (a java.net.SocksSocketImpl)
         at java.net.ServerSocket.implAccept(ServerSocket.java:450)
         at java.net.ServerSocket.accept(ServerSocket.java:421)
         at com.sun.rave.errorhandler.DebugServerThread.run(DebugServerThread.java:81)
    "Java2D Disposer" daemon prio=10 tid=0x467d6760 nid=0xa08 in Object.wait() [0x46c8f000..0x46c8fce8]
         at java.lang.Object.wait(Native Method)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
         - locked <0x07451380> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
         at sun.java2d.Disposer.run(Disposer.java:107)
         at java.lang.Thread.run(Thread.java:595)
    "Active Reference Queue Daemon" daemon prio=2 tid=0x467bb638 nid=0xb70 in Object.wait() [0x46c4f000..0x46c4fd68]
         at java.lang.Object.wait(Native Method)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
         - locked <0x07451408> (a java.lang.ref.ReferenceQueue$Lock)
         at org.openide.util.Utilities$ActiveQueue.run(Utilities.java:2465)
         at java.lang.Thread.run(Thread.java:595)
    "Timer-0" daemon prio=5 tid=0x4678f2f0 nid=0xaf0 in Object.wait() [0x46c0f000..0x46c0f9e8]
         at java.lang.Object.wait(Native Method)
         at java.util.TimerThread.mainLoop(Timer.java:509)
         - locked <0x07451498> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "AWT-Windows" daemon prio=7 tid=0x467a54a0 nid=0x790 runnable [0x46a6f000..0x46a6fa68]
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(WToolkit.java:269)
         at java.lang.Thread.run(Thread.java:595)
    "AWT-Shutdown" prio=5 tid=0x467a5008 nid=0xafc in Object.wait() [0x46a2f000..0x46a2fae8]
         at java.lang.Object.wait(Native Method)
         - waiting on <0x07451568> (a java.lang.Object)
         at java.lang.Object.wait(Object.java:474)
         at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
         - locked <0x07451568> (a java.lang.Object)
         at java.lang.Thread.run(Thread.java:595)
    "CLI Requests Server" daemon prio=5 tid=0x4676b380 nid=0xa64 runnable [0x4693f000..0x4693fbe8]
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
         - locked <0x07451720> (a java.net.SocksSocketImpl)
         at java.net.ServerSocket.implAccept(ServerSocket.java:450)
         at java.net.ServerSocket.accept(ServerSocket.java:421)
         at org.netbeans.CLIHandler$Server.run(CLIHandler.java:758)
    "Low Memory Detector" daemon prio=5 tid=0x00ab83b8 nid=0xee0 runnable [0x00000000..0x00000000]
    "CompilerThread0" daemon prio=10 tid=0x00ab7020 nid=0x9c4 waiting on condition [0x00000000..0x465cfa4c]
    "Signal Dispatcher" daemon prio=10 tid=0x00ab6470 nid=0x31c runnable [0x00000000..0x00000000]
    "Finalizer" daemon prio=9 tid=0x00aa95e0 nid=0x85c in Object.wait() [0x4654f000..0x4654fa68]
         at java.lang.Object.wait(Native Method)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
         - locked <0x074519c0> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
         at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x00aa8150 nid=0xf1c in Object.wait() [0x4650f000..0x4650fae8]
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:474)
         at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
         - locked <0x07451590> (a java.lang.ref.Reference$Lock)
    "VM Thread" prio=10 tid=0x00aa5780 nid=0x808 runnable
    "VM Periodic Task Thread" prio=10 tid=0x00ab9858 nid=0x1b0 waiting on condition

    Use a SwingUtilities.invokeLater(...) to invoke the main GUI. This will allow the button to repaint itself before the main GUI is invoked.

  • Using the swing worker to populate the data in to jtablle

    Hello, i am developing my 1st application in java swings , i have developed it but when i run a module which fetchces the data from the mysql and display it in jtable my swing gui got blank for some initial time, i was thinking for some progress bar type thing but when i came acroos google i found that i can use swing worker to load my GUI on time and in the back ground i can do the task of fetching the data from the data base and populating the Jtable, but i had done a lot of try but not succeded to implement the swing worker . Please help me to implement the swing worker :( . i am using the abstractTableModal to populating the jtable it is working fine but swing worker is not there .
    Scenerio is like this i have base frame on which i got 1 or more btton one of those button is Clients when i click on it a Jdialog box appears with the jtable . Pleae tell me how to implement the swing worker class between this. Pleaseeeeeeeeeeeeeeeeeeeeee :( I am help less now .

    Fahim i want to display some photograph in to a swing application after fetching these photo graph from the database table , i dont know what swing component will be better for it and i m designing this in netbeans , so please assist me with that , how to go now and please note that it is dynamic so component should be like that :(. i m trying to create a photo album where i upload the multiple photograph first then i would like to show them each photograph will a text box when some one write some text in that text box and press enter i would like to save that text with that photo graph , I AM DONE WITH THE PHOTO UPLOADING TASK BUT DONT KNOW HOW TO DO THE REST LIKE DISPLAYING THE PHOTOGRAPH WITH THAT TEXT BOX .
    Edited by: kamal.java on Apr 27, 2012 8:59 AM

  • JNLP - Swing application compiled in jdk1.5 not working in jdk1.6

    I have one swing application, compiled in jdk 1.5 and deployed in JNLP with jdk 1.5. When client machine try to access the application and having jre 1.5 then it works fine. but if client machine having jre 1.6 or version greater than 1.5 then application does not work properly.
    Please help me, i got stuck and not able to solve the problem.
    this is my JNLP
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://10.1.1.145:8080/uttimesheet" href="launch.jnlp">
    <information>
    <title>TimeSheet Portal</title>
    <vendor>Geometric Global</vendor>
    <description>A simple java desktop application based on Swing Application Framework</description>
    <description kind="short">TimeSheet Portal</description>
    <homepage href="http://appframework.dev.java.net"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+" />
    <jar href="UTTimeSheet.jar" main="true" download="eager"/>
    <jar href="lib/antlr-2.7.5H3.jar" download="eager"/>
    <jar href="lib/appframework-1.0.3.jar" download="eager"/>
    <jar href="lib/asm.jar" download="eager"/>
    <jar href="lib/cglib-2.1.jar" download="eager"/>
    <jar href="lib/commons-collections-2.1.1.jar" download="eager"/>
    <jar href="lib/commons-logging-1.0.4.jar" download="eager"/>
    <jar href="lib/dom4j-1.6.jar" download="eager"/>
    <jar href="lib/hibernate3.jar" download="eager"/>
    <jar href="lib/jta.jar" download="eager"/>
    <jar href="lib/log4j-1.2.9.jar" download="eager"/>
    <jar href="lib/poi-3.0.2.jar" download="eager"/>
    <jar href="lib/postgresql-8.3-603.jdbc3.jar" download="eager"/>
    <jar href="lib/swing-layout-1.0.3.jar" download="eager"/>
    <jar href="lib/swing-worker-1.1.jar" download="eager"/>
    <jar href="lib/swingx-0.9.2.jar" download="eager"/>
    </resources>
    <application-desc main-class="timesheetproject.TimeSheetProjectApp">
    </application-desc>
    </jnlp>
    Thanks in Advance.

    Thanks Luca for your time,
    we have deployed application in tomcat and changed the home page of tomcat to our application home page(html page). and url is http://10.1.1.145:8080/
    Application home page contain link to jnlp. so whenever user click on link (in home page) then jnlp will execute and launch the swing application.
    do you need some more clarification?
    below is the home page(html).
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Launch TimeSheet Portal via JNLP</title>
    </head>
    <body>
         <center>
              <br>
              <img src="images/Geo-logo.JPG" />          
              <br>
              <hr width="70%" />
              <br>
              <table width="70%">
                   <tr><td> </td></tr>
                   <tr>
                        <td colspan="2" align="center">
                             <align="center">
                                  <h2>Welcome to TimeSheet Portal.</h3>
                             </align>
                        </td>
                   </tr>
                   <tr><td> </td></tr>
                   <tr><td> </td></tr>
                   <tr>
                        <td align="center">
                             <align="center">
                                  <h3><u>Live Sites:</u></h3>
                             </align>
                        </td>
                        <td align="center">
                             <align="center">
                                  <h3><u>Demo Sites:</u></h3>
                             </align>
                        </td>
                   </tr>
                   <tr>
                        <td width="50%" align="center">
                             <img src="images/launchPortal.png" onmouseover="this.src='images/launchPortalMouseOver.png';" onmouseout="this.src='images/launchPortal.png';" border="0"/>          
                             <br><br>
                             <img src="images/launchAdminPortal.png" onmouseover="this.src='images/launchAdminPortalMouseOver.png';" onmouseout="this.src='images/launchAdminPortal.png';" border="0"/>          
                        </td>
                        <td width="50%" align="center">
                             <img src="images/demoPortal.png" onmouseover="this.src='images/demoPortalMouseOver.png';" onmouseout="this.src='images/demoPortal.png';" border="0"/>
                             <br><br>
                             <img src="images/demoAdminPortal.png" onmouseover="this.src='images/demoAdminPortalMouseOver.png';" onmouseout="this.src='images/demoAdminPortal.png';" border="0"/>
                        </td>
                   </tr>
                   <tr><td> </td></tr>
                   <tr><td> </td></tr>
         </table>
         <table width="70%">
              <tr><td> </td></tr>
              <tr><td> </td></tr>
              <tr><td align="center">
                   FAQ   |  
                   Help   |  
                   Why Timesheet   |  
                   Report a bug   |  
                   Contact Us   |  
    Subtask Mapping   
              </td></tr>
         </table>
         <br><br><br><br>
         <table width="70%" bgcolor="#C0C0C0" style="vertical-align: bottom">
              <tr>
                   <td colspan="2" align="center" style="vertical-align: bottom" bgcolor="#C0C0C0">
                        ©<font size="1.5" face="Verdana"> 2008 Geometric Ltd. All rights reserved.<br>
                             Best optimized for a resolution of 1024 and above. JRE 1.5 is a pre-requisite                          for using these applications.
                        </font>
                   </td>
              </tr>
         </table>
         </center>
    </body>
    </html>
    Thanks.

  • Is this a bug in Swing in JDK1.6/JDK1.7 but not in JDK1.5?

    I have an application for which GUI was developed in Java Swing JDK1.5.I am planning to upgrade the JDK to JDK1.6 but doing so produces problem for me.
    Problem Statement : If I open few dialogs(say 10) and dispose them and than call method 'getOwnedWindows()' , it returns 0 in JDK1.5 but returns 10 in JDK1.6. As in JDK1.6 it returns 10, my algorithm to set focus is not working correctly as it is able to find invlaid/disposed dialogs and try to set the focus on it but not on the correct and valid dialog or component because algorithm uses getOwnedWindows() to get the valid and currently open dialog.
    Can anyone suggest me the workaround to avoid this problem in JDK1.6?
    Following piece of code can demonstrate the problem.
    Custom Dialog Class :
    import javax.swing.JDialog;
    import java.awt.event.ActionListener;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JButton;
    import java.awt.event.ActionEvent;
    public class CustomDialog extends JDialog implements ActionListener {
        private JPanel myPanel = null;
        private JButton yesButton = null;
        private JButton noButton = null;
        private boolean answer = false;
        public boolean getAnswer() { return answer; }
        public CustomDialog(JFrame frame, boolean modal, String myMessage) {
         super(frame, modal);
         myPanel = new JPanel();
         getContentPane().add(myPanel);
         myPanel.add(new JLabel(myMessage));
         yesButton = new JButton("Yes");
         yesButton.addActionListener(this);
         myPanel.add(yesButton);     
         noButton = new JButton("No");
         noButton.addActionListener(this);
         myPanel.add(noButton);     
         pack();
         setLocationRelativeTo(frame);
         setVisible(true);
         //System.out.println("Constrtuctor ends");
        public void actionPerformed(ActionEvent e) {
         if(yesButton == e.getSource()) {
             System.err.println("User chose yes.");
             answer = true;
             //setVisible(false);
         else if(noButton == e.getSource()) {
             System.err.println("User chose no.");
             answer = false;
             //setVisible(false);
        public void customFinalize() {
             try {
                   finalize();
              } catch (Throwable e) {
                   e.printStackTrace();
    }Main Class:
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionEvent;
    import java.awt.FlowLayout;
    import java.awt.Window;
    public class TestTheDialog implements ActionListener {
        JFrame mainFrame = null;
        JButton myButton = null;
        JButton myButton_2 = null;
        public TestTheDialog() {
            mainFrame = new JFrame("TestTheDialog Tester");
            mainFrame.addWindowListener(new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {System.exit(0);}
            myButton = new JButton("Test the dialog!");
            myButton_2 = new JButton("Print no. of owned Windows");
            myButton.addActionListener(this);
            myButton_2.addActionListener(this);
            mainFrame.setLocationRelativeTo(null);
            FlowLayout flayout = new FlowLayout();
            mainFrame.setLayout(flayout);
            mainFrame.getContentPane().add(myButton);
            mainFrame.getContentPane().add(myButton_2);
            mainFrame.pack();
            mainFrame.setVisible(true);
        public void actionPerformed(ActionEvent e) {
            if(myButton == e.getSource()) {
                   System.out.println("getOwnedWindows 1 " + mainFrame.getOwnedWindows().length);
                 createMultipleDialogs();
                int i = 0;
                   for (Window singleWindow : mainFrame.getOwnedWindows()) {
                        System.out.println("getOwnedWindows " + i++ + " "
                                  + singleWindow.isShowing() + " "
                                  + singleWindow.isVisible() + " " + singleWindow);
                   System.out.println("getOwnedWindows 2 " + mainFrame.getOwnedWindows().length);
                //System.gc();
                   System.out.println("getOwnedWindows 3 " + mainFrame.getOwnedWindows().length);
                //System.gc();
                   System.out.println("getOwnedWindows 4 " + mainFrame.getOwnedWindows().length);
            } else if (myButton_2 == e.getSource()) {
                   System.out.println("getOwnedWindows now: " + mainFrame.getOwnedWindows().length);
         public void createMultipleDialogs() {
              for (int a = 0; a < 10; a++) {
                   CustomDialog myDialog = new CustomDialog(mainFrame, false,
                             "Do you like Java?");
                   myDialog.dispose();
                   myDialog.customFinalize();
        public static void main(String argv[]) {
            TestTheDialog tester = new TestTheDialog();
    }Running the above code gives different output for JDK1.5 and JDK1.6
    I would appreciate your help in this regards.
    Thanks

    Fix your algorithm to check if the windows are displayable/showing instead of assuming they are?

  • HTML Snippet was working on iWeb 08 but not now on iWeb 09

    Having upgraded to iWeb 09 from iWeb 08, suddenly I am unable to upload slideshows using a third party program called "SlideShowPro for Lightroom" successfully. They embed in iWeb fine but once they export they do not show up online. So, in short the slideshow shows up online but do not show up embedded onto the final iWeb page.
    Link to unembedded slideshow (which works fine)...
    http://www.jonnyback.com/lightroom_slideshows/markandemma/loader.swf
    Link to website without slideshow showing up...
    http://www.jonnyback.com/markandemma3
    Code used to embed slideshow in HTML Snippet inside of iWeb 09 (which previsouly worked in iWeb 08)
    http://www.jonnyback.com/markandemma3code
    Finally, here is a screen grab of iWeb09 showing my site and how the slideshow is fine in iWeb but isn't once it is exported...
    http://www.jonnyback.com/downloads/iWeb_Screenshot.jpg
    Here is an example of a page which I uploaded from iWeb 08, and it works fine, but only because I exported it to a folder whilst I was still using iWeb 08...
    http://www.jonnyback.com/mattandanna
    The Slideshow also shows up here fine...
    http://www.jonnyback.com/markandemma3files/widget0markup.html
    And iWeb can not get a native iWeb Photo Gallery loading online in a similar way, it just doesn't show up online either...
    http://www.jonnyback.com/markandemma2iwebphoto
    I've tried loading the page on a different server with the same issue, the Slideshow Pro gallery just does not show.
    Any advice would be greatly appreciated,
    Jonny

    Thank you Roddy, I have done my homework but it isn't wokring yet.
    In the iWeb native Photo Gallery page, I have come up with the scenario again where it works in a subfolder...
    http://www.jonnyback.com/Site/markandemma2iwebphototest.html
    But not on the normal website domain...
    http://www.jonnyback.com/markandemma2iwebphototest.html
    As a check I did find out that the Slideshow still doesn't work with the subfolder "/Site" scenario...
    http://www.jonnyback.com/Site/markandemma3
    How bizarre!
    Any ideas?

  • Applet works in appletviewer but not in IE - Applet notinited

    Hi, i have written a simple applet which uses swing components, ie swing labels and buttons. The buttons and labels also have icons with the text. The icons are in a folder called "icons" inside the same folder that the class is in. Everything works fine in the appletviewer, the icons are all displayed correctly, however when i try to open it through Internet Explorer i get this error in the java console window:
    Java(TM) Plug-in: Version 1.4.0
    Using JRE version 1.4.0 Java HotSpot(TM) Client VM
    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
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    java.security.AccessControlException: access denied (java.io.FilePermission icons/world.jpg read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
         at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:408)
         at sun.awt.SunToolkit.getImage(SunToolkit.java:422)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:81)
         at javax.swing.ImageIcon.<init>(ImageIcon.java:107)
         at atm.init(atm.java:23)
         at sun.applet.AppletPanel.run(AppletPanel.java:341)
         at java.lang.Thread.run(Thread.java:536)
    Can anyone help me with this problem? I desperately need this applet working in the browser and not just the appletviewer.
    Many thanks in advance,
    Adrian

    Hi, i don't think it is a problem with the security settings, the problem definately lies in these lines
    inside the init method:
         Icon worldIcon = new ImageIcon(getDocumentBase(),"icons/world.jpg");
         JLabel myIconLbl = new JLabel("My Icon and Label", worldIcon, SwingConstants.CENTER);     
    add(myIconLbl);
    If i take the ' getDocumentBase() ' part out of the first line, the applet compiles and the worldIcon is correctly displayed in the appletviewer but not in Internet Explorer (the problem i orriginally sited).
    However by leaving the getDocumentBase() line in the code, the applet correctly compiles but does not show the icons at all in either appletviewer or IE!!
    Any suggestions?
    Adrian

  • Java chat program, works on single PC, but not over internet?

    I got bored so I started writing a chat client in java, its IRC style, a server and as many clients as you want. It works fine on a single computer (using 127.0.0.1 as the IP) but not over the internet.
    I've tried running the server and client on my home PC, set up the ports to be forwarded on my router and enabled them in the windows firewall but I get the error "Connection refused" when trying to connect using my external IP (ISP) address, same with me running the server and a mate running the client.
    The class chatHandler was basically stolen off the internet, the rest I wrote myself or modified bits of code to suit. I wrote it in netbeans with the GUI builder.
    I've hosted both projects in the single zip, if you want to run the application just open the .jar file in the dist folders, or view the source via the src folder, or alternatively you can load the project up in NetBeans so its easier to play with the GUI.
    So yeah if anyone can help me out with why its not working that'd be great, I've added the port to my firewall (default 60111). My ultimate goal is to implement an actual protocol so it isn't just sending plain text, then I can easily send files to mates etc.
    http://rapidshare.com/files/208309140/ChatProgram.zip.html
    Edited by: rolls on Mar 12, 2009 4:58 AM

    what I have done recently is this:
    have added java.exe, javaw.exe, the ports Im using to the windows firewall and also the ports I am using to my router.
    I have also tried changing :
    server = new ServerSocket(port);
    to:
    InetAddress IP = InetAddress.getByName(IPAddress);
    server = new ServerSocket(port, backlog, IP);
    (IPAddress = 192.168.1.3 my lan NIC)
    As I believe it was binding to my local loopback adaptor, hence not seeing any packets when using a packet analyser, however now I get an exception, after printing a stacktrace from the client I get this.
    However I can now connect using 192.168.1.3 just not using my external IP address.
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl .java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSoc ketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.j ava:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.j ava:366)
    at java.net.Socket.connect(Socket.java:519)
    at java.net.Socket.connect(Socket.java:469)
    at java.net.Socket.<init>(Socket.java:366)
    at java.net.Socket.<init>(Socket.java:180)
    at chatclient.Client.run(Client.java:60)
    at java.lang.Thread.run(Thread.java:619)
    Why is my connection getting refused? I've set up a virtual server and port forwarding on my router, and turned off the windows firewall.

  • My applet works in the appletviewer but not in the navigator

    My applet works in the appletviewer but not in the navigator
    exceptions problem1 and problem2 are throwed
    this is my code
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ValiderHtml extends Applet implements ActionListener {
    JButton send =new JButton("Connexion");
    JScrollPane jscrollpane= new JScrollPane();
    DefaultListModel lignes=new DefaultListModel();
    JList lstURL = new JList(lignes);
    BufferedReader reader = null;
    String ligne;
    URL url;
    URLConnection conn;
       public void init(){   
       this.setSize(900,400);
       setLayout( new GridLayout(2,1));
       jscrollpane.setBounds(new Rectangle(19,53,160,73));
       jscrollpane.getViewport().add(lstURL,null);
       send.addActionListener(this);
            this.add(send);
       this.add(jscrollpane);
        public void actionPerformed(ActionEvent evt) {
             Send();
       public void Send(){
            try {
       url=new URL("http://www.developpez.com");
       conn = url.openConnection();
       reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    while ((ligne = reader.readLine()) != null) {
                     lignes.addElement(ligne);
        }//fin bloc try
       catch (Exception e) {
                   lignes.addElement("probleme1");     
                finally{
                   try{reader.close();}catch(Exception e){ lignes.addElement("probleme2");}
       }// fin Send
          public void paint(Graphics g) {
                super.paint(g);
    }// fin Applet

    As for tracking the source of your problem your applet sucks.
    Try e.printStackTrace() on a cought exception and check the (full) trace.
    url=new URL("http://www.developpez.com");
    Unless yor applet is on www.developpez.com this will throw an exception in an unsigned
    applet without special policies.
    Signing applets:
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and last post for the java class file
    http://forum.java.sun.com/thread.jsp?forum=63&thread=409341
    4th post explaining how to set up your own policy with your own keystore

  • Can we call Swing Utitlies.Invoke Later from Swing worker

    Hi
    I know The worker thread is to run as a seperate thread for time consuming process.i.e non GUI stuff.
    But my question is Can we call invokeLater from SwingWorker
    Thanks
    Rahul

    codingMonkey wrote:
    rahulm_32003 wrote:
    Hi
    yes it is correct.But my question to know whether can we call InvokeLater from Swing worker.What happens if we do like that.Does it make any problem IN GUI
    ThanksTry it.Of course you can try to do that. But why do you want to? Why do you insist on doing something silly?
    Post an example SwingWorker where this makes sense to do.

  • Swing worker question -- two lines performing a similar task concurrently

    Hi,
    I've been playing around with swingworker.
    The code below has a window with two buttons and two text areas.
    When you click a button, the text area will count out 10000 random numbers, and print "done." when it's finished.
    Each of the buttons works when pressed separately (one is running while the other is idle) But I can't push one, then the other and have the tasks run independantly.
    One stops and abruptly finishes while the other pauses.
    Sorry to post a lot of code, I'm going through the tutorials, I've looked at the example from the tutorial pretty extensivley, but that is only running one task.
    thanks.
    bp
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import javax.swing.border.Border;
    import javax.swing.BorderFactory;
    import java.awt.Insets;
    import javax.swing.*;
    import javax.swing.SwingWorker;
    public class TestGui2 extends JFrame{
          JButton button1;
          JButton button2;
          JTextArea tArea1;
          JTextArea tArea2;
          Border border;
          public void buildGui(){
                JPanel mainPanel = new JPanel();
                mainPanel.setLayout(new GridBagLayout());
                GridBagConstraints mpc = new GridBagConstraints();
                mpc.insets = new Insets(3, 10, 3, 10);
             border = BorderFactory.createLoweredBevelBorder();
                JLabel titleLabel = new JLabel("<html><h1><font face=\"Courier\">GridBagLayout Test Gui</font></h1></html>");
                mpc.weightx=0.5;
                mpc.fill = GridBagConstraints.CENTER;
                mpc.gridx=1;
                mpc.gridy=0;
                mainPanel.add(titleLabel, mpc);
                button1 = new JButton("run job1");
             button1.addActionListener(new Button1Listener());
                mpc.weightx=0.5;
                mpc.fill = GridBagConstraints.EAST;
                mpc.gridx=0;
                mpc.gridy=1;
                mainPanel.add(button1, mpc);
                tArea1 = new JTextArea("sample text");
             tArea1.setBorder(border);
                mpc.weightx=0.5;
                mpc.fill = GridBagConstraints.HORIZONTAL;
                mpc.gridx=1;
                mpc.gridy=1;
                mainPanel.add(tArea1, mpc);
                button2 = new JButton("run job2");
             button2.addActionListener(new Button2Listener());
                mpc.weightx=0.5;
                mpc.fill = GridBagConstraints.EAST;
                mpc.gridx=0;
                mpc.gridy=2;
                mainPanel.add(button2, mpc);
                tArea2 = new JTextArea("sample text");
             tArea2.setBorder(border);
                mpc.weightx=0.5;
                mpc.fill = GridBagConstraints.HORIZONTAL;
                mpc.gridx=1;
                mpc.gridy=2;
                mainPanel.add(tArea2, mpc);
                // frame settings
                add(mainPanel);
                setSize(700,450);
                setTitle("TestGui2");
                setDefaultCloseOperation(EXIT_ON_CLOSE);
                setVisible(true);
         // inner classes   
         class Button1Listener implements ActionListener{
              public void actionPerformed(ActionEvent e) {
              BigJobWorker worker = new BigJobWorker();
              worker.execute();
         class Button2Listener implements ActionListener{
              public void actionPerformed(ActionEvent e) {
                   BigJobWorker2 worker2 = new BigJobWorker2();
                   worker2.execute();
         //SwingWorker class
          class BigJobWorker2 extends SwingWorker<Void, Void>{
              protected Void doInBackground(){
                   try{
                        for(int i=0; i<10000;i++){
                        int num2 = (int)(Math.random() * 100);
                        Integer integerNum2 = num2;
                        tArea2.setText("iteration: " + i + " " + integerNum2.toString());
                        //ReallyBigJob rbj = new ReallyBigJob();
                        //tArea1.setText(rbj.doBigJob().toString());
                        tArea2.setText("done.");
                   } catch (Exception e3){
                   e3.printStackTrace();
              return null;
         private class BigJobWorker extends SwingWorker<Void, Void>{
              protected Void doInBackground(){
                   try{
                        for(int i=0; i<10000;i++){
                        int num = (int)(Math.random() * 100);
                        Integer integerNum = num;
                        tArea1.setText("iteration: " + i + " " + integerNum.toString());
                        //ReallyBigJob rbj = new ReallyBigJob();
                        //tArea1.setText(rbj.doBigJob().toString());
                        tArea1.setText("done.");
                   } catch (Exception e2){
                   e2.printStackTrace();
              return null;
          public static void main(String[] args) {
                 javax.swing.SwingUtilities.invokeLater(new Runnable() {
                      public void run() {
                            TestGui2 test = new TestGui2();
                            test.buildGui();
    BTW, I realize this code isn't as OOO as it could be (2 SwingWorker classes that do the same thing, 2 listeners that do the same thing) But I wanted to isoloate the problem first.
    thanks.
    Also, it's not impossible the program is working properly, it just finishes before the textArea can be updated.
    Edited by: badperson on Feb 28, 2008 8:24 AM
    Edited by: badperson on Feb 28, 2008 8:57 AM

    Hi,
    I reworked the code, and it now sort of works What I had wanted was to watch each window increment at the same rate, independant of each other. This will show a number in the window intemittenly, but not in a smooth continuous flow.
          class BigJobWorker2 extends SwingWorker<Void, String>{
              @Override
              protected Void doInBackground(){
                   try{
                        for(int i=0; i<100000;i++){
                        int num2 = (int)(Math.random() * 100);
                        Integer integerNum2 = num2;
                        //tArea2.setText("iteration: " + i + " " + integerNum2.toString());
                        publish("iteration: " + i + " " + integerNum2.toString());
                        //ReallyBigJob rbj = new ReallyBigJob();
                        //tArea1.setText(rbj.doBigJob().toString());
                        publish("done.");
                   } catch (Exception e3){
                   e3.printStackTrace();
                   tArea2.setText("EXCEPTION:");
              return null;
         // override process method
         @Override
            protected void process(List<String> messages) {
         Iterator i = messages.iterator();
              while (i.hasNext()){
              String message = (String)i.next();
              tArea2.setText(message);               
         } // end BigJobWorker2thanks,
    badperson

  • NewDataAvailable works on Desktop Application, but not in it's Applet port

    Hello everyone.
    I'm getting lost in trying to adapt an application i wrote using swings to an applet.
    I followed the basics, changed extends JFrame to JApplet, removed main and replaced it with init() and everything, and the applet does display.
    Sadly though, i've been having a hard time trying to have the applet update it's graphic as the data behind it changes.
    Basically, in the desktop version, i have a DefaultTableModel, a JTable (vector of vectors rows, vector columns). Each time i call my own method createVector(string a); a new vector is added to rows (the vector of vector of the jtable) and afterward a
    model.newRowsAdded(new TableModelEvent (table.getModel(), table.getRowCount()-1, table.getRowCount()-1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
    is also called (model being an instance of the DefaultTableModel object).
    This doesn't work with the applet version though, and i'm totally lost trying to understand why and how to fix it.
    Thanks everyone,
    Rob

    The console doesn't always provide info i guess, at the moment for example i fixed the issue of the thread topic, but i'm having a hard time opening a stream from a url defined like
    URL url = new URL("file", "\\\\10.170.35.34\\my_dir\\", "my_file.txt");
    InputStream fs = url.openStream();
    which works on the desktop version, but not in the applet one, whilst not throwing any exception in the console.
    EDIT: the thread title issue is me being ignorant about applets, and the differences between the class constructor, the run(), start() and init() methods. Having placed that call in the right method, it now works again.

  • Sharepoint Foundation - search working for some users (or computers), but not others

    Hi all,
    We have doozy of a search problem with SharePoint Foundation 2010 that I'm hoping someone can help with.
    We have an application that is listening on port 14197 and search is working just fine, but only for one or two users.
    If I do a search while logged in using the account we set the application up with then the search works fine and it returns records as expected.
    If I use a different account - one that has full control over the app, then the exact same search fails with the following message:
    We did not find any results for 06BSL.
    Suggestions:
    Ensure words are spelled correctly.
    Try using synonyms or related searches.
    Try broadening your search by searching from a different site.
    Additional resources:
    Get additional search tips by visiting Search Help
    If you cannot find a page that you know exists, contact your administrator.
    We've done everything we can think of, including several procedures to create new search accounts, replace databases, etc.
    Nothing has helped and all of the info we can find online is in relation to getting search working when it doesn't work at all.  In our case it is working, but only for some users.  We thought it might have been a permissions issue, but not matter
    what permissions we seem to give to test accounts they still don't work.  We've set up a test account, for example, that is a member of the 'application owners' group, but cannot produce any search results with it.
    The SharePoint Foundation server is running on Windows 2008 Server Foundation, with a separate SBS 2003 DC.  
    Any help most appreciated.

    Hi Alex, thanks for your response and apologies about the late reply - didn't realise someone had responded until now!
    Agreed that this looks like a permissions issue, but we're stumped as to what it could be.  The 'test' account displays this problem - if we try and search on 06BSL
    we get no results, but it does appear that this account has full control over this document (see below).
    Note that the 'Manage Permissions' page presents a comment 'This list item inherits permissions from its parent. (Customer QA & Product Management)' which is what we're
    expecting.
    The indexing schedule is set to 5 minutes. 
    Appreciate your help with this, as we've spent a huge amount of time on this problem but don't seem to be any closer to a resolution.
    Cheers,
    Damian
    Check permissions result (this result is the same for the list or for the document itself):
    Permission levels given to test (DOMAIN\test)
    Full Control
    Given through the "QA Application Owners" group.
    Design, Contribute, Read
    Given through the "QA Application Members" group. 

  • Why does GarageBand audio work for guest user but not my account?

    Hello, I have a 15-inch MacBook Pro (2.2 GHz Intel Core i7, 4GB 1333 MHz DDR3) from late 2011 that I bought brand new in 2012. I'm running OS X Mavericks 10.9.4 and my MacBook has 500 GB of storage.
    About a month or two ago I tried to download the new GarageBand (10.0.2) but I had trouble completing the loops download. The download would stop halfway through because of a network error. So last week I decided to try to download it again, and I was able to do so after reading some discussions about the issue. I successfully completed the download in safety mode and then I restarted my MacBook. At this point I was able to open GarageBand 10.0.2 and create a new project. Unfortunately, there was no audio coming through the output and sound bar for the various audio components in GarageBand. I had no audio when previewing the loops or playing it back in an audio track. I didn't really test anything else out because I figured I needed to fix this problem first. I have read many discussion boards about audio problems with GarageBand. I have already made sure everything is set properly in the GarageBand preferences and the audio preferences in system preferences. I've tried restarting GarageBand and restarting the computer.
    This evening I found a discussion from the username icewhatice and they seemed to have had my exact problem. I'm not sure that I found the answer on this discussion though. For reference, this is what icewhatice posted: "I have no audio coming from Garageband 10.0.2. Downloaded it on Saturday and have spent the last two days trying to figure out why it won't work. I'm using a macbook pro with an Alesis QX49. GB registers keyboard when I plug it in but no sound whatsoever, not even from the onscreen keyboard. It seems to read the keyboard as if I play a C chord, it appears in the display. I've done all the obvious stuff like check preferences, restart, I've deleted and downloaded new GB several times and always with same result. Actually, it took me about four attempts to download it in the first place as I was getting an internet connection error message right at the end of the download, and I see others have had that problem. Managed to solve that by downloading in safe mode but now the no sound thing is driving me absolutely crazy because I can't play my keyboard!!!!! Also, worth noting that there is no audio level being read anywhere, I believe in the new version this appears in the volume control at the top. I've also looked into it potentially being a problem with my keyboard and it possibly needing an update but can't find any difinitive answer for that anywhere. I've stopped looking into that because the on screen keyboard doesn't even work - if that worked then I would know at least GB works and it's something to do with the keyboard. So, I am at a complete loss. If anyone has any ideas about why this is happening or what I could do to solve then I would be very grateful."
    After reading this, I realized that I am unable to create new tracks, and I realized that I have the same problems with old projects saved from the last version of GarageBand I had. I have not tried to download GarageBand again since it did not work for icewhatice. léonie ended this post by saying: "Something is certainly wrong - either the current project, some settings in your user account, or the downloaded GarageBand version. Or incompatible software may be interfering. If a new project does not work, try to test by logging into a different user account, for example the "Guest User" account. Create a new project using this account. Does GarageBand work better from this account?  Then we will need to troubleshoot your preferences."
    I have tried this and started a new GarageBand project in the "Guest User" account. GarageBand was working fine in the "Guest User" account and all of the audio was working properly. Does anyone know how I should troubleshoot my preferences?

    If an application is working in a different account, but not in your regular account,try t find out, what you configured differently in your own account, for example start-up items or preference panes you are using, applications and other helper tools, that are only installed for your regular account. As a first guess, remove GarageBands preference files from the user library in your Home folder.
    But you will have to reset all settings you did in the GarageBand preferences dialog. And GarageBand will not remember the last project. You'll have to find the file manually.
    Remove these files from your User Library to a folder on your Desktop:
    ~/Library/Containers/com.apple.garageband10/
    ~/Library/Preferences/com.apple.garageband.plist
    ~/Library/Caches/garageband
    Quit GarageBand, then remove the files to a folder on the Desktop and restart the computer, before trying again to open GarageBand.
    You user library may still be hidden, as is the default in Mavericks: To open your hidden user library:
    Select the "Home" folder icon (the little house)  in the Finder's sidebar and press the key combination ⌘J to open the "view options".
    Enable "Show Library Folder".
    Then open the Home folder and open the Library folder inside and navigate to the Preferences, Caches, or Containers folder. Remove these folders completely - don't leave anything inside:  ~/Library/Containers/com.apple.garageband10/,
    ~/Library/Caches/garageband  .

Maybe you are looking for