The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Java Help
|
Page 3 -
Java Executable Jar problem
Page 3 - Discuss Java Executable Jar problem in the Java Help forum on Dev Shed. Java Executable Jar problem Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 12th, 2012, 05:47 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
|
The .jar entry should refer to another entry like jarfile. See post #24. The Datos shown in post #23 should be jarfile instead of the Nokia.... stuff.
The jarfile entry is where the commandline goes.
|

May 12th, 2012, 09:42 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 22
Time spent in forums: 6 h 1 m 47 sec
Reputation Power: 0
|
|
|
Okay, I write jarfile in the Datos of .JAR put the program and didn't work, then I put jarfile and his Datos was Executable Jar File so I copy in the Datos of .JAR to see if it work but it didn't :/
|

May 13th, 2012, 05:58 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
|
The .jar entry should refer to the jarfile entry.
The jarfile entry should have the commandline to execute the java program using the -jar option.
Export both those entries and post their contents here.
|

May 13th, 2012, 11:32 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 22
Time spent in forums: 6 h 1 m 47 sec
Reputation Power: 0
|
|
|
.JAR name(Predeterminado) type REG_SZ Datos jarfile
jarfile commandline name(Predeterminado) type REG_SZ Datos "C:\Program Files\Java\jre1.7.0\bin\javaw.exe" -jar "%1" %*
|

May 13th, 2012, 11:59 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
How did you create what you just posted? Here is what I get when I export a registry entry. It's written to a text file with the extension .reg:
Quote: Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\jarfile]
@="Executable Jar File"
[HKEY_CLASSES_ROOT\jarfile\shell]
[HKEY_CLASSES_ROOT\jarfile\shell\open]
[HKEY_CLASSES_ROOT\jarfile\shell\open\command]
@="\"C:\\Program Files\\Java\\jre6\\bin\\javaw.exe\" -jar \"%1\" %*" |
|

May 14th, 2012, 12:53 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 22
Time spent in forums: 6 h 1 m 47 sec
Reputation Power: 0
|
|
|
I just copy what I saw in the registry, because If I export it I can't paste it here, how do I do to copy as you do it and paste it?
|

May 14th, 2012, 01:03 PM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
|
Right click on the .reg file and select Edit.
Or rename the .reg file by adding .txt to the end of the full filename.
|

May 14th, 2012, 05:37 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 22
Time spent in forums: 6 h 1 m 47 sec
Reputation Power: 0
|
|
|
This is what I have on jarfile:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\jarfile]
@="Executable Jar File"
[HKEY_CLASSES_ROOT\jarfile\shell]
[HKEY_CLASSES_ROOT\jarfile\shell\open]
[HKEY_CLASSES_ROOT\jarfile\shell\open\command]
@="\"C:\\Program Files\\Java\\jre1.7.0\\bin\\javaw.exe\" -jar \"%1\" %*"
This is on my past .JAR
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.JAR]
@="Nokia SuiteApplicationInstaller_JAR"
Now this is what I have on JAR.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.JAR]
@="jarfile"
|

May 14th, 2012, 06:47 PM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
|
The only difference I see is the case of jar vs JAR. Windows is not case sensitive.
Is the path to the javaw.exe file correct?
My .jar entry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.jar]
@="jarfile"
|

May 14th, 2012, 11:57 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 22
Time spent in forums: 6 h 1 m 47 sec
Reputation Power: 0
|
|
|
would formatting the computer work?
|

May 15th, 2012, 05:36 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
|
I have no idea what to try next.
If the path to the javaw.exe command is correct, then it looks like it should work.
|

May 15th, 2012, 11:23 AM
|
|
Registered User
|
|
Join Date: May 2012
Posts: 9
Time spent in forums: 3 h 18 m 51 sec
Reputation Power: 0
|
|
hello MrChearlie,
Please Open a command prompt window,then change the folder with the swingDemo.jar file and enter this command:
java -jar swingDemo.jar
then copy the contents showing there on the upper left corner then select edit and then copy.
paste

|

May 15th, 2012, 02:08 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 22
Time spent in forums: 6 h 1 m 47 sec
Reputation Power: 0
|
|
|
Where is that swingDemo and how do I change to it?
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|