Solved

Need to run a elipse java program as a batch job

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

623 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