Results 1 to 20 of 23
Thread: Problem running jar file
- 01-07-2017, 02:53 PM #1
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
- 01-07-2017, 03:52 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 28
- 01-07-2017, 10:16 PM #3
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
Re: Running a jar in a batch file
extract.bmp
So I have extracted that file with winRAR and show everything what I got. Tells something?
- 01-07-2017, 11:42 PM #4
Re: Running a jar in a batch file
program dont works.
Open a command prompt window and enter the command:
java -jar <TheJarFIleNameHere>.jar
copy the contents of the command prompt window and paste it here.If you don't understand my response, don't ignore it, ask a question.
- 01-07-2017, 11:52 PM #5
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
Re: Running a jar in a batch file
The system cannot find the file specified.
- 01-08-2017, 12:19 AM #6
Re: Running a jar in a batch file
Please copy the full contents of the command prompt window and paste it here so we can see exactly what was entered and the complete text of the computer's response.
If you don't understand my response, don't ignore it, ask a question.
- 01-08-2017, 09:11 AM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 28
Re: Running a jar in a batch file
Build a wall around Donald Trump; I'll pay for it.
- 01-08-2017, 02:13 PM #8
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
Re: Running a jar in a batch file
I even dont know what is it " the MANIFEST entry"
- 01-08-2017, 02:36 PM #9
Re: Running a jar in a batch file
Can you do what was asked in post#10 and #12 so we can see exactly what happens when the jar file is executed?
If you don't understand my response, don't ignore it, ask a question.
- 01-08-2017, 04:30 PM #10
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 28
- 01-08-2017, 07:24 PM #11
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
Re: Running a jar in a batch file
- 01-08-2017, 07:39 PM #12
Re: Running a jar in a batch file
Please copy the contents of the command prompt window and paste it here. Images are not good because text can not be copied from an image to paste in a response.
If you don't understand my response, don't ignore it, ask a question.
- 01-08-2017, 07:39 PM #13
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 28
- 01-08-2017, 07:40 PM #14
Re: Running a jar in a batch file
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.If you don't understand my response, don't ignore it, ask a question.
- 01-08-2017, 10:43 PM #15
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
Re: Running a jar in a batch file
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Trynys>java -jar try.jar
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchAppl icationWithArgs(Lau
ncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchAppl ication(LauncherImp
l.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchAppl ication1(LauncherIm
pl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$lau nchApplication$155(
LauncherImpl.java:182)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Bulve.jpg (The system cannot find the
file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at naujaSavaite.Testas.start(Testas.java:41)
at com.sun.javafx.application.LauncherImpl.lambda$lau nchApplication1$162
(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$run AndWait$175(Platfor
mImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$nul l$173(PlatformImpl.
java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$run Later$174(PlatformI
mpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run( InvokeLaterDispatch
er.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Nativ e Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$14 8(WinApplication.ja
va:191)
... 1 more
Exception running application naujaSavaite.Testas
C:\Users\Trynys>
- 01-08-2017, 10:51 PM #16
Re: Running a jar in a batch file
Caused by: java.io.FileNotFoundException: Bulve.jpg (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at naujaSavaite.Testas.start(Testas.java:41)
at line 41 in the FileInputStream constructor.
Where is the file located? It needs to be in the current directory when the jar file is executed.If you don't understand my response, don't ignore it, ask a question.
- 01-08-2017, 10:59 PM #17
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
Re: Running a jar in a batch file
Bulve.jpg is located inside eclipse project. C:\44\naujaSavaite
Runnable JAR file on desktop.
- 01-08-2017, 11:02 PM #18
Re: Running a jar in a batch file
C:\Users\Trynys>java -jar try.jar
I assume that is where the jar file is located.
Try copying the file to the folder with the jar file.Last edited by Norm; 01-08-2017 at 11:04 PM.
If you don't understand my response, don't ignore it, ask a question.
- 01-08-2017, 11:23 PM #19
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
Re: Running a jar in a batch file
Yes, now it works.
So the thing was that I was placed one try.jar file on desktop and another in try.jar in C:\Users\Trynys
- 01-08-2017, 11:32 PM #20
Senior Member
- Join Date
- Nov 2016
- Posts
- 163
- Rep Power
- 4
Similar Threads
-
problem running compiled class file
By SnakeDoc in forum New To JavaReplies: 6Last Post: 04-14-2012, 01:54 AM -
Problem running Applet in IE but works when running just Java in Netbeans?
By rodneyc8063 in forum Java AppletsReplies: 7Last Post: 12-18-2011, 05:13 AM -
Weird problem running a batch file
By d3n1s in forum Advanced JavaReplies: 7Last Post: 06-19-2011, 02:34 AM -
Running jar file.
By yogi1410 in forum Advanced JavaReplies: 1Last Post: 01-11-2010, 11:59 AM -
Problem in running Java swing wizard in jre 1.6 while it is running in jre 1.4
By Sanjay Dwivedi in forum AWT / SwingReplies: 0Last Post: 08-26-2009, 02:03 PM
Bookmarks