Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

Problem executing an Application, could not find a jar file though in the classpath (urgent)

Hello,

   i am executing an Application which i have already executed and it was working properly.
Now i made some changes to the packages and trying to execute it.
I am using 6 packages and i have jared them separately. i downloaded 4 jar files which are used by my Application.

my manifest file contains these data :
Manifest-Version: 1.0
Main-Class: mypack.mainpgm
Created-By: 1.3.0 (Sun Microsystems Inc.)
Class-Path: x.jar y.jar .....


my batch file contains

set classpath=..\J2sdk1.4.0_02BIN;..\a\x.jar;..\a\y.jar...
java mypack.mainpgm

It is not able to use "y.jar" , though i have used it in Manifest file as well as in the batch file.
The functionality of y.jar is not working in my Application. and this y.jar is the downloaded jar file.

The same jar file is working even now in the previous version. Also i used Editplus editor for the previous version.

For the current version i used Netbeans.

i am struggling from past 4 days on this,


pls help me with this problem,

Thanks and regards,

chaitra



0
alpjose
Asked:
alpjose
  • 5
  • 4
1 Solution
 
girionisCommented:
 Do you get any error messages? If yes can you please post them here?
0
 
alpjoseAuthor Commented:
When i move the mouse over the image,
the x and y value of the image got by getX() and getY() method are used to calculate certain value , to achieve this it is passed to a class present in nom.tam.fits.Header which is present in fits.jar. when i am executing it using NetBeans it is working properly, when i convert all packages into jar so as to execute it on different machine, i am getting this exception when mouse is moved over the image,



 
inside mouseMoved of AstroInternalFrame
        at astro.AstroInternalFrame.mouseMoved(AstroInternalFrame.java:427)
        at java.awt.Component.processMouseMotionEvent(Component.java:5066)
        at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:2763
 inside mouseMoved of AstroInternalFrame11111111111111nom.tam.util.BufferedDat
nputStream@6b9c84[count=0,pos=0]
        at java.awt.Component.processEvent(Component.java:4822)
        at java.awt.Container.processEvent(Container.java:1525)
        at java.awt.Component.dispatchEventImpl(Component.java:3526)
        at java.awt.Container.dispatchEventImpl(Container.java:1582)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:33
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:308

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)
        at java.awt.Container.dispatchEventImpl(Container.java:1568)
 inside mouseMoved of AstroInternalFrame
        at java.awt.Window.dispatchEventImpl(Window.java:1581)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
 inside mouseMoved of AstroInternalFrame11111111111111nom.tam.util.BufferedDat
nputStream@be16f5[count=0,pos=0]
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatch
read.java:191)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchTh
ad.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
java.lang.NoSuchMethodError: nom.tam.fits.Header.<init>(Lnom/tam/util/Buffered
taInputStream;)V
        at astro.AstroInternalFrame.mouseMoved(AstroInternalFrame.java:427)
        at java.awt.Component.processMouseMotionEvent(Component.java:5066)
        at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:2763
        at java.awt.Component.processEvent(Component.java:4822)
        at java.awt.Container.processEvent(Container.java:1525)
        at java.awt.Component.dispatchEventImpl(Component.java:3526)
        at java.awt.Container.dispatchEventImpl(Container.java:1582)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:33
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:308

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004) i
ide mouseMoved of AstroInternalFrame

        at java.awt.Container.dispatchEventImpl(Container.java:1568)
        at java.awt.Window.dispatchEventImpl(Window.java:1581)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatch
read.java:191)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchTh
ad.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
java.lang.NoSuchMethodError: nom.tam.fits.Header.<init>(Lnom/tam/util/Buffered
taInputStream;)V
        at astro.AstroInternalFrame.mouseMoved(AstroInternalFrame.java:427)
        at java.awt.Component.processMouseMotionEvent(Component.java:5066)
        at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:2763
        at java.awt.Component.processEvent(Component.java:4822)
        at java.awt.Container.processEvent(Container.java:1525)
        at java.awt.Component.dispatchEventImpl(Component.java:3526)
        at java.awt.Container.dispatchEventImpl(Container.java:1582)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:33
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:308

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)
        at java.awt.Container.dispatchEventImpl(Container.java:1568)
        at java.awt.Window.dispatchEventImpl(Window.java:1581)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatch
read.java:191)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchTh
ad.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
java.lang.NoSuchMethodError: nom.tam.fits.Header.<init>(Lnom/tam/util/Buffered
taInputStream;)V
        at astro.AstroInternalFrame.mouseMoved(AstroInternalFrame.java:427)
        at java.awt.Component.processMouseMotionEvent(Component.java:5066)
 inside mouseMoved of AstroInternalFrame11111111111111nom.tam.util.BufferedDat
nputStream@8166e5[count=0,pos=0]        at javax.swing.JComponent.processMouse
tionEvent(JComponent.java:2763)
        at java.awt.Component.processEvent(Component.java:4822)
        at java.awt.Container.processEvent(Container.java:1525)

        at java.awt.Component.dispatchEventImpl(Component.java:3526)
        at java.awt.Container.dispatchEventImpl(Container.java:1582)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:33
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:308

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)
        at java.awt.Container.dispatchEventImpl(Container.java:1568)
        at java.awt.Window.dispatchEventImpl(Window.java:1581)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatch
read.java:191)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchTh
ad.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
java.lang.NoSuchMethodError: nom.tam.fits.Header.<init>(Lnom/tam/util/Buffered
taInputStream;)V
        at astro.AstroInternalFrame.mouseMoved(AstroInternalFrame.java:427)
        at java.awt.Component.processMouseMotionEvent(Component.java:5066)
        at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:2763
        at java.awt.Component.processEvent(Component.java:4822)
        at java.awt.Container.processEvent(Container.java:1525)
        at java.awt.Component.dispatchEventImpl(Component.java:3526)
        at java.awt.Container.dispatchEventImpl(Container.java:1582)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:33
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:308

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)
        at java.awt.Container.dispatchEventImpl(Container.java:1568)
        at java.awt.Window.dispatchEventImpl(Window.java:1581)
        at java.awt.Component.dispatchEvent(Component.java:3367)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatch
read.java:191)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchTh
ad.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:13

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)


thanks and regards,

0
 
girionisCommented:
 Look at this: java.lang.NoSuchMethodError: nom.tam.fits.Header.<init>(Lnom/tam/util/Buffered
taInputStream;)V it's missing a method. You have porbably jarred up a different method of the class. Can you make sure that the classes are the exact ones as the ones you use with the project?

  Also, do you have any more error message in the beginning of the stack?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
alpjoseAuthor Commented:
No This is all the exception I get when i move the mouse over the image.

nom.tam.fits.Header is in a jar file called fits.jar which was downloaded from internet.

And also the same thing works fine if i am executing with netbeans, only when i convert it into jar it doestn't work.

The jar is not recognised,

this is the problem.

regards
0
 
girionisCommented:
 Does your JAR file contains the nom.tam.fits.Header class?
0
 
alpjoseAuthor Commented:
yes, it contains nom.tam.fits.Header class
0
 
girionisCommented:
 It seems to me that NetBeans uses a different class that has different methods in it. Is it possible to check NetBeans' classpath and see if there's something else in there that is not when you create your jar file?

  It would also be good trying to delete your jar file and create another one from scratch.
0
 
alpjoseAuthor Commented:
I changed the classpath and put this jar file into a different directory and it is working now,

thank you
0
 
girionisCommented:
 I am glad I helped. Thank you for the points :-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now