~ Mansukh
Mansukhdeep Thind wrote:Hi Hugh. Welcome to the ranch. First of all, you can execute only executable jar files. Most jar files contain packaged classes which are required to be referred to by the application. Kind of libraries. They don't run directly. What exactly does this jar file that you are trying to run contain? What all classes and what are the contents of the Manifest.txt?
the jar file is in the Documents folder and I placed the Manifest.txt file in the same directory..
~ Mansukh
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
yes I put a carraige return and no it is not in the the jar file, yet. Will try thisK. Tsang wrote:Does the jar has this manifest.txt file in it? Also the manifest file need an extra empty line at the end.
Using the Eclipse IDE I exported it by using the drop down menuK. Tsang wrote:Does the jar has this manifest.txt file in it? Also the manifest file need an extra empty line at the end.
Using the Eclipse IDE I exported it by using the drop down menu
~ Mansukh
i try to find the code.. but i can't see..
~ Mansukh
Mansukhdeep Thind wrote:
Using the Eclipse IDE I exported it by using the drop down menu
Do this exercise without eclipse or any IDE help:
a) Create a basic source file that prints "HelloWorld" and compile it.
b) Create a Manifest.txt file in the same folder. It should have an entry saying Main-Class: <classname> Remember to enter a line feed otherwise there would be a parsing exception.
c) Now fir the jar command like this: jar -cvfm MyJar.jar Manifest.txt <classname>
d) Run using java -jar <Jar file name>.jar command.
As a novice, never use an IDE. It hides the working of a command and you would not learn how things work.
~ Mansukh
I tried to move the Manifest.txt into the temp.jar folder and i get an error , "cant move an archive into an archive"Hugh Manchu wrote:
Using the Eclipse IDE I exported it by using the drop down menuK. Tsang wrote:Does the jar has this manifest.txt file in it? Also the manifest file need an extra empty line at the end.
I tried to move the Manifest.txt into the temp.jar folder and i get an error , "cant move an archive into an archive"
~ Mansukh
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Mansukhdeep Thind wrote:
Using the Eclipse IDE I exported it by using the drop down menu
Do this exercise without eclipse or any IDE help:
a) Create a basic source file that prints "HelloWorld" and compile it.
b) Create a Manifest.txt file in the same folder. It should have an entry saying Main-Class: <classname> Remember to enter a line feed otherwise there would be a parsing exception.
c) Now fir the jar command like this: jar -cvfm MyJar.jar Manifest.txt <classname>
d) Run using java -jar <Jar file name>.jar command.
As a novice, never use an IDE. It hides the working of a command and you would not learn how things work.
Mansukhdeep Thind wrote:A good tutorial eh? Only for Jars in Java, running etc. or for Java language as a whole?
K. Tsang wrote:Further to what Campbell's tutorial link, here is another one just the jar command here
Pay attention to the available options or flags. Also check out the examples too at the bottom.
Mansukhdeep Thind wrote:
I tried to move the Manifest.txt into the temp.jar folder and i get an error , "cant move an archive into an archive"
First of all, temp.jar is not a folder. It is a file. You cannot directly place a .txt file inside a jar. Are you following the steps I mentioned? Follow those and then let me know what is the problem.
I have some better resources available to me now so I will let you know if I have any troubles when the time comes to test this out. For now Im going to look at this very closely without the use of the IDE and get back to you once I have some results.
~ Mansukh
Try http://docs.oracle.com/javafx/tutorials.htmlHugh Manchu wrote:crashing? cant render that tutorial
luck, db
There are no new questions, but there may be new answers.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |