Solved

Need to run a elipse java program as a batch job

Posted on 2012-04-12
5
251 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
Comment Utility
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
Comment Utility
thanks, I will try and let you know.
0
 

Author Comment

by:newone2011
Comment Utility
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
Comment Utility
no plugin needed
just export and then runnable jar file
what is the project type you are using?
0
 

Author Closing Comment

by:newone2011
Comment Utility
good
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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 different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

743 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

14 Experts available now in Live!

Get 1:1 Help Now