Note that there are some explanatory texts on larger screens.

plurals
  1. POJar file works great until it is signed (in Windows)
    primarykey
    data
    text
    <p>I'm going to start this out by saying I'm not a Java programmer, I'm a PHP programmer.</p> <p>I ran into a situation were websockets weren't going to cut it and I found this site that offered a solution:</p> <p><a href="http://stephengware.com/proj/javasocketbridge/" rel="nofollow">http://stephengware.com/proj/javasocketbridge/</a></p> <p>It's basically a Jar that you can load in and control with JavaScript. It works great, I'd highly recommend it to anyone needing similar functionality. However, since the Jar was not signed, every time the page loads, it shows a security warning. It's a little annoying and I thought that if I self-signed the Jar, it would have the 'Never show me this again' / 'Allow Forever' check box enabled. This is to be deployed internally to our organization, so signing it with a paid cert doesn't seem necessary.</p> <p>The problem is that as soon as I sign the Jar, it doesn't work. I get a class not found error. I've looked at dozens of sites that show you how to sign Jar files and googled this to page 10, and I can't find anyone that's had this kind of issue.</p> <p>I'm going to include the parts that I think are needed, if you need something else let me know and I'll get it.</p> <p>Applet code:</p> <pre><code>&lt;applet id="JavaSocketBridge" archive="JavaSocketBridge.jar" code="JavaSocketBridge.class" width="400" height="30"&gt;&lt;/applet&gt; </code></pre> <p>How I signed the Jar (in an administrator command prompt):</p> <pre><code>C:\Program Files\Java\jdk1.7.0_07\bin&gt;keytool -genkey -keyalg rsa -alias crtlive Enter keystore password: What is your first and last name? [Unknown]: first last What is the name of your organizational unit? [Unknown]: Tech What is the name of your organization? [Unknown]: ourorg What is the name of your City or Locality? [Unknown]: city What is the name of your State or Province? [Unknown]: ST What is the two-letter country code for this unit? [Unknown]: US Is CN=first last, OU=Tech, O=ourorg, L=city, ST=ST, C=US correct? [no]: yes Enter key password for &lt;crtlive&gt; (RETURN if same as keystore password): C:\Program Files\Java\jdk1.7.0_07\bin&gt;keytool -export -alias crtlive -file crtlive .crt Enter keystore password: Certificate stored in file &lt;crtlive.crt&gt; C:\Program Files\Java\jdk1.7.0_07\bin&gt;jarsigner JavaSocketBridge.jar crtlive Enter Passphrase for keystore: Warning: The signer certificate will expire within six months. C:\Program Files\Java\jdk1.7.0_07\bin&gt;keytool -export -alias crtlive -rfc -file s ig.x509 Enter keystore password: Certificate stored in file &lt;sig.x509&gt; C:\Program Files\Java\jdk1.7.0_07\bin&gt; </code></pre> <p>I've opened up both the unsigned and signed Jars and the source files are identical, there are just two additional files in the META-INF folder on the signed Jar: CRTLIVE.RSA and CRTLIVE.SF.</p> <p>Here's the thread dump:</p> <pre><code>Dump thread list ... Group main,ac=18,agc=4,pri=10 main,5,alive traceMsgQueueThread,5,alive,daemon Timer-0,5,alive Java Plug-In Pipe Worker Thread (Client-Side),5,alive,daemon AWT-Windows,6,alive,daemon SysExecutionTheadCreator,5,alive,daemon CacheMemoryCleanUpThread,5,alive,daemon CacheCleanUpThread,5,alive,daemon Browser Side Object Cleanup Thread,5,alive JVM[id=4]-Heartbeat,5,alive,daemon AWT-Shutdown,5,alive AWT-EventQueue-0,6,alive Group Plugin Thread Group,ac=2,agc=0,pri=10 AWT-EventQueue-1,6,alive TimerQueue,5,alive,daemon Group http://www.example.com/admin/-threadGroup,ac=0,agc=0,pri=4,destoyed Group http://www.example.com/admin/-threadGroup,ac=0,agc=0,pri=4,destoyed Group http://www.example.com/admin/-threadGroup,ac=4,agc=0,pri=4 Applet 49 LiveConnect Worker Thread,4,alive AWT-EventQueue-23,4,alive TimerQueue,4,alive,daemon ConsoleTraceListener,4,alive,daemon Done. </code></pre> <p>The thread stack is on the long side, but here it is:</p> <pre><code>Full thread dump Java HotSpot(TM) Client VM (23.3-b01 mixed mode, sharing): "TimerQueue" daemon prio=6 tid=0x04d55800 nid=0x1f28 waiting on condition [0x0ac7f000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for &lt;0x24820770&gt; (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.util.concurrent.DelayQueue.take(Unknown Source) at javax.swing.TimerQueue.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "ConsoleTraceListener" daemon prio=4 tid=0x04e12400 nid=0x2c14 runnable [0x09d7f000] java.lang.Thread.State: RUNNABLE at java.lang.Object.wait(Native Method) at java.lang.Thread.join(Unknown Source) - locked &lt;0x244218e0&gt; (a sun.plugin.util.PluginSysUtil$SysExecutionThread) at java.lang.Thread.join(Unknown Source) at sun.plugin.util.PluginSysUtil.execute(Unknown Source) at sun.plugin.util.PluginSysUtil.execute(Unknown Source) at sun.plugin.util.PluginSysUtil.delegate(Unknown Source) at com.sun.deploy.util.DeploySysRun.execute(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.ui.SwingConsoleWindow.invokeLater(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.ui.SwingConsoleWindow.append(Unknown Source) at com.sun.deploy.uitoolkit.ui.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source) "AWT-EventQueue-1" prio=6 tid=0x04e37400 nid=0x338 waiting on condition [0x0a10e000] java.lang.Thread.State: RUNNABLE at com.sun.deploy.uitoolkit.ui.ConsoleHelper.dumpAllStacksImpl(Native Method) at com.sun.deploy.uitoolkit.ui.ConsoleHelper.dumpAllStacks(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.ui.SwingConsoleWindow$3.actionPerformed(Unknown Source) at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source) at javax.swing.SwingUtilities.notifyAction(Unknown Source) at javax.swing.JComponent.processKeyBinding(Unknown Source) at javax.swing.KeyboardManager.fireBinding(Unknown Source) at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source) at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source) at javax.swing.JComponent.processKeyBindings(Unknown Source) at javax.swing.JComponent.processKeyEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) "TimerQueue" daemon prio=4 tid=0x04e11c00 nid=0x1f7c waiting on condition [0x0940f000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for &lt;0x24820e00&gt; (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.util.concurrent.DelayQueue.take(Unknown Source) at javax.swing.TimerQueue.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "AWT-EventQueue-23" prio=4 tid=0x04e32c00 nid=0x31d8 waiting on condition [0x09e5f000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for &lt;0x29e3a6b8&gt; (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.awt.EventQueue.getNextEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) "Applet 49 LiveConnect Worker Thread" prio=4 tid=0x04de8c00 nid=0x2e88 in Object.wait() [0x09c6f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(Unknown Source) - locked &lt;0x29e3a798&gt; (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "AWT-EventQueue-0" prio=6 tid=0x04de8800 nid=0x1038 waiting on condition [0x0977f000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for &lt;0x2998d388&gt; (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(Unknown Source) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source) at java.awt.EventQueue.getNextEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) "AWT-Shutdown" prio=6 tid=0x04d56000 nid=0x37f8 in Object.wait() [0x07cdf000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at sun.awt.AWTAutoShutdown.run(Unknown Source) - locked &lt;0x2998d4f0&gt; (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "D3D Screen Updater" daemon prio=8 tid=0x04e35800 nid=0x674 in Object.wait() [0x0963f000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source) - locked &lt;0x2998cdf0&gt; (a java.lang.Object) at java.lang.Thread.run(Unknown Source) "JVM[id=4]-Heartbeat" daemon prio=6 tid=0x04e33800 nid=0x2578 in Object.wait() [0x054df000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at sun.plugin2.main.server.HeartbeatThread.run(Unknown Source) - locked &lt;0x2998d010&gt; (a sun.plugin2.main.client.PluginMain$Heartbeat) "Browser Side Object Cleanup Thread" prio=6 tid=0x04e32400 nid=0x1834 in Object.wait() [0x07f1f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on &lt;0x2998d180&gt; (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked &lt;0x2998d180&gt; (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.plugin2.main.client.LiveConnectSupport$BrowserSideObjectCleanupThread.run(Unknown Source) "CacheCleanUpThread" daemon prio=6 tid=0x04e28000 nid=0x2208 in Object.wait() [0x07b5f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at com.sun.deploy.cache.CleanupThread.run(Unknown Source) - locked &lt;0x2998d1a0&gt; (a com.sun.deploy.cache.CleanupThread) "CacheMemoryCleanUpThread" daemon prio=6 tid=0x04e21000 nid=0x3484 in Object.wait() [0x0735f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on &lt;0x2998d290&gt; (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked &lt;0x2998d290&gt; (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at com.sun.deploy.cache.MemoryCache$LoadedResourceCleanupThread.run(Unknown Source) "SysExecutionTheadCreator" daemon prio=6 tid=0x04dd8400 nid=0x2f40 in Object.wait() [0x07e8f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at sun.plugin.util.PluginSysUtil$SysExecutionThreadCreator.run(Unknown Source) - locked &lt;0x2998d2b0&gt; (a sun.plugin.util.PluginSysUtil$SysExecutionThreadCreator) "AWT-Windows" daemon prio=6 tid=0x04dabc00 nid=0x1eb4 runnable [0x00daf000] java.lang.Thread.State: RUNNABLE at sun.awt.windows.WToolkit.eventLoop(Native Method) at sun.awt.windows.WToolkit.run(Unknown Source) "Java2D Disposer" daemon prio=10 tid=0x04da0c00 nid=0x3014 in Object.wait() [0x057cf000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked &lt;0x2998d580&gt; (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at sun.java2d.Disposer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) "Java Plug-In Pipe Worker Thread (Client-Side)" daemon prio=6 tid=0x04d99000 nid=0x1e74 runnable [0x058df000] java.lang.Thread.State: RUNNABLE at sun.plugin2.os.windows.Windows.ReadFile0(Native Method) at sun.plugin2.os.windows.Windows.ReadFile(Unknown Source) at sun.plugin2.ipc.windows.WindowsNamedPipe.read(Unknown Source) at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.read(Unknown Source) at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.readByte(Unknown Source) at sun.plugin2.message.AbstractSerializer.readInt(Unknown Source) at sun.plugin2.message.transport.SerializingTransport.read(Unknown Source) at sun.plugin2.message.Pipe$WorkerThread.run(Unknown Source) "Timer-0" prio=6 tid=0x04d75800 nid=0x1438 in Object.wait() [0x0517f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on &lt;0x2998d8c0&gt; (a java.util.TaskQueue) at java.lang.Object.wait(Object.java:503) at java.util.TimerThread.mainLoop(Unknown Source) - locked &lt;0x2998d8c0&gt; (a java.util.TaskQueue) at java.util.TimerThread.run(Unknown Source) "traceMsgQueueThread" daemon prio=6 tid=0x04cce800 nid=0x2aec in Object.wait() [0x04b0f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at com.sun.deploy.trace.Trace$TraceMsgQueueChecker.run(Unknown Source) - locked &lt;0x298b6d28&gt; (a java.util.ArrayList) at java.lang.Thread.run(Unknown Source) "Service Thread" daemon prio=6 tid=0x00b14400 nid=0x2804 runnable [0x00000000] java.lang.Thread.State: RUNNABLE "C1 CompilerThread0" daemon prio=10 tid=0x00b0fc00 nid=0x1ff4 waiting on condition [0x00000000] java.lang.Thread.State: RUNNABLE "Attach Listener" daemon prio=10 tid=0x00b0e800 nid=0x1980 runnable [0x00000000] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" daemon prio=10 tid=0x00b0b400 nid=0x21bc runnable [0x00000000] java.lang.Thread.State: RUNNABLE "Finalizer" daemon prio=8 tid=0x00ae4000 nid=0x2df0 in Object.wait() [0x047df000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.ref.ReferenceQueue.remove(Unknown Source) - locked &lt;0x2998db48&gt; (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(Unknown Source) at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) "Reference Handler" daemon prio=10 tid=0x00ae2800 nid=0xc0c in Object.wait() [0x0485f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) - locked &lt;0x2998cd80&gt; (a java.lang.ref.Reference$Lock) "main" prio=6 tid=0x003ddc00 nid=0x2fa0 in Object.wait() [0x0098f000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at sun.plugin2.message.Queue.waitForMessage(Unknown Source) - locked &lt;0x2998dbd0&gt; (a sun.plugin2.message.Queue) at sun.plugin2.message.Pipe$1.run(Unknown Source) at com.sun.deploy.util.Waiter$1.wait(Unknown Source) at com.sun.deploy.util.Waiter.runAndWait(Unknown Source) at sun.plugin2.message.Pipe.receive(Unknown Source) at sun.plugin2.main.client.PluginMain.mainLoop(Unknown Source) at sun.plugin2.main.client.PluginMain.run(Unknown Source) at sun.plugin2.main.client.PluginMain.main(Unknown Source) "VM Thread" prio=10 tid=0x00ae1000 nid=0x23f4 runnable "VM Periodic Task Thread" prio=10 tid=0x00b2fc00 nid=0x32b8 waiting on condition lugin2.main.client.PluginMain.run(Unknown Source) at sun.plugin2.main.client.PluginMain.main(Unknown Source) "VM Thread" prio=10 tid=0x00ae1000 nid=0x23f4 runnable "VM Periodic Task Thread" prio=10 tid=0x00b2fc00 nid=0x32b8 waiting on condition ---------------------------------------------------- Done. </code></pre> <p>I've googled for everything I could think of, any help would be appreciated.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload