1

I am making a simple program for my class, and my teacher will run it. I want to run it without using an IDE or the command line interface. Basically, I want a beginner friendly way of running it, something my teacher can do easily without navigating through a complicated procedure. Is there a way to do this?

asked Oct 14, 2014 at 13:06
6
  • 2
    Pack it as an executable jar?! Commented Oct 14, 2014 at 13:08
  • 1
    "something my teacher can do easily without navigating through a complicated procedure" If your teacher cannot run it from the command line, that's strange. Commented Oct 14, 2014 at 13:11
  • @peter.petrov The Teacher must know the main-class then, where do he get it? From source. Commented Oct 14, 2014 at 13:13
  • @ peter.petrov: Well my teacher is not a programmer so she cannot type all the commands. Commented Oct 14, 2014 at 13:17
  • 1
    @PeterRader From a 3-lines long README.TXT maybe. Commented Oct 14, 2014 at 13:39

2 Answers 2

1

Use the Export option of Eclipse (If it's your IDE of course) and choose "Runable Jar file"

Kick Buttowski
6,73713 gold badges39 silver badges61 bronze badges
answered Oct 14, 2014 at 13:09
Sign up to request clarification or add additional context in comments.

Comments

0

Try packaging it as a .jar file

Here's how to do it without an IDE: http://www.skylit.com/javamethods/faqs/createjar.html

and how to do it in Eclipse: https://www.youtube.com/watch?v=mE3rbtKm-pk

answered Oct 14, 2014 at 13:12

2 Comments

thanks a lot! This really helped. So after packaging it as a runnable jar, will it be openable with a single click? And what program will it open in? Also, I use JCrator, is there a way to do it in this IDE?
@ShubhankarDas the Java Virtual Machine will execute it. So the JVM has to be installed on the target machine.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.