?
Solved

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

Posted on 2003-03-11
9
Medium Priority
?
177 Views
Last Modified: 2013-11-23
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
Comment
Question by:alpjose
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 8119242
 Do you get any error messages? If yes can you please post them here?
0
 

Author Comment

by:alpjose
ID: 8125043
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
 
LVL 35

Expert Comment

by:girionis
ID: 8126433
 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:alpjose
ID: 8126913
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
 
LVL 35

Expert Comment

by:girionis
ID: 8126976
 Does your JAR file contains the nom.tam.fits.Header class?
0
 

Author Comment

by:alpjose
ID: 8145682
yes, it contains nom.tam.fits.Header class
0
 
LVL 35

Accepted Solution

by:
girionis earned 150 total points
ID: 8146116
 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
 

Author Comment

by:alpjose
ID: 8149348
I changed the classpath and put this jar file into a different directory and it is working now,

thank you
0
 
LVL 35

Expert Comment

by:girionis
ID: 8150406
 I am glad I helped. Thank you for the points :-)
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month12 days, 10 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question