Solved

Need to run a elipse java program as a batch job

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 68
Java Options in Zimbra Server 2 44
Arrays.asList  VS  ArrayList 4 44
oracle 11g 23 48
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
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…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

912 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now