Does the jar file built by jbuilder work? If not you don''t need to do any command line stuff.
If it doesn''t work you might need to setup a file association under windows. Just associated the command javaw -jar with the .jar extension. Obviously your classpath and what not must all be correct.
If that''s not the problem, just open up the jar file in winzip (it''s basically just a zip file). You can then edit the manifest file (inside zip subdirectory MANIFEST-INF).
>I type in:
>
>jar -cmf MANIFEST.MF calculator.jar *.class
>now when it runs it gives an exception and tells me it can''t find the manifest file(MANIFEST.MF)
>Is MANIFEST.mf a real file or what?
I don''t know, is MANIFEST.mf present in the directory you are in?
Otherwise try reversing some of the options:
jar -cfm
instead of
jar -cmf
The problem might be that it''s expecting the manifest file name when your giving it the jar file name. Check the docs for more info.
[java] Jbuilder4 questions
lilspikey, or anyone
Yeah i can create a jar file using the archive builder. I can see the jar file in the directory. Now what do i have to do with that file? I try to open it by double clicking on it. This brings up the little screen of what should i open this with. So what''s the next step here. I tried looking in the books but it talks about cobra or something like that but anyway yeah i have the jar file so how do i get it that i can click on an icon and have my application run?
Yeah i can create a jar file using the archive builder. I can see the jar file in the directory. Now what do i have to do with that file? I try to open it by double clicking on it. This brings up the little screen of what should i open this with. So what''s the next step here. I tried looking in the books but it talks about cobra or something like that but anyway yeah i have the jar file so how do i get it that i can click on an icon and have my application run?
read above message.
I have succesfully gotten an application to run from the command line and now within the jbuilder environment. But now how do i get a icon i can just click to run it.
Also i can''t run it on anyother computer except mine. What do i have to do to make that so it''s possible.
I have read the previous post and they speak of putting the JRE on the other computers. But looking at the file it is something like 27 megs that just seems like alot to just run a little program. But if i have to do it i have to do it. Thanks everyone for their input
I have succesfully gotten an application to run from the command line and now within the jbuilder environment. But now how do i get a icon i can just click to run it.
Also i can''t run it on anyother computer except mine. What do i have to do to make that so it''s possible.
I have read the previous post and they speak of putting the JRE on the other computers. But looking at the file it is something like 27 megs that just seems like alot to just run a little program. But if i have to do it i have to do it. Thanks everyone for their input
Well, I think the JRE is only about 5 MB... It''s not the full jdk, at all. Furthermore, installing the JRE should be enough to make jar files run by just double-clicking on them.
You can get the installer for the JRE here.
You can get the installer for the JRE here.
In your case ou need to make a file association:
(I''m looking at this under NT, so might be different for you,
oh and I am assuming your using windows).
Under Windows Explorer go to View->Folder Options
Select File-types
Press New-type
Make a new file type associated with the .jar extension.
Add an open command to the type, and for the application used to perform action enter:
D:\Program Files\JavaSoft\JRE\1.3.0_01\bin\jjavaw -jar
(well wherever your javaw is installed).
Easy.
Alternatively, as c_wraith suggests, install the JRE and this should setup the association for you.
cheers,
John
(I''m looking at this under NT, so might be different for you,
oh and I am assuming your using windows).
Under Windows Explorer go to View->Folder Options
Select File-types
Press New-type
Make a new file type associated with the .jar extension.
Add an open command to the type, and for the application used to perform action enter:
D:\Program Files\JavaSoft\JRE\1.3.0_01\bin\jjavaw -jar
(well wherever your javaw is installed).
Easy.
Alternatively, as c_wraith suggests, install the JRE and this should setup the association for you.
cheers,
John
Thanks all who responded to this thread. I now know how to run my program from the command line and i have a clickable icon that i can click to run also. Thanks again

quote:
Original post by c_wraith
Well, I think the JRE is only about 5 MB... It's not the full jdk, at all. Furthermore, installing the JRE should be enough to make jar files run by just double-clicking on them.
Well, if he dont want to force the user into installing jdk he can just do the following
1. copy the content of the jre directory to the application directory
2. include the lib and bin folders into your distribution
3. write a small win32 exe which launches bin\javaw -jar myapp.jar
voila
Edited by - harrys on May 19, 2001 7:31:23 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement