• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JFrame & Jar Files

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks:
problem:
i have made an single program application usin JFrame.it works when i run it from aDOS prompt. but i want to make it clickable ie make an icon, so i created a jar file n made the JFrame class as manifest, but it doenst not work and gives an error :
i would appreciate ur help.
*********************
Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: org/w3c/dom/DOMException
at QuoteInfoLogging.actionPerformed(QuoteInfoLogging.java:445)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.
66)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
ctButton.java:1101)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButt
.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.j
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Basic
istener.java:204)
at java.awt.Component.processMouseEvent(Component.java:3165)
at java.awt.Component.processEvent(Component.java, Compiled Code)
at java.awt.Container.processEvent(Container.java, Compiled Code)
at java.awt.Component.dispatchEventImpl(Component.java, Compiled
at java.awt.Container.dispatchEventImpl(Container.java, Compiled
at java.awt.Component.dispatchEvent(Component.java, Compiled Code
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.ja
piled Code)
at java.awt.LightweightDispatcher.processMouseEvent(Container.jav
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:17
at java.awt.Container.dispatchEventImpl(Container.java, Compiled
at java.awt.Window.dispatchEventImpl(Window.java:749)
at java.awt.Component.dispatchEvent(Component.java, Compiled Code
at java.awt.EventQueue.dispatchEvent(EventQueue.java, Compiled Co
at java.awt.EventDispatchThread.pumpOneEventForComponent(EventDis
read.java, Compiled Code)
at java.awt.EventDispatchThread.pumpEventsForComponent(EventDispa
ad.java:95)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.ja
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Thanks,
Hetal
 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hetal,
The problem is not with your jar file, as it is running fine. You need to add the reference of the JAXP, Crimson, and Xalan jar files to your classpath. If you set it in a dosprompt window the settings are temporary and are for only that window. Either add the classpath setting to the autoexec.bat (win 9x) or system environment properties (win 2k). Alternatively you could simply copy the jar files in your JVM's /lib/ext folder. Do make a copy in both the jvm's viz. the jdk and the jre (in Program Files folder).
Regards,
Amit
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think u can also execute it using a batch file.
The Batch File Content Is something like this.
For Suppose ur application jar file is in D:\application.
Let the jar file be application.jar
Let the JFrame class be FrameClass.java
execute.bat
===========

set classpath=%classpath%;D:\application\application.jar
java FrameClass

The execute.bat file should be in the folder D:\application
Hope this solves ur problem.

Regards,
Jagan Mohan Reddy
 
Hetal Seth
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey amit:
well i found the solu.
anyways thanks alot !
hetal seth
[This message has been edited by Hetal Seth (edited June 19, 2001).]
 
Hetal Seth
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jagan:
hey dude that was awesome !
it worked great. i was tryin for somethin like 4-5 days, n ur stuff took just 4 mins.
But how can I avoid the dos window from poping up ?
i appreciate ur assistance.
Thanks alot,
Hetal Seth

[This message has been edited by Hetal Seth (edited June 19, 2001).]
 
Jagan Mohan Reddy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think this be done only through windows programing which i dont know.The dos prompt that open will help to check ur output messages. If u know how to minimize the dos-prompt pls do mail me. mailid:reddychatla@systemlogicindia.com
Regards,
Jagan Mohan Reddy.
 
Amit Agarwal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Hetal,
try using javaw instead of java to execute your class from the batch file.
-------
Amit
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic