Issue 11240 - [Solaris] need to manually mount unoil.jar to successfully compile java script in NetBeans
Summary: [Solaris] need to manually mount unoil.jar to successfully compile java scrip...
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: 644
Hardware: Sun SunOS
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: tomaisoc
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-06 12:05 UTC by robert.kinsella
Modified: 2003-03-13 11:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description robert.kinsella 2003-02-06 12:05:11 UTC
ScriptingFramework date 02.04.2003, on StarOffice 644 build u Solaris 9.
(OpenOffice.org 644 is not yet available for test)

      1. Create an examples directory e.g. HelloNetBeans.

      2. Mount Office API and Scripting API jar files
               Start NetBeans
               Select the File->Mount Filesystem menu item
               In the Choose Filesystem Type window that pops up select Archive
Files and click Next
               Browse to the <Office installation>/program/classes directory
               Select all the jar files in the file selection window and click
Finish
               

      3. Mount the examples directories
               Select the File->Mount Filesystem menu item
               In the Choose Filesystem Type window select Local Directory and
click Next
               Mount the examples directory you created.

      4.   Create a new script parcel
               Right click on your mounted examples directory.
               Select New->Office Scripting->Parcel Recipe
               In the New Wizard window that appears, enter the name you wish to
call your new parcel e.g HelloNetBeans.
               Select the Initial Script Language - Java.
               Clcik Finish

      5.  Click on the Contents-Empty file
      -Change the name of 'public class Empty' to 'public class HelloNetBeans'
      -Remove the package declaration 'package HelloNetBeans.Contents;' at the
top of the file
      -Add the following lines to the top of the script immediately after the
first import statement

      import com.sun.star.uno.UnoRuntime;
      import com.sun.star.frame.XModel;
      import com.sun.star.text.*;
       

      6. Add the following lines within the public class HelloNetBeans class.

      XModel model = xSc.getDocument();
       XTextDocument textdoc = (XTextDocument)
                  UnoRuntime.queryInterface(XTextDocument.class, model);
       XText oText = textdoc.getText();
       XTextCursor oCursor = oText.createTextCursor();
       oText.insertString(oCursor, "Hello NetBeans", false);

      7. Right click on the HelloNetBeans in the right frame and select save.

      8.   Right click on  the HelloNetBeans directory and select compile. You
should note that
      the compile completes successfully from the lower right hand frame (output
window) of NetBeans.

--> Bug, the compile does not compile successfully. In order to get the compile
to complete the user needs to mount the unoil.jar file in 
      
<OfficeInstallation>/user/uno_packages/cache/uno_packages/ooscriptframe.zip.*/skip_registration

 This bug is not present on Windows or Linux.
Comment 1 Unknown 2003-02-07 10:44:39 UTC
Assign to Tom to fix - should not have to manually mount the unoil.jar
Comment 2 Unknown 2003-02-12 15:33:02 UTC
Assign to Tom to fix
Comment 3 Unknown 2003-02-17 08:03:30 UTC
Should be fixed as part of 10661
Comment 4 tomaisoc 2003-02-20 12:09:58 UTC
Should be fixed by the fix for 10661.
Comment 5 robert.kinsella 2003-02-24 18:10:06 UTC
verified as fixed on Solaris SFrameworkInstall.jar.24.02.2003, closing
issue as verified
Comment 6 robert.kinsella 2003-02-27 11:50:21 UTC
reopening issue. SFrameworkINstall.jar.26.02.2003, staroffice 644
build m5, on win2000. Needed to manually mount
<OfficeInstallation>/user/uno_packages/cache/
uno_packages/ooscriptframe.zip.*/skip_registration/unoil.jar
is order to compile a java script.

Comment 7 tomaisoc 2003-02-27 15:27:06 UTC
Should be fixed again now, the path to the office installation wasn't
getting initialized properly.
Comment 8 robert.kinsella 2003-02-27 17:58:04 UTC
verified fixed on Solaris. Windows and Linux
Comment 9 robert.kinsella 2003-03-03 17:01:46 UTC
have witnessed this issue on Solaris again, same SFrameworkInstall.jar
with same NetBeans and Staroffice. Problem appears to be intermittent,
reopening issue.
Comment 10 tomaisoc 2003-03-04 12:13:47 UTC
Aaargghh! The unoil.jar file is mounted properly at startup but it is
being unmounted again on Solaris by the AutomountSupport class in
the core NetBeans implementation. I've taken a look at this class but
can't
see a straightforward way to stop it from unmounting unoil.jar, so I think
the best thing to do is to also check that the jar file is mounted before
executing the Compile, Build and Configure commands and mount it if
necessary.
Comment 11 robert.kinsella 2003-03-10 12:55:06 UTC
verified fixed in ed-0.2
Comment 12 michael.bemmer 2003-03-13 11:12:14 UTC
As mentioned on the qa dev list on March 5th I will close all resolved
<wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.