Solved

Need to run a elipse java program as a batch job

Posted on 2012-04-12
5
256 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apps blocked by Java 9 88
Should localization be done inside spring controller 5 32
reverse digits of a number using for loop 5 53
collection output issue 9 39
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

821 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