-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: capture the command executed by Eclipse
PostPosted: Sun Jul 20, 2008 12:13 am 
Beginner
Beginner

Joined: Tue Jun 17, 2008 12:14 am
Posts: 21
I have a Hibernate appps. It runs on Eclipse IDE (in class files format), it works fine. But when I packages it to jar file, and run it using command prompt, it hit error.

Quote:
java.lang.NoClassDefFoundError: org/hibernate/Session
at com.flextronics.fftester.Client.main(Client.java:103)
Caused by: java.lang.ClassNotFoundException: org.hibernate.Session
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 1 more


My question is, how to capture the command executed by Eclipse, so that I cna re-use it on command prompt?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 21, 2008 6:08 pm 
Beginner
Beginner

Joined: Fri Aug 05, 2005 3:36 am
Posts: 28
Run your application from Eclipse, in debug mode, and set a breakpoint. When the app hits the breakpoint, go to the Debug Perspective. (Eclipse has probably taken you there anyway.)

From there, find the Debug View. Each top-level node in this tree-based view represents a launch that Eclipse managed - either one that is still running, or one that has recently terminated. Find the node in this view that corresponds to the one you're concerned with. Presumably it is suspended (on your breakpoint), and you can see its immediate child, a single Process node, and several children of that node, representing Threads.

Select the process node, and view its properties, either by typing Alt-Enter, or by right-clicking it and selecting "Properties" from the menu that pops up. A dialog will pop up, and in the right pane, you will see the command line that Eclipse used to launch the process.

There you go!

-Larry


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.