Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Failed to create functional JAR

Reply
Thread Tools

Failed to create functional JAR

 
 
Roedy Green
Guest
Posts: n/a
 
      02-26-2006
On 26 Feb 2006 01:23:58 -0800, "JPractitioner"
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>the followings are the steps i went through which lead me to this
>problem.


Also have a look into ANT. As soon as you master the art of building
jars by hand, you will discard that skill and let ANT do it.

http://mindprod.com/jgloss/ant.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
 
 
 
JPractitioner
Guest
Posts: n/a
 
      02-26-2006
Hi hiwa, thx for the reply..
well i ve tried to learn if i can successfully jar the class from the
following code..
but seems to be no chance at all for me.. the thing keep not working..

Anyway, thx for your idea


public class Try{
public static void main(String[] a){
System.out.println("THIS IS A TRY");

}
}

p/s: I cannot access the other pc at the moment

 
Reply With Quote
 
 
 
 
JPractitioner
Guest
Posts: n/a
 
      02-26-2006
Hi Roedy, thanks for your reply,
I had tried to use use java -jar
myjar.jar as you suggested and i can see the program is running OK!

Now the only thing is i cannot execute the JAR by double clicking on
it.
will check the links out. thanks man.

 
Reply With Quote
 
JPractitioner
Guest
Posts: n/a
 
      02-26-2006
I want to execute a console program.... (expecting too see the black
and white "dos" console when i double click on the jar). Previously i
only tried to use jar for GUI programs. So, will this be an issue? I
mean, can i use jar for console program?

Thanks in advance

 
Reply With Quote
 
JPractitioner
Guest
Posts: n/a
 
      02-26-2006
Guys, I think ive got it... Thanks a lot to all especially to Roedy
Green.
I found the followings at http://mindprod.com/jgloss/javawexe.html


The javaw.exe command is identical to java.exe, except that with
javaw.exe there is no associated console window. This implies you can't
get it to display the version with -version since there is no console
to display it on. Use javaw.exe when you don't want a command prompt
window to appear. The javaw.exe launcher will, however, display a
dialog box with error information if a launch fails for some reason.
When you assocate jar files with either java.exe or javaw.exe you will
control whether you can see the console output.

So, I ve reconfigure my windows file type jar configuration to run
(read at Making Jar Files Double Clickable from
http://mindprod.com/jgloss/jar.html) java.exe instead of javaw.exe.

However, The console did not wait untill i "press any key to continue".

It appeared on the screen for a while (1 or 2 seconds).. then it
disappeared.

Is there any way, that i could make the console to not just disappear
like that, but to have the "press any key to continue" option.

hiwa, u did a great job as well, now i only have to remember one line
for my manifest file, thx buddy

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      02-26-2006
On 26 Feb 2006 06:03:15 -0800, "JPractitioner"
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>Now the only thing is i cannot execute the JAR by double clicking on
>it.


you likely have double click hooked up to the wrong program.

See http://mindprod.com/jgloss/associations.html
for how to fix it.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
create an exectuable jar file whose classes reference another jar in Eclipse puzzlecracker Java 2 12-20-2005 03:33 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM



Advertisments