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 25524 - Installer should write info about found jdk for runide.sh use
Summary: Installer should write info about found jdk for runide.sh use
Status: VERIFIED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Richard Gregor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-11 07:30 UTC by Richard Gregor
Modified: 2003-07-10 08:00 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diff of the change in trunk (46.12 KB, patch)
2002-07-15 17:04 UTC, Richard Gregor
Details | Diff
diff of the change in trunk (1.86 KB, patch)
2002-07-16 09:38 UTC, Richard Gregor
Details | Diff
diff of changes proposed by Jesse. Is it O.K. Jesse? (2.09 KB, patch)
2002-07-16 12:57 UTC, Richard Gregor
Details | Diff
diff of changes in NB.xml (14.10 KB, patch)
2002-07-17 15:19 UTC, Richard Gregor
Details | Diff
diff of changes in NB.xml - previous one caused problem with build (14.10 KB, patch)
2002-07-17 15:20 UTC, Richard Gregor
Details | Diff
jvm file for ibm 1.4.1 jdk (future use) (501 bytes, text/plain)
2002-07-18 17:20 UTC, Richard Gregor
Details
jvm for sun jdk1.3.1 (517 bytes, text/plain)
2002-07-18 17:47 UTC, Richard Gregor
Details
jvm for sun jdk141 (495 bytes, text/plain)
2002-07-18 17:50 UTC, Richard Gregor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Gregor 2002-07-11 07:30:48 UTC
Write jdkhome into runide.sh or another
appropriate place. Users without java in PATH and
without JDK_HOME env. properties will be able to
run IDE without setting this properties after install.
Comment 1 Richard Gregor 2002-07-15 17:02:09 UTC
Changed WriteAction bean writes info about jdkhome used for launching
installer into ide.cfg. That means user with no JDK_HOME set will be
able to run IDE. There were changed jvm files used for search.
j2sdk1.4.1 support is included.
Fixed in trunk.
Comment 2 Richard Gregor 2002-07-15 17:04:11 UTC
Created attachment 6681 [details]
diff of the change in trunk
Comment 3 Jesse Glick 2002-07-15 17:51:30 UTC
I don't like the writeJDKHome() method impl. It hardcodes the default
contents of ide.cfg which we might like to change by editing
core/release/bin/ide.cfg. Please change this method to:

1. Read the existing ide.cfg. If there is any line matching
"-jdkhome", do nothing.

2. If there is no such line, append "-jdkhome ${jdkhome}\n" to the
file, using the append mode in FileWriter, so as to retain any
existing settings in the config file. Line breaks in the config file
ought to be ignored (please test of course).

By the way, I see many lines in the attached diff which are purely
changes of whitespace (deleting trailing spaces). These meaningless
changes make the diff much harder for a reviewer to read. For more,
see the recommendations here:

http://www.netbeans.org/devhome/docs/code_conventions.html
Comment 4 Richard Gregor 2002-07-16 09:34:23 UTC
Good idea. I rewrote WriteAction.
Comment 5 Richard Gregor 2002-07-16 09:38:38 UTC
Created attachment 6688 [details]
diff of the change in trunk
Comment 6 Jesse Glick 2002-07-16 12:32:23 UTC
Looks better, thanks.

BTW at least in the trunk version please make sure to close FileReader
fr in a finally-block, for safety. (Probably better to not have the
FileWriter open on the same file when the FileReader is open, too:
open & close the FR first, then maybe open & close the FW.)
Comment 7 Richard Gregor 2002-07-16 12:57:05 UTC
Created attachment 6707 [details]
diff of changes proposed by Jesse. Is it O.K. Jesse?
Comment 8 Jesse Glick 2002-07-16 13:47:02 UTC
Looks good to me.
Comment 9 Richard Gregor 2002-07-17 15:19:36 UTC
Created attachment 6756 [details]
diff of changes in NB.xml
Comment 10 Richard Gregor 2002-07-17 15:20:01 UTC
Created attachment 6757 [details]
diff of changes in NB.xml - previous one caused problem with build
Comment 11 Richard Gregor 2002-07-18 17:19:13 UTC
Below are attached files which should be on branch 34 for correct
functionality of this fix. Those are jvm files containing definition
of search. They are not on branch 34.
Comment 12 Richard Gregor 2002-07-18 17:20:53 UTC
Created attachment 6787 [details]
jvm file for ibm 1.4.1 jdk (future use)
Comment 13 Richard Gregor 2002-07-18 17:47:11 UTC
Created attachment 6789 [details]
jvm for sun jdk1.3.1
Comment 14 Richard Gregor 2002-07-18 17:50:48 UTC
Created attachment 6790 [details]
jvm for sun jdk141
Comment 16 jrojcek 2002-07-19 17:30:02 UTC
Reviewed. The patch looks correct.
Comment 17 Richard Gregor 2002-07-20 08:54:18 UTC
Fixed in release34.
Comment 18 Richard Gregor 2003-07-10 08:00:54 UTC
verified.