This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 28734
Collapse All | Expand All

(-)jini/src/org/netbeans/modules/jini/services/outofbox/TransientReggie.java (-11 / +3 lines)
Lines 19-26 Link Here
19
import org.netbeans.modules.jini.services.spi.*;
19
import org.netbeans.modules.jini.services.spi.*;
20
import org.netbeans.modules.jini.servlets.*;
20
import org.netbeans.modules.jini.servlets.*;
21
21
22
import org.netbeans.modules.jini.Version;
23
24
import org.openide.util.HttpServer;
22
import org.openide.util.HttpServer;
25
23
26
/**
24
/**
Lines 36-44 Link Here
36
    // it is a part of module layer
34
    // it is a part of module layer
37
    private static final String REGGIE_POLICY = "Jini/OutOfBox/reggie.policy";  // NOI18N
35
    private static final String REGGIE_POLICY = "Jini/OutOfBox/reggie.policy";  // NOI18N
38
36
39
    //!!! module jar file, it must be in sync with Ant build script
40
    private static final String JINI_JAR = Version.getModuleJarName();
41
    
42
    // normalized root (without terminating slash)
37
    // normalized root (without terminating slash)
43
    private String root;
38
    private String root;
44
    private String groups;
39
    private String groups;
Lines 134-145 Link Here
134
        // class path must contain module and reggie
129
        // class path must contain module and reggie
135
        
130
        
136
        String user = System.getProperty("netbeans.user");                                  // NOI18N
131
        String user = System.getProperty("netbeans.user");                                  // NOI18N
137
        String module = user + slash + "modules" + slash + JINI_JAR;                        // NOI18N
132
        // Could also use InstalledFileLocator here, but since we only need to know the location
138
        File test = new File(module);
133
        // of jini.jar anyway....
139
        if (test.exists() == false) {
134
        String module = TransientReggie.class.getProtectionDomain().getCodeSource().getLocation().getPath();
140
            String install = System.getProperty("netbeans.home");                           // NOI18N
141
            module = install + slash + "modules" + slash + JINI_JAR;                        // NOI18N
142
        }
143
        File lib = new File(getJSKRoot() + slash + "lib" + slash + "reggie.jar");           // NOI18N
135
        File lib = new File(getJSKRoot() + slash + "lib" + slash + "reggie.jar");           // NOI18N
144
        String separator = System.getProperty("path.separator");                            // NOI18N
136
        String separator = System.getProperty("path.separator");                            // NOI18N
145
        String options = "-Djava.class.path=" + module + separator + lib.getAbsolutePath(); // NOI18N
137
        String options = "-Djava.class.path=" + module + separator + lib.getAbsolutePath(); // NOI18N

Return to bug 28734