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 159137 - Bad jnlp file.
Summary: Bad jnlp file.
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Java Webstart (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Milan Kubec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-25 12:33 UTC by scientificware
Modified: 2009-03-24 23:34 UTC (History)
0 users

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 scientificware 2009-02-25 12:33:29 UTC
The test code :

import javax.jnlp.ServiceManager;

public class axelle
{
    static public void main(String[] args) throws Exception
    {
        String[] services = ServiceManager.getServiceNames();
        System.out.println("List of services");
        for (int i=0;i<services.length;i++){
            System.out.println(services[i]);
        }

    }
}

Built with netbean 6.1 it works. The Launch.jnlp file :

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file:/home/scientific/NetBeansProjects/fred2/dist" href="launch.jnlp">
    <information>
        <title>fred2</title>
        <vendor>scientific</vendor>
        <homepage href=""/>
        <description>fred2</description>
        <description kind="short">fred2</description>
        <offline-allowed/>
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>
        <j2se version="1.5+"/>
        <jar href="Axelle.jar" main="true" download="eager"/>
    </resources>
    <application-desc main-class="axelle">
    </application-desc>
</jnlp>



Built with Netbeans 6.5 it doesn't work. The message : java.io.FileNotFoundException:
/home/scientific/NetBeansProjects/Axelle1/dist/lib/javaws.jar (No such file or directory). The launch.jnlp file :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="file:/home/scientific/NetBeansProjects/Axelle1/dist" href="launch.jnlp" spec="1.0+">
    <information>
        <title>Axelle1</title>
        <vendor>scientific</vendor>
        <homepage href=""/>
        <description>Axelle1</description>
        <description kind="short">Axelle1</description>
    <offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
    <resources>
<j2se version="1.5+"/>
<jar eager="true" href="Axelle1.jar" main="true"/>
    <jar href="lib/javaws.jar"/>
</resources>
    <application-desc main-class="axelle">
    </application-desc>
</jnlp>

The <jar href="lib/javaws.jar"/> line was not deleted.

Sincerely.
Comment 1 Milan Kubec 2009-02-26 10:11:42 UTC
Please provide more info. Did you create the project in 6.1 and then opened in 6.5 and the problem occurs. Or did you
create the same project in 6.1 and then in 6.5? Did you add javaws.jar as project library in both cases?

Also I'm a bit confused about the report, you wrote that the line '<jar href="lib/javaws.jar"/>' was deleted in 6.5
version of the file, but in fact the line is there. On the other hand the line is missing in 6.1 version of the jnlp but
you declare it works OK. Please clarify. 

Please also provide some platform info, JDK version, platform set for the project, etc. Thanks
Comment 2 scientificware 2009-02-26 13:01:14 UTC
I created the same project first in netbeans 6.1 and then in 6.5.
I just copied and pasted the same code in the main class.
Each time, I added javaws.jar as project library in both cases.

The line <jar href="lib/javaws.jar"/> must not be present in the 6.5 file, because the lib is provided by the jre. So 
this line should have been removed.

I use JDK6 update 11.
Comment 3 scientificware 2009-02-26 20:19:17 UTC
I'm working on windows XP and linux mandriva 2008.

I've got the same result on both platforms.
Comment 4 Milan Kubec 2009-03-23 13:08:36 UTC
Fixed in core-main:
http://hg.netbeans.org/core-main/rev/d29d79a33ab6

Sometimes in next 2 - 10 days the fix will be in production build.
Comment 5 Quality Engineering 2009-03-24 23:34:34 UTC
Integrated into 'main-golden', will be available in build *200903241535* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d29d79a33ab6
User: Milan Kubec <mkubec@netbeans.org>
Log: #159137: javaws.jar cannot be included in JNLP application resources