Can't make Executable JAR file with library in Eclipse - java

I'm trying to export my project as executable jar, and all is good except one thing: there are 2 windows - the first is main jframe and second is jframe for making 3D surfaces using jzy3d library; the first window contains button "Show" for executing the second jframe. When I execute this project in Eclipse it works good, but when I make executable jar it is executed, but if I click by "Show" button the second jframe doesn't open. So, please, tell me, how can I fix it?
UPDATE: the info from cmd:
Catched FileNotFoundException: C:\destination-natives-windows-i586.jar (═х єфр
ё  эрщЄш єърчрээ√щ Їрщы), while TempJarCache.bootstrapNativeLib() of jar:file:
:/destination-natives-windows-i586.jar!/ (file:/C:/ + destination-natives-wind
s-i586.jar)
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no glue
n-rt in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLo
erBase.java:454)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.
va:59)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JN
ibLoaderBase.java:90)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase
ava:328)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibr
y(DynamicLibraryBundle.java:390)
at com.jogamp.common.os.Platform$2.run(Platform.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.common.os.Platform.loadGlueGenRTImpl(Platform.java:231)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:183)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:99)
at org.jzy3d.global.Settings.<init>(Settings.java:12)
at org.jzy3d.global.Settings.getInstance(Settings.java:21)
at com.nda.fuzzy.views.SurfaceViewerFrame.<init>(SurfaceViewerFrame.ja
:102)
at com.nda.fuzzy.views.MainFrame$26.actionPerformed(MainFrame.java:579
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknow
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(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 So
ce)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown So
ce)
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 So
ce)
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)

Probaly on command line you did not specify the classpath for jzy3d library
You can run a jar file with lib:
"java -cp libs/* -jar program.jar"
where you put your lib (jzy3d.jar) in the libs folder
If you have used some special tool that creates an executable jar file,
then you have to configure that tool to include the jzy3d.jar lib to be used inside the exe.

You'll need to do one of the following:
repack the contents of each jarfile dependency in your own executable jarfile
use an .exe wrapper such as Launch4j to pack your jarfiles into a self-extracting-and-launching executable
include the jarfile dependencies in the Class-Path attribute of your MANIFEST.MF when creating the executable jarfile from Eclipse, and include those dependencies in the appropriate relative location when you distribute your application
Of the above options, 1 might be the easiest and most convenient for you. If you extract the contents of the jarfile dependencies into an Eclipse project, it is then very easy to include those resources when you create your jarfile using Eclipse's wizard.
Options 2 and 3 are also pretty straightforward but I would recommend making an ant script so you can have a 1-click build.

Related

java security not allowing me to open take pics using Jfilechooser

I am making an application in which one of the features the constructor requires a picture. The picture is selected using the JFileChooser obviously and then displayed on a JLabel. My problem is I do not have security privilege to access the picture. I tested to see if I do get the absolute path and if the file exists and I did get the path and true for the latter. So how do I give my app access to at least just get pictures?
My code
JFileChooser chooser = new JFileChooser();
chooser.setFileFilter(new FileNameExtensionFilter("jpg","png"));
int returnVal = chooser.showOpenDialog(diag);
if(returnVal == JFileChooser.APPROVE_OPTION) {
weaponImg = new ImageIcon(TempDialogs.class.getResource(chooser.getSelectedFile().getAbsolutePath()));
weaponPic.setIcon(weaponImg);
weaponPic.revalidate();
weaponPic.repaint();
My error
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at ui.TempDialogs$5.mouseClicked(TempDialogs.java:171)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(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$500(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$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.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$JavaSecurityAccessImpl.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)
java security not allowing me ..
This has nothing to do with security, despite the stack trace mentioning 'security' in some of the lines. The real problem is at the very top of the stack trace, ..
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
And I expect it all starts with this line of code..
weaponImg = new ImageIcon(TempDialogs.class.getResource(chooser.getSelectedFile().getAbsolutePath()));
Which is both wrong and unnecessarily convoluted.
Get resource is for producing an URL from resources on the application's class path, it is neither needed nor useful for files.
So in this case of trying to access a file, we can use either a File object, or a String the represents a path to a file on the file system. So it could be shortened to:
weaponImg = new ImageIcon(chooser.getSelectedFile().getAbsolutePath()); // use String
But as alluded to, it could also be loaded as a plain File, so this would also work:
weaponImg = new ImageIcon(chooser.getSelectedFile()); // use File!

jar file not performing all feature in another application with stacktrace

I am creating a standalone application in java. I create a jar file of that application by Netbeans IDE; .jar working fine in my system but not working all feature in another system. I am using jar library in my application. Exception is showing Noclassdeffound. This application scan qr code. This works fine in my system but even webcam in not open in another system. Please help me. Thanks.
stacktrace is as follows
C:\Users\Shubham\Downloads>java -jar JavaApplication1(2).jar
h3llo44444
hello world1111=null
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/githu
b/sarxos/webcam/WebcamPanel
at javaapplication1.MainFrame.jButton2ActionPerformed(MainFrame.java:248
)
at javaapplication1.MainFrame.access$100(MainFrame.java:33)
at javaapplication1.MainFrame$2.actionPerformed(MainFrame.java:104)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(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 Sour
ce)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
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 Sour
ce)
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)
Caused by: java.lang.ClassNotFoundException: com.github.sarxos.webcam.WebcamPane
l
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 39 more
Noclassdeffound error is thrown when the Java Virtual Machine (JVM) or an instance of the ClassLoader class tries to load the definition of a class, but the definition could not be found.where a class has a dependency on some other class and that class is not accessible.
In short at if you have used any external jar file than that jar file will be required at compile time as well at Run-time also in your case it seems that JVM is unable to find external jar file that contains WebcamPanel class at run time. so you need to pack that Jar file also with your application's Jar file.
for how to add External Jar file in your project you can refer
How can I include external jar on my Netbeans project

Java- Can't apply Java Look and Feel

I'm using Synthetica Look and Feel in my application and it works fine on Eclipse. But when i export the Jar file and execute it i got these errors :
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: sun/swing/plaf/synth/SynthUI
at de.javasoft.plaf.synthetica.SyntheticaDefaultLookup.getDefault(SyntheticaDefaultLookup.java:105)
at sun.swing.DefaultLookup.get(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.getInputMap(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.installKeyboardActions(Unknown Source)
at javax.swing.plaf.basic.BasicButtonUI.installKeyboardActions(Unknown Source)
at javax.swing.plaf.basic.BasicButtonUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.AbstractButton.setUI(Unknown Source)
at javax.swing.JButton.updateUI(Unknown Source)
at javax.swing.AbstractButton.init(Unknown Source)
at javax.swing.JButton.<init>(Unknown Source)
at javax.swing.JButton.<init>(Unknown Source)
at de.javasoft.plaf.synthetica.SyntheticaLookAndFeel.installCompatibilityDefaults(SyntheticaLookAndFeel.java:925)
at de.javasoft.plaf.synthetica.SyntheticaLookAndFeel$4.propertyChange(SyntheticaLookAndFeel.java:582)
at java.beans.PropertyChangeSupport.fire(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
at com.evaluator.MainWindow.<init>(MainWindow.java:85)
at com.evaluator.Main$1.run(Main.java:15)
at java.awt.event.InvocationEvent.dispatch(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.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)
Caused by: java.lang.ClassNotFoundException: sun.swing.plaf.synth.SynthUI
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 35 more
I don't know where is the problem exactly. Here is the way I'm applying the Synthetica Blue Steel Look And Feel :
try
{
UIManager.setLookAndFeel(new SyntheticaBlueSteelLookAndFeel());
UIManager.put("Synthetica.rootPane.titlePane.title.center", true);
UIManager.put("Synthetica.translucency4DisabledIcons.enabled", true);
}
catch (Exception e) {}
Please see the error it can't find the sun/swing/plaf/synth/SynthUI
Library. In development mode You are include that jar file in eclipse library but when you are create a jar file then you are not include the Synthui theme jar. Put that Synthui jar file in jar, ext/ folder and it work fine
I think the way you are exporting the jar file is not correct.
Try exporting the jar as a Runnable jar file.
Follow these steps to export your app as a runnable jar.
1) select export from the file menu.
2) select Java->Runnable JAR file
3) Select the launch configuration i.e your main class.
4) first two option of library handling if you want to package the substance library file in your own jar and the third option(copy required library into a sub folder next to the generated jar) if you want to separate the generated jar file and substance libs.
5)Press finish.
I hope this would solve your problem. :)

java.lang.NoClassDefFoundError: org/json/simple/JSONObject running outside of Netbeans IDE

Similar questions have been asked here about this error, but I have tried most of the solutions and still get the same error message. I'm using json-simple library in my java app. I have included the json-simple-1.1.1.jar file in my library. Running through Netbeans works perfectly. When I try running it through the command line "java -jar " I get the following error. Even "java -cp json-simple-1.1.1.jar -jar still give the same error.
nullException in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/json/simple/JSONObject
at gui.keo_synopticx.jb_save_configMouseClicked(keo_synopticx.java:5318)
at gui.keo_synopticx.access$6000(keo_synopticx.java:49)
at gui.keo_synopticx$60.mouseClicked(keo_synopticx.java:3358)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(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)
Caused by: java.lang.ClassNotFoundException: org.json.simple.JSONObject
at java.net.URLClassLoader$1.run(Unknown Source)
I may be missing a dependency for json-simple-1.1.1? Any advice would be greatly appreciated.
The org/json/simple/JSONObject class is definitely in the jar file.
The only reason for the problem I can think of is that you did not specify the jar file path, and that the jar is not in the same directory as your execution directory.
To solve this issue you should precise your classpath on the terminal:
syntaxe:
java -classpath <your_archive.jar> [<package>.]<Class_name>
don't forget the package if the class belongs to one.

Exception in thread "AWT-EventQueue-1" java.lang.UnsatisfiedLinkError: no jcom in java.library.path

I am running java desktop application which is coded in java 1.4 version. i am using eclipe as my ide and trying to run that application in java 1.6 version in that project they use jcom jar file to export data to excel sheet. while i trying to click on excel button in desktop application . That functionality is not working and throwing below exception.but i build path properly in my project explorer jcom jar is present in referenced libraries. can any one plz help me to sort out this exception. thanks in advance.
Exception in thread "AWT-EventQueue-1" java.lang.UnsatisfiedLinkError: no jcom in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at jcom.IDispatch.(IDispatch.java:287)
at .StockManager.BusinessSheets.exportToExcel(BusinessSheets.java:2302)
at .StockManager.BusinessSheets$BusinessSheetPanel$3.mouseClicked(BusinessSheets.java:439)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(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$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at .StockManager.WaitCursorEventQueue.dispatchEvent(WaitCursorEventQueue.java:23)
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)
case 1:
jcom.dll is not in path.
solution:
put the jcom.dll in C:/Windows/System32
case 2:
jcom.dll is used by someother process
solution:
try to find that process and kill it.
The java.library.path is using for JNI shared libraries such as DLLs or .so files. It appears your jcom.jar (which you can see is being loaded on the third line of the stack so it finds the JAR) needs a jcom.dll. On windows, this has to be in your PATH or java.library.path

Categories

Resources