NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
jeric
Joined: 14 Sep 2011 Posts: 11
|
Posted: Fri Dec 02, 2011 10:27 pm Post subject: JNLP problems |
|
|
I have a problem running a netbeans application that uses the Form Editor module. Launched from the Run menu the application words fine but when launched from JNLP->Run it does not work. The application will start but does not run correctly. The properties, palette and editor windows are missing. The only clue I have to go by is a log file I found. This is part of an entry:
| Quote: | INFO [org.netbeans.core.startup.ModuleList]
org.netbeans.InvalidException: <b>The JDK is missing and is required to run some NetBeans modules</b><br> Please use the --jdkhome command line option to specify a JDK<br>installation or see <a href="http://wiki.netbeans.org/FaqRunningOnJre">http://wiki.netbeans.org/FaqRunningOnJre</a> for<br> more information.
at org.netbeans.ModuleManager.enable(ModuleManager.java:929)
[catch] at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:318) |
There is also this entry at the end of the file, that although it is a warning it looks troubling.
| Quote: | WARNING [org.openide.filesystems.Ordering]: Not all children in Menu/File/ marked with the position attribute: [Import], but some are: [org-netbeans-modules-openfile-OpenFileAction.shadow, org-netbeans-modules-openfile-RecentFileAction.shadow, org-netbeans-modules-project-ui-groups-GroupsMenu.shadow, org-netbeans-modules-print-action-PageSetupAction.shadow]
WARNING [org.openide.filesystems.Ordering]: Not all children in Menu/Window/ marked with the position attribute: [com-hcs-orc-service-ORCPreviewTopComponent.shadow, com-uhc-orc-formbuilder-FormExplorerTopComponent.shadow], but some are: [org-netbeans-modules-favorites-View.shadow, org-netbeans-core-ide-ServicesTabAction.shadow, ShowPaletteAction.shadow, Output, ProgressListAction.shadow, org-netbeans-core-windows-actions-ResetWindowsAction.shadow]
INFO [org.netbeans.core.windows.persistence]: [PersistenceManager.getTopComponentForID] Problem when deserializing TopComponent for tcID:'CommonPalette'. Reason: Top component CommonPalette could not be located or loaded from Components folder.
INFO [org.netbeans.modules.palette.ShowPaletteAction]: Cannot find CommonPalette component. |
Following the first message I put this entry in the master.jnlp file:
| Code: | | <argument>--jdkhome "C:\\Program Files\\Java\\jdk1.6.0_25"</argument> |
|
|
| Back to top |
|
 |
Jesse Glick Posted via mailing list.
|
Posted: Mon Dec 05, 2011 4:08 pm Post subject: Re: JNLP problems |
|
|
On 12/02/2011 05:27 PM, jeric wrote:
| Quote: | when launched from JNLP->Run it does not work:
| Quote: | INFO [org.netbeans.core.startup.ModuleList]
org.netbeans.InvalidException:<b>The JDK is missing and is required to run some NetBeans modules
|
|
javaws as run here is part of the JRE. You can try running javaws from the JDK.
| Quote: | <argument>--jdkhome "C:\\Program Files\\Java\\jdk1.6.0_25"</argument>
|
The above is a native launcher argument. It is not interpreted by the Java code (for what should be obvious reasons) so is meaningless in a JNLP descriptor. |
|
| Back to top |
|
 |
jeric
Joined: 14 Sep 2011 Posts: 11
|
Posted: Mon Dec 05, 2011 9:24 pm Post subject: |
|
|
| Running javaws from the jdk brings the same error. Are the modules looking for tools.jar or something else? If so, can the dependencies be wrapped as part of the application? Or is it just that some of the modules are not intended to be launched by jnlp? |
|
| Back to top |
|
 |
Falchion14
Joined: 02 Sep 2011 Posts: 6
|
Posted: Mon Dec 05, 2011 11:07 pm Post subject: |
|
|
Figured it out. We needed to create a Library Wrapper Module and add not only tools.jar but also dt.jar, htmlconverter.jar and jconsole.jar.
Okay, not sure which of the 3 (dt, htmlconverter and jconsole) are necessary in addition to tools.jar, but at least one is and they are so small, I'm packaging all together.
Thanks for the pointer, Jesse.
--Stephen |
|
| Back to top |
|
 |
Jesse Glick Posted via mailing list.
|
Posted: Tue Dec 06, 2011 4:38 pm Post subject: Re: JNLP problems |
|
|
On 12/05/2011 04:24 PM, jeric wrote:
| Quote: | Are the modules looking for tools.jar or something else?
|
Generally tools.jar, though org.netbeans.modules.form would also want dt.jar.
| Quote: | If so, can the dependencies be wrapped as part of the application?
|
In some cases. There are two things to consider:
1. Historically, distributing individual JARs from the JDK was difficult from a licensing perspective. I think this was relaxed a few years ago, and probably using JARs
from OpenJDK would be least problematic.
2. While some (non-JRE) JDK components such as javac are plain old Java libraries that could be used on any JRE, others like the JDI (debugger) implementation are tied to
that JRE implementation and would not necessarily work on other JREs (or other versions of the same JRE).
| Quote: | Or is it just that some of the modules are not intended to be launched by jnlp?
|
Modules in the platform cluster are routinely used in JNLP mode, and modules in the ide cluster are generally usable in JNLP mode as well. Modules in other clusters,
especially java, are rarely tested in JNLP mode and may or may not work.
Beware that there are two ways you can consume binary modules in a JNLP-based app:
1. Generically using any Platform/IDE build, the harness will generate JNLP descriptors for the binary modules your app includes. Unfortunately the generation algorithm
has no knowledge of the behavior of the module so it will not work well if the module's NBM contains other files (except for Class-Path extensions). This style should
work for all modules in the platform cluster, and most modules in other clusters, but will fail to work for some modules - e.g. the Ant integration - that require special
files loaded by InstalledFileLocator.
2. You can define jnlp.platform.codebase and pick up prebuilt JNLP-based binaries matching particular NB releases. Published binaries are likely limited to particular
clusters (platform, ide, and java in the case of the ide-jnlp job). These binaries are more likely to work correctly, since the process allows modules to specify
idiosyncratic behavior in JNLP mode in a build script override, though modules from non-platform clusters are rarely if ever tested. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|