net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Unknown Main-Class. Could not determine the main class for this

grin's picture

Since I've installed icedtea on Debian/Linux (because of the extermination of Sun's java in the main distro) some things work better (more debug info :)) and some doesn't. One which doesn't is bt747 jnlp installers since they simply choke on:

net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application.
        at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:778)
        at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Unknown Main-Class. Could not determine the main class for this application.
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:505)
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:198)
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:317)
        at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770)
        ... 2 more
Caused by:
net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Unknown Main-Class. Could not determine the main class for this application.
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:505)
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:198)
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:317)
        at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770)
        at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889)

I am not that familiar with java/javaws to be able to tell what's the problem, but it's pretty presistent. All I see is that main-class is defined in the jnlp...

Any idea what to try to hack about it?

<jnlp href="BT747_J2SE_Latest_RXTX2.2_Install.jnlp"
        codebase="http://soft.bt747.org/">
  <information>
    <title>BT747 Desktop RXTX2.2 Latest</title>

   netx - an open-source JNLP client.
   Copyright (C) 2001-2003 Jon A. Maxwell (JAM)

mdeweerd's picture

Hi I've had BT747 run with

Hi

I've had BT747 run with 'openjava' (I think it's called like that) in the past.  It's a question about JNLP interpretation which may not be perfectly done by 'netx'.

I'll try to reproduce it.

Your alternative is to get the zip file an run 'run_j2se.sh'.

Kind regards

 

Mario

mdeweerd's picture

Hi On my virtual machine, I

Hi

On my virtual machine, I have:

lrwxrwxrwx 1 root root 42 2011-05-10 14:05 javaws -> /usr/lib/jvm/java-6-openjdk/jre/bin/javaws

/usr/bin/javaws points to that 'javaws'.It's not 'icedtea', but it is what I had working in the past.I launched using something like: javaws http://soft.bt747.org/BT747_J2SE_Latest_RXTX2.2_Install.jnlp(In firefox you can surely say choose 'javaws' to open the 'jnlp' file).

 

I have some issues with this on my virtual system, so I'll come back to this later.

It looks like I have to install icedtea (or you could try openjdk).

 

Mario

mdeweerd's picture

I also checked the shortcut

I also checked the shortcut on my Linux desktop, it says this:

javaws "/home/mdeweerd/.icedtea/cache/31/http/soft.bt747.org/BT747_J2SE_Latest_RXTX2.2_Install.jnlp"

 

When launching

javaws http://soft.bt747.org/BT747_J2SE_Latest_RXTX2.2_Install.jnlp

There were some messages indicating that the cache was corrupt.  Given my findings above, I renamed the '.icedtea' directory in my $HOME and tried again.  Then, BT747 was fetched successfully with the command line just above  (after trusting myself).

 

Your 'netx' is from 2003, so we might consider it to be a bit too old. My openjdk is more recent.

 

 

grin's picture

First, my "netx" is from

First, my "netx" is from icedtea repository (which is not strictly "the" netx anymore), and the version is possibly quite recent:

icedtea-web 1.2 (1.2-1)
Then I've tried to remove the complete .icedtea and .icedtea-plugin dirs, trusting you (obviously :)) and the result is just the same. It may be related to the upgrade of icedtea-7 in debian/unstable, since it's been probably working with icedtea-6, but I cannot help you (or them) to figure out why and why not.

OpenJDK is actually IcedTea-7 now, at least in Debian/sid.

And yes, I can use the ZIP file, that's my fallback, so no life-and-death situation, just wanted to help sorting this out since your default recommendation is the webstart one, which may fail for recent debian installation. (Or maybe it's my machine only, but I really cannot tell without pointers about what to look at.)

I'll try to put up a clean debian unstable and try it.

grin's picture

First, my "netx" is from

First, my "netx" is from icedtea repository (which is not strictly "the" netx anymore), and the version is possibly quite recent:

icedtea-web 1.2 (1.2-1)
Then I've tried to remove the complete .icedtea and .icedtea-plugin dirs, trusting you (obviously :)) and the result is just the same. It may be related to the upgrade of icedtea-7 in debian/unstable, since it's been probably working with icedtea-6, but I cannot help you (or them) to figure out why and why not.

OpenJDK is actually IcedTea-7 now, at least in Debian/sid.

And yes, I can use the ZIP file, that's my fallback, so no life-and-death situation, just wanted to help sorting this out since your default recommendation is the webstart one, which may fail for recent debian installation. (Or maybe it's my machine only, but I really cannot tell without pointers about what to look at.)

I'll try to put up a clean debian unstable and try it.

mdeweerd's picture

Ok, I am on Ubuntu where I

Ok, I am on Ubuntu where I have: icedtea-netx 1.1.3-1ubuntu1.1 .

The summary says:

NetX - implementation of the Java Network Launching Protocol (JNLP) 

NetX provides a drop-in replacement for javaws (Java Web Start). Since upstream NetX is dormant, IcedTea is hosting and modifying the sources in the IcedTea-Web directory.

IcedTea's NetX currently supports verification of signed jars, trusted certificate storing, system certificate store checking, and provides the services specified by the jnlp API.

I checked which files are in the 'netx' distribution - it seems to be a library for java (netx.jar) - there is no 'native' netx call and I can see configuration files for 'javaws'.  It actually is 'javaws' because '/usr/lib/jvm/java-6-openjdk/bin/javaws' is in the package.  (The man page 'javaws.1.gz' is in the package).

Clearly things work with that version.

 

It could also be that your system is not recognised (but stilll, it should find the main class).

What does it say in the 'Info window' when you launch from the command line? I have:

34871 - Linux
34873 - amd64
34875 - 3.0.0-16-generic
34876 - 1.6.0_23
34878 - 64

 

To conclude, to check I'ld have to install the unstable version of icedtea on debian?

grin's picture

To conclude, to check I'ld

To conclude, to check I'ld have to install the unstable version of icedtea on debian?

It seems so. Netinstall does it under 5 minutes if you have the VM to install into.

 ./lib/rxtx-2.1-7-bins-r2/Linux/i686-unknown-linux-gnu
PATH = /usr/local/j2re1.4.2/bin:/usr/lib/libfm:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
5788 - BT747 2.X.1953 Build:BT747_mdeweerd.1953.20120126213653618
5788 - Initial: 1019x575  Screen: 1920x1080 Final: 1019x575
5788 - Linux
5788 - i386
5789 - 3.2.0-1-686-pae
5789 - 1.7.0_03-icedtea
5789 - 32
5789 - Fail com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Fail com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
Success com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
javax.swing.plaf.nimbus.NimbusLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
com.sun.java.swing.plaf.gtk.GTKLookAndFeel

mdeweerd's picture

I have debian installed and

I have debian installed and added 'sid' to the sourcelist.

Its going to take some time to install the migration.

I requested 'openjdk-7-jre' .  The java package is still 'openjdk' - icedtea seems to 'add' on that with a plugin for browsers and a cacoa based jvm.  So I first try without the latter.  I am downloading the 170MB of remaining files...

grin's picture

downgrading to icedtea-6

downgrading to icedtea-6 doesn't help, so it is most probably the netx version from icedtea-7 (which cannot be simply downgraded).

mdeweerd's picture

I tried installing the new

I tried installing the new debian version, but that did not go well (after going to the dev version, I lost the X interface).

I guess that it will be detected throught other tests and fixed before the official release of debian.  That is why it is a development version ;-).

mdeweerd's picture

Hi I upgraded to Ubuntu 12.04

Hi

I upgraded to Ubuntu 12.04 and I experience the same problem there.

I looked through the setup trying to identify what could be the cause, and I was able to identify a potential cause, proven by a change in the setup.

Basically, the main class is in the jar defined in http://soft.bt747.org/BT747_J2SE_Latest_common.jnlp - it clearly states:

    <jar href="Latest/BT747_j2se.jar" main="true" download="eager" />

where 'main="true"' says that the main class is there.

The main class is set in http://soft.bt747.org/BT747_J2SE_Latest_RXTX2.2_Install.jnlp:

  <application-desc main-class="bt747.j2se_view.BT747Main">

 

So my guess is that the newer version no longer supports that the 'jar' file with the main class is defined in an 'extension jnlp' whereas the path to the main class is defined in the main jnlp.

In my setup, I do it this way in order to define the main jar file only once for multiple setups (DRY method).

By moving the essential content of http://soft.bt747.org/BT747_J2SE_Latest_common.jnlp  to  http://soft.bt747.org/BT747_J2SE_Latest_RXTX2.2_Install.jnlp, the latter link now works on Ubuntu.

However, I do not consider this a but of the BT747 setup.

Post new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br>
  • Lines and paragraphs break automatically.
  • Use the special tag [adsense:format:slot] or [adsense:format:[group]:[channel][:slot]] or [adsense:block:location] to display Google AdSense ads.
  • Images can be added to this post.

More information about formatting options