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 124047 - Update IDE related paths in JDK platform descriptor (was: Bad imported data in .netbeans\6.0\config\Services\Platforms\org-netbeans-api-java-Platform)
Summary: Update IDE related paths in JDK platform descriptor (was: Bad imported data i...
Status: RESOLVED INVALID
Alias: None
Product: ide
Classification: Unclassified
Component: Import Settings (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on: 85263 128828
Blocks:
  Show dependency tree
 
Reported: 2007-12-14 18:13 UTC by ulfzibis
Modified: 2013-09-04 15:58 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2007-12-14 18:13:09 UTC
In this folder I have:
  default_platform.xml                               26.10.2007  OK - copied from 6.0 Beta (2)
  J2ME_Wireless_Toolkit_2_2.xml                      05.07.2007  OK - imported from 5.5 by 6.0 M10
  JDK_1.6.0-b105.xml                                 05.07.2007  bad - imported from 5.5 by 6.0 M10
  JDK_1.6.0-b105_debug.xml                           05.07.2007  bad - imported from 5.5 by 6.0 M10
  Sun_Java_TM__Wireless_Toolkit_2_5_2_for_CLDC.xml   07.12.2007  OK - created on first start of 6.0 FCS

In the JDK_1.6.0....xml files I found old references to the 5.5 installation:
  <property name="java.class.path"
value="C:\Programme\Java\netbeans-5.5\ide7\modules\ext\org-netbeans-modules-java-j2seplatform-probe.jar"/>
  <property name="user.dir" value="C:\Programme\Java\netbeans-5.5"/>

For workaround, does it suffice to rename "netbeans-5.5" to "NetBeans 6.0" by hand?
Comment 1 ulfzibis 2007-12-14 18:21:38 UTC
Note: J2ME_Wireless_Toolkit_2_2.xml should be OK, because it references home="C:\Programme\Java\WTK22"

IMHO it would be also bad, if it had referenced to the NetBeans bundled WTK.
Comment 2 Peter Pis 2008-01-04 09:57:55 UTC
Reassigning to "core".
Comment 3 Lukas Hasik 2008-02-27 17:18:15 UTC
import of setting from older version doesn't "update" the settings to newer version. Therefore if you import a platform
(either WTK or JDK) then the platform will still point to the old platform location. 

1, I have no idea why there is a link to
C:\Programme\Java\netbeans-5.5\ide7\modules\ext\org-netbeans-modules-java-j2seplatform-probe.jar in the JDK 6 platform
descriptor. Did you add it to the platform libraries? IMO, rename "netbeans-5.5" to "NetBeans 6.0" won't help. You need
to know where the jar is.

2, default WTK - you are right. If your WTK 2.2 would point to the default one then it will still point to the default
location even after import.

Both the cases are as designed. Import settings isn't update to newer version of platform. It is just import of "old"
setting to new IDE -> closing as INVALID
Comment 4 ulfzibis 2008-02-28 19:54:20 UTC
Imagine the following scenario:
1.) Develop several projects since months on NB IDE 5.5
2.) Install NB IDE 6.0 and import the settings from NB IDE 5.5
3.) Test NB IDE 6.0 for some weeks and assert, that all is working fine.
4.) Uninstall the old NB IDE 5.5
5.) Assert, that your projects don't work anymore :-(

For me this is a bug which should be fixed.

I see 2 Problems:
1.) The paths in the JDK 6 platform descriptor are absolute.
    IMHO they should be relative to "${netbeans.home}/../"
2.) Some of the jars from "${netbeans.home}/../ide7/modules/ext/" in NB IDE 5.5 have been moved to
"${netbeans.home}/../java1/modules/ext/" in NB IDE 6.0.
    IMHO the importer should be aware of this.

> 1, I have no idea why there is a link to
> C:\Programme\Java\netbeans-5.5\ide7\modules\ext\org-netbeans-modules-java-j2seplatform-probe.jar
> in the JDK 6 platform descriptor.

I also know why there is this link. IMO the ...probe.jar was created by the NB installer, as it has the same timestamp
as most of the other files im my netbeans installation.

> 2, default WTK - you are right. If your WTK 2.2 would point to the default one then it will still point to
> the default location even after import.

This is also a known problem. See issue 85263 !

> Both the cases are as designed. Import settings isn't update to newer version of platform.

I don't agree, as there is no update to a newer version of the _java platform_.
There is only an update to a newer version of the _netbeans platform_ which should be processed correctly by the importer.
Comment 5 Lukas Hasik 2008-02-28 20:38:42 UTC
Ulf, you are mixing oranges and apples.
IDE is one thing and the runtimes(JDK/WTK/a server) are different ones. 

You expect that the IDE will solve upgrades of your setting. I expect that the setting will be imported AND I CAN update
them by myself IF (and only if) I want. Otherwise I will go on with old imported settings in new IDE.

I'm leaving this issue open only because I don't know why the JDK links to IDE install dir
(C:\Programme\Java\netbeans-5.5\ide7\modules\ext\org-netbeans-modules-java-j2seplatform-probe.jar)

The issue 85263 is about WTK installation not about import! I don't want the IDE "magically" upgrade to newer version of
WTK. It might cause troubles. Especially in the Java ME mess. Imagine that you are using wtk22 and your apps are working
fine but then you upgrade the IDE and they stop working. WTH? Just because your IDE upgraded the runtime/SDK. No, thank you.
Comment 6 ulfzibis 2008-02-28 23:04:36 UTC
Hi Lukas,

I don't understand why you think, I'm mixing IDE with the runtimes? But I respect, that you are the specialist.

> ... because I don't know why the JDK links to IDE install dir
I also don't understand, why there is property name="user.dir" which links to "C:\Programme\Java\netbeans-5.5"/
Isn't this superfluous, as the platform descriptor (JDK_1.6.0....xml) is located in it's proper netbeans_default_userdir ?

> You expect that the IDE will solve upgrades of your setting.
YES, if the settings refer to internal paths of the regarding IDE install dir.
No, if the settings refer to external paths.

Why isn't it possible to create relative path settings on creating a new java platform descriptor. This would solve 80 %
of this issue.

> I expect that the setting will be imported AND I CAN update them by myself IF (and only if) I want.

In this case I CAN'T update those settings, as they are not presented in the platform's properties GUI. I only can
delete it, and create a new one.

> The issue 85263 is about WTK installation not about import!

Yes, I agree basicly, but solving issue 85263 would avoid some of the possible problems described here.

"Java ME mess" , Don't say this, the ME integration in NetBeans is great!!



> I don't want the IDE "magically" upgrade to newer version of WTK.

Yes, I agree. This is not what I wanted, but I want that the concerning links wouldn't become invalid, if an older NB
installation is deleted. IMHO this could only be solved, if the WTK will be located outside the netbeans install dir.

Comment 7 Lukas Hasik 2008-02-29 08:06:37 UTC
Hi Ulf,

>> ... because I don't know why the JDK links to IDE install dir
>I also don't understand, why there is property name="user.dir" which links to "C:\Programme\Java\netbeans-5.5"/
>Isn't this superfluous, as the platform descriptor (JDK_1.6.0....xml) is located in it's proper netbeans_default_userdir ?
I agree. I'm looking for the answer.

>> You expect that the IDE will solve upgrades of your setting.
>YES, if the settings refer to internal paths of the regarding IDE install dir.
>No, if the settings refer to external paths.
>
>Why isn't it possible to create relative path settings on creating a new java platform descriptor. This would solve 80%
of this issue.

Good point. I assume that you mean - relative path/links for the NB relative settings(if they have to be there at all)
I'm changing this issue to ENHANCEMENT. Please, don't change it to bug again otherwise it will be closed as wontfix,
probably. 

-----
>> The issue 85263 is about WTK installation not about import!
>Yes, I agree basicly, but solving issue 85263 would avoid some of the possible problems described here.
>"Java ME mess" , Don't say this, the ME integration in NetBeans is great!!
Java ME mess == device fragmentation. Let keep the WTK problem in the separate issue.


>> I don't want the IDE "magically" upgrade to newer version of WTK.
>Yes, I agree. This is not what I wanted, but I want that the concerning links wouldn't become invalid, if an older NB
installation is deleted. 
>IMHO this could only be solved, if the WTK will be located outside the netbeans install dir.
Yes, the issue 85263 covers this case. Then the WTK platform will be IDE independent. Actually, it is IDE independet
even these days but because it is installed under IDE install dir then it is deleted when IDE is uninstalled, of course.
Comment 8 Lukas Hasik 2008-02-29 08:10:05 UTC
Radku, is this issue related to general upgrade or should it be re-assigned to owner of the platform descriptor who
should take care how and what is imported? Please, reassign if needed.
Comment 9 ulfzibis 2008-02-29 10:49:03 UTC
Hi Lukas,

thanks for understanding my suggestion now.

> I'm changing this issue to ENHANCEMENT. Please, don't change it to bug again otherwise it will be
> closed as wontfix, probably.

I agree, good idea. :-)
Comment 10 Lukas Hasik 2008-02-29 14:18:07 UTC
Ulf, I filled issue 128828. It is about the ...probe.jar that is definitely incorrect value of java.class.path

Comment 11 ulfzibis 2008-02-29 15:16:26 UTC
OK.

Lukas, so I'm happy that I mistrusted your first answers. ;-)
Comment 12 ulfzibis 2008-02-29 15:45:13 UTC
So issue 128828 should solve this issue by 90 %.

It remains the possible problem, if WTK is located in the IDE's install dir. :-(

Comment 13 Antonin Nebuzelsky 2008-04-15 17:11:00 UTC
Reassigning to new module owner jskrivanek.
Comment 14 Quality Engineering 2008-12-23 14:24:15 UTC
This issue had *1 votes* before move to platform component
Comment 15 Theofanis Oikonomou 2013-09-04 15:58:33 UTC
(In reply to ulfzibis from comment #12)
> So issue 128828 should solve this issue by 90 %.
> 
> It remains the possible problem, if WTK is located in the IDE's install dir.
> :-(

I guess this one can be closed then. The remaining 10% should not be a problem once bug 85263 is fixed. Thank you