Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-22-2008, 06:50 PM
Member
 
Join Date: Apr 2008
Posts: 4
doug99 is on a distinguished road
eclipse batch file
Have a couple questions.

Is there an easy way of running a batch file from Eclipse?
Also, for this project I just have jar files. I also have the source code located somewhere else. Can I debug somehow by attaching source. How do you do this and how to set breakpoints.

Thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-22-2008, 08:41 PM
roots's Avatar
Moderator
 
Join Date: Jan 2008
Location: Dallas
Posts: 263
roots is on a distinguished road
"batch file", you mean .bat file / .sh file ?. You can create that file and run it by double clicking (Opening it with default editor/ system editor). I havent tried .sh but should be okay.
Somewhere else, as long it is in local or accessible network place you can click on properties(After you put the jar file in build path) and look for source attachment.

After the source location is attached to jar file. Open the class file from jar. You will see source displayed. You can put breakpoint on it just like other regular java source files.
__________________
dont worry newbie, we got you covered.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-22-2008, 10:05 PM
Member
 
Join Date: Apr 2008
Posts: 4
doug99 is on a distinguished road
I tried running my .bat file and it does attempt to run but I'm getting a can find main class error. If I run it outside of ecipse(DOS, or Explorer) it works OK. It's running a main that is contained in a jar file. The project properties includes the jar files in the java build path.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-23-2008, 05:03 AM
roots's Avatar
Moderator
 
Join Date: Jan 2008
Location: Dallas
Posts: 263
roots is on a distinguished road
can you paste the content of your bat file ?? (or PM)

First put the jar file in the build path (Right click > Build path > add to build path).
Then right click the jar file inside the referenced library (Search for the jar file in project structure). Click on properties. You will see it.
__________________
dont worry newbie, we got you covered.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-23-2008, 05:08 PM
Member
 
Join Date: Apr 2008
Posts: 4
doug99 is on a distinguished road
start /min "Program" java -Xmx500M -cp ../lib/thejar.jar it.program

where it.program has a main. This works OK when I start the script from DOS command line. The jar file is in the build path
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 04-24-2008, 06:27 AM
roots's Avatar
Moderator
 
Join Date: Jan 2008
Location: Dallas
Posts: 263
roots is on a distinguished road
Try with full path for ../lib thing ..
__________________
dont worry newbie, we got you covered.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 04-24-2008, 04:59 PM
Member
 
Join Date: Apr 2008
Posts: 4
doug99 is on a distinguished road
one more question
the full path did work thanks.

One more question. This .bat file launches a java program. How do I launch in the debugger using the .bat file?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tip for System Defined line separator in a Batch File Java Tip java.lang 0 04-04-2008 04:48 PM
run a batch file as windows nt service radhika123 New To Java 0 04-04-2008 03:46 PM
How to run/build the JSP file using Eclipse cbklp JavaServer Pages (JSP) and JSTL 1 01-19-2008 02:03 AM
Problem in batch file marwa New To Java 0 08-14-2007 12:24 PM
An Introduction to Eclipse PDE - File Creation JavaForums Eclipse 0 05-09-2007 08:40 AM


All times are GMT +3. The time now is 10:16 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org