Solved

Need to run a elipse java program as a batch job

Posted on 2012-04-12
5
257 Views
Last Modified: 2012-04-25
I have created and compiled a program in eclipse. I need to take that run it as a batch job every night.
Where I can see the java run time statement with the classpath etc so that I add that in the batch file for the program to run.
0
Comment
Question by:newone2011
[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
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:momi_sabag
ID: 37840564
easiest way:
in eclipse choose file->export
then choose runnable jar
give it a name and in the last screen choose the option to include all necessary libraries in the jar

this will produce a single jar that contains all the required classes (no classpath is needed)
in your batch job you run

java -jar your_jar_name.jar
0
 

Author Comment

by:newone2011
ID: 37849472
thanks, I will try and let you know.
0
 

Author Comment

by:newone2011
ID: 37853555
It does not give me an option to export it as runnable jar, just jar and the jar I generate does not contain other libs bundled. Do you know, if there is a plugin i need to get for eclipse. I am using eclipse 3.2.1
0
 
LVL 37

Accepted Solution

by:
momi_sabag earned 500 total points
ID: 37871437
no plugin needed
just export and then runnable jar file
what is the project type you are using?
0
 

Author Closing Comment

by:newone2011
ID: 37892619
good
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

751 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