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.

Bug 27962 - Need to obsolete "-mainclass" option from runide.sh
Summary: Need to obsolete "-mainclass" option from runide.sh
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
Depends on:
Blocks: 20253
  Show dependency tree
 
Reported: 2002-10-11 19:23 UTC by Nam Nguyen
Modified: 2008-12-23 10:43 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nam Nguyen 2002-10-11 19:23:22 UTC
Now that have removed lines that add jars from
$idehome/lib to classpath, many usages of
runide.sh option -mainclass do not work any more
(they will receive 'ClassNotFoundException').  So
we need to obsolete -mainclass option and inform
users to use java option "-Dnetbeans.mainclass="
instead.
Comment 1 Nam Nguyen 2002-10-11 19:25:36 UTC
On a second thought, we coulds just automatic translate -mainclass
into -Dnetbeans.mainclass=
Comment 2 Jan Lahoda 2002-11-06 12:29:39 UTC
Assigning to Jesse.
Comment 3 Jesse Glick 2002-11-06 15:35:42 UTC
Good point. It will not work any longer as is.

Actually I plan to just remove the system of a "main class" entirely,
as it is not really in line with core architectural changes relating
to the startup sequence and use of Lookup. There should rather be

(1) A simplified, nonreplaceable main class that just does very basic
things.

(2) All important services installed by means of modules dependencies
and lookup. So NB configuration can be controlled by the module set /
classpath.

(3) The option to invoke custom code during startup. Probably
ModuleInstall.restored would be sufficient.

See issue #20253.

In the short term, -mainclass should set the sysprop.
Comment 4 Jesse Glick 2002-11-07 20:56:38 UTC
committed     Up-To-Date  1.43        core/release/bin/runide.sh

Handing off to Vita for Windows *.exe launchers.
Comment 5 _ gtzabari 2003-01-07 04:53:14 UTC
Question: what did -mainclass used to do and would this change effect
the OS/2 launch script?
Comment 6 Jesse Glick 2003-01-07 06:32:11 UTC
If you do not have a -mainclass option in the OS/2 script, don't add
it now!
Comment 7 Vitezslav Stejskal 2003-01-07 13:41:09 UTC
Exe-launchers are updated now.
/cvs/core/exelauncher/runide.cpp: 1.31
/cvs/core/release/bin/runide.exe: 1.32
/cvs/core/release/bin/runidew.exe: 1.32
Comment 8 Tomas Pavek 2003-01-08 17:42:18 UTC
Hmm, after the fix I cannot run NetBeans in OptimizeIt by the
following command:

runide.exe -jdkhome C:\JDK1.4.0 -J-Xrunpri:dmp=1
-J-Xbootclasspath/a:C:\OptimizeitSuite\OptimizeitSuite42\lib\oibcp.jar
-cp:a C:\OptimizeitSuite\OptimizeitSuite42\lib\optit.jar
-mainclass intuitive.audit.Audit -dmp -enableAPI
org.netbeans.Main
Comment 9 Jesse Glick 2003-01-08 21:23:29 UTC
Use -J, and please edit
apisupport/release/bin/unsupported/optimizeit/nbopt.bat to match
nbopt.sh after testing.
Comment 10 Tomas Pavek 2003-01-09 09:07:15 UTC
Do you mean to use
-J-Dnetbeans.mainclass=intuitive.audit.Audit
instead of
-mainclass intuitive.audit.Audit ?

But it should not matter, as -mainclass is translated to
-Dnetbeans.mainclass in runide anyway (and of course it 
doesn't work either).

I'd think the problem is rather in that the parameters for 
the Audit class are not passed to it correctly now:
intuitive.audit.Audit -dmp -enableAPI org.netbeans.Main
Comment 11 Jesse Glick 2003-01-09 12:17:41 UTC
-Jintuitive.audit.Audit

Again, see nbopt.sh which works fine already.
Comment 12 Nam Nguyen 2003-07-08 22:12:46 UTC
Mark as verified.  Tested with a fixed version of fjscript.[bat,sh].