Board index » jbuilder » JavaHelp and executable app

JavaHelp and executable app


2004-02-23 04:37:47 AM
jbuilder0
Folks,
I deployed this executable app using JBuilder 9 Archive Native Executable package. This app contains a JavaHelp that can be accessed via a menubar.
The menu bar along with w/ access to JavaHelp works perfect when I compile it on JBuilder. However, the archived executable app fails to display the entire menu bar.
I have pinpointed the failure that fails to display the entire menuBar. Whenever I reference the helpBroker i.e.
hbTutorials = hsTutorials.createHelpBroker();
If I comment this line the entire menu bar reappears in the executable app. I have made sure to include all dependencies, entire JavaHelp packages in the native executable archives.
Could you help?
Thank you,
Richard
 
 

Re:JavaHelp and executable app

Richard wrote:
Quote

Folks,

I deployed this executable app using JBuilder 9 Archive Native Executable
package. This app contains a JavaHelp that can be accessed via a menubar.

The menu bar along with w/ access to JavaHelp works perfect when I compile
it on JBuilder. However, the archived executable app fails to display the
entire menu bar.

I have pinpointed the failure that fails to display the entire menuBar.
Whenever I reference the helpBroker i.e. hbTutorials =
hsTutorials.createHelpBroker();

Are you calling the Help per a specfic location/path? If so, this would not
work, without some type of mechanism to get the correct classpath (ie.
ComponentBeanName.getClass().getResource("resourceName")
or
File file = new File();
String path=file.getAbsolutePath()+"/sub_directory_name/JavaDocs"
SomeClass.openJavaDocs(path);
Could you post a code snippet letting us know how your menu is calling the
JavaDocs?
 

Re:JavaHelp and executable app

pnichols < XXXX@XXXXX.COM >wrote:
Quote
Richard wrote:

>
>Folks,
>
>I deployed this executable app using JBuilder 9 Archive Native Executable
>package. This app contains a JavaHelp that can be accessed via a menubar.
>
>The menu bar along with w/ access to JavaHelp works perfect when I compile
>it on JBuilder. However, the archived executable app fails to display the
>entire menu bar.
>
>I have pinpointed the failure that fails to display the entire menuBar.
>Whenever I reference the helpBroker i.e. hbTutorials =
>hsTutorials.createHelpBroker();
>
Are you calling the Help per a specfic location/path? If so, this would not
work, without some type of mechanism to get the correct classpath (ie.
ComponentBeanName.getClass().getResource("resourceName")
or
File file = new File();
String path=file.getAbsolutePath()+"/sub_directory_name/JavaDocs"
SomeClass.openJavaDocs(path);

Could you post a code snippet letting us know how your menu is calling the
JavaDocs?
Hello Mr. Nichols,
Here is the code snippet:
Notice down below for the "hbTutorials = hsTutorials.createHelpBroker();" if I include this instruction ENTIRE Jmenu bar fails to display on executable program?????????
//javahelp
import java.net.URL;
import javax.help.*;
static HelpSet hsTutorials = null;
static HelpBroker hbTutorials = null;
URL hsURLTutorials;
JMenuBar menuBar;
JMenu menuHelp;
JMenuItem menuItemTutorials;
//HERE IS THE PROBLEM!!!!!!!!!!
hbTutorials = hsTutorials.createHelpBroker();
menuItemTutorials = new JMenuItem("Tutorials");
menuItemTutorials.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
menuItemTutorials_actionPerformed(e);
}
});
menuHelp.add(menuItemTutorials);
public void menuItemTutorials_actionPerformed(ActionEvent e) {
hbTutorials.setDisplayed(true);
}
Thanks,
Richard
Quote

 

{smallsort}

Re:JavaHelp and executable app

Richard wrote:
Quote
Here is the code snippet:
Notice down below for the "hbTutorials = hsTutorials.createHelpBroker();"
if I include this instruction ENTIRE Jmenu bar fails to display on
executable program?????????
Make sure you're running the version of your native executable without a
W (foo.exe instead of fooW.exe). That will let you see any exceptions
that might be being thrown. You also might want to consider wrapping
the createHelpBroker call with a try block.
try {
hbTutorials = hsTutorials.createHelpBroker();
} catch (Exception e) {
e.printBackTrace();
}
I suspect that some kind of exception is being thrown, maybe a
ClassNotFound, but the first step is to confirm that theory.
--
Gillmer J. Derge (TeamB)
 

Re:JavaHelp and executable app

Gillmer,
Thank you for that tip. I did exactly what you said and noticed in the executable window that there is a manifest issue:
"no manifest section for signature file entry..."
It seems I am not the only one experiencing this problem. Reference the web site below and there is a problem with JBuilder 9 (same version I am using) when it creates these manifest files.
forum.java.sun.com/thread.jsp
using JBuilder's required libraries I included javaHelp packages: jh.jar, jhall.jar and still experience a problem. What do you suggest i do?
Is there another workaround to this problem...
Richard
"Gillmer J. Derge (TeamB)" < XXXX@XXXXX.COM >wrote:
Quote
Richard wrote:
>Here is the code snippet:
>Notice down below for the "hbTutorials = hsTutorials.createHelpBroker();"
>if I include this instruction ENTIRE Jmenu bar fails to display on
>executable program?????????

Make sure you're running the version of your native executable without a
W (foo.exe instead of fooW.exe). That will let you see any exceptions
that might be being thrown. You also might want to consider wrapping
the createHelpBroker call with a try block.

try {
hbTutorials = hsTutorials.createHelpBroker();
} catch (Exception e) {
e.printBackTrace();
}

I suspect that some kind of exception is being thrown, maybe a
ClassNotFound, but the first step is to confirm that theory.

--
Gillmer J. Derge (TeamB)
 

Re:JavaHelp and executable app

Richard wrote:
Quote
forum.java.sun.com/thread.jsp

using JBuilder's required libraries I included javaHelp packages: jh.jar, jhall.jar and still experience a problem. What do you suggest i do?

Is there another workaround to this problem...
I think the second comment from sundowner (Reply 3 of 3) is the best
workaround. Either create a .config file that refers to jhall.jar in a
separate location or override JBuilder's manifest with one that contains
the signatures.
There is a thread in borland.public.jbuilder.ide that you might want to
take a look at. Actually, I bet the Martin Zwosta who began that thread
is the same Martin who is calling himself sundowner on the Sun forum.
Anyway, the thread began on 2/12/2004 with the subject "native
executable - exe-file: How to include libraries?" The point is that
there is a problem with JBuilder 9 that will prevent you from
referencing jhall.jar as an external file, but there's a simple workaround.
--
Gillmer J. Derge (TeamB)
 

Re:JavaHelp and executable app

Gillmer,
I read your response at
XXXX@XXXXX.COM %3E" rel="nofollow" target="_blank">www.dedonline.com/scripts/nntpb.exe/msgbody
on the Internet regarding this issue. I want to make sure:
JBuilder 9 contains lib/win32.bin and lib/win3W.bin. You suggest to actually delete those files in JBuilder 9 and replace them with JBuilder X's bin/jbuilder.exe and bin/jbuilderW.exe?
Luckily for me I have JBuilder X and can copy these files but I wish to finish this project and finally deploy it with JBuilder 9.
Richard
"Gillmer J. Derge (TeamB)" < XXXX@XXXXX.COM >wrote:
Quote
Richard wrote:
>forum.java.sun.com/thread.jsp
>
>using JBuilder's required libraries I included javaHelp packages: jh.jar, jhall.jar and still experience a problem. What do you suggest i do?
>
>Is there another workaround to this problem...

I think the second comment from sundowner (Reply 3 of 3) is the best
workaround. Either create a .config file that refers to jhall.jar in a
separate location or override JBuilder's manifest with one that contains
the signatures.

There is a thread in borland.public.jbuilder.ide that you might want to
take a look at. Actually, I bet the Martin Zwosta who began that thread
is the same Martin who is calling himself sundowner on the Sun forum.
Anyway, the thread began on 2/12/2004 with the subject "native
executable - exe-file: How to include libraries?" The point is that
there is a problem with JBuilder 9 that will prevent you from
referencing jhall.jar as an external file, but there's a simple workaround.

--
Gillmer J. Derge (TeamB)
 

Re:JavaHelp and executable app

Richard wrote:
Quote
JBuilder 9 contains lib/win32.bin and lib/win3W.bin. You suggest
to actually delete those files in JBuilder 9
Rename them. Don't delete them. Keep the old ones as a backup just in
case.
Quote
and replace them with
JBuilder X's bin/jbuilder.exe and bin/jbuilderW.exe?
Right. I think that's what I said, but it occurs to me that's kind of a
stupid way to do it. If you have JBuilder X, you should just copy
JBuilder X's lib/win32.bin and lib/win32W.bin. Presumably they're
identical or at least close enough to identical, but there's no sense
pushing your luck.
If you have a version of JBuilder X that doesn't include lib/win32.bin
and lib/win32X.bin (maybe Foundation doesn't, I'm not sure), then you'd
want to copy bin/jbuilder.exe and bin/jbuilderW.exe instead.
--
Gillmer J. Derge (TeamB)