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?
-
2Pack it as an executable jar?!user– user2014-10-14 13:08:23 +00:00Commented 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.peter.petrov– peter.petrov2014-10-14 13:11:50 +00:00Commented Oct 14, 2014 at 13:11
-
@peter.petrov The Teacher must know the main-class then, where do he get it? From source.Grim– Grim2014-10-14 13:13:22 +00:00Commented Oct 14, 2014 at 13:13
-
@ peter.petrov: Well my teacher is not a programmer so she cannot type all the commands.Shubhankar Das– Shubhankar Das2014-10-14 13:17:45 +00:00Commented Oct 14, 2014 at 13:17
-
1@PeterRader From a 3-lines long README.TXT maybe.peter.petrov– peter.petrov2014-10-14 13:39:21 +00:00Commented Oct 14, 2014 at 13:39
|
Show 1 more comment
2 Answers
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
2 Comments
Shubhankar Das
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?
user
@ShubhankarDas the Java Virtual Machine will execute it. So the JVM has to be installed on the target machine.