Results 1 to 16 of 16
Thread: JNLP for using Java web start
- 02-21-2013, 02:46 PM #1
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
JNLP for using Java web start
Hi i have developed a swing application and have packaged it into a jar called test.jar. I have created a jnlp file
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file:///homes/rm3710/SelfAssessment" href="selfAssessment.jnlp">
<information>
<title>My app</title>
<offline-allowed/>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+" href=
"http://java.sun.com/products/autodl/j2se"/>
<jar href="test.jar"/>
</resources>
<application-desc
name="My Application"
main-class="MyApplication">
</application-desc>
</jnlp>
However when i try to launch it by runnig the jnlp file i get an error saying
Caused by:
java.lang.ClassNotFoundException: logic.MyApplication
at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadC lass(JNLPClassLoader.java:1401)
at net.sourceforge.jnlp.Launcher.launchApplication(La uncher.java:574)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launche r.java:889)
Please help what to do
- 02-21-2013, 04:54 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 28
Re: JNLP for using Java web start
Does that class exist in test.jar, in the correct place?
Please do not ask for code as refusal often offends.
** This space for rent **
- 02-21-2013, 07:16 PM #3
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
Re: JNLP for using Java web start
The class MyApplication exists in the jar file test.jar which i created by using the command jar cf test.jar [input file names]. However when i developed this application in eclipse i had placed all classes under the package logic. The test.jar has only the classes. Should it have a folder logic within which all the classes should be present?
- 02-22-2013, 09:38 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 28
Re: JNLP for using Java web start
You need to jar up the class structure, which includes their package directories.
Please do not ask for code as refusal often offends.
** This space for rent **
- 02-22-2013, 11:36 AM #5
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
Re: JNLP for using Java web start
Hi, Thank you for your response. I have been able to launch the application now. However in my application. There is a ceratin interaction with a database. I do not see the database interaction working properly. Could using jnlp have an effect with this?
- 02-22-2013, 11:43 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 28
Re: JNLP for using Java web start
What error are you getting?
Please do not ask for code as refusal often offends.
** This space for rent **
- 02-22-2013, 11:55 AM #7
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
Re: JNLP for using Java web start
I dont get errors, it is just that i have a log in page, where the username once entered will be looked up in the database. The application launched through Java web start never finds the user. Hence i concluded that it is not using the database. I developed the project in eclipse where i had used a postgresql referenced library. I ahve exported it into the jar as well. But it does not work.
- 02-22-2013, 12:27 PM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 28
Re: JNLP for using Java web start
You'll need to stick some logging in it to see what's going on.
Does postgres work embedded?Please do not ask for code as refusal often offends.
** This space for rent **
- 02-22-2013, 12:53 PM #9
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
Re: JNLP for using Java web start
in eclipse i just had the postgresql jar in the referenced library. and i had code in the classes to set up a connection with the database and retrieve the information.
- 02-22-2013, 01:27 PM #10
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 28
Re: JNLP for using Java web start
What database though?
Where is the physical database?
The logging thing still applies, though.Please do not ask for code as refusal often offends.
** This space for rent **
- 02-22-2013, 04:08 PM #11
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
Re: JNLP for using Java web start
This is the database provided to me by my university. i access it within the university network. its a postgresql database.
- 02-22-2013, 04:21 PM #12
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
Re: JNLP for using Java web start
DO i need to add some code to the jnlp to specify the use of the PostgreSQL JDBC driver that is packaged as a jar into the test.jar?
- 02-22-2013, 06:00 PM #13
- 02-22-2013, 06:38 PM #14
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
Re: JNLP for using Java web start
I have generated the test.jar from eclipse using export as runnable jar. and it includes a folder called org within which the postgresql JDBC Driver package is placed. When i run this jar from the terminal using java -jar test.jar it works fine. But it does not work using Java web start.
- 02-25-2013, 10:41 AM #15
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 28
Re: JNLP for using Java web start
I suspect you need to list it in your <resources> tag in the jnlp.
That tells the client PC that it needs to download the jar file as well.Please do not ask for code as refusal often offends.
** This space for rent **
- 02-26-2013, 10:37 AM #16
Member
- Join Date
- Feb 2013
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
JNLP(Java Network Launching Protocol)
By mitra in forum NetworkingReplies: 0Last Post: 07-28-2011, 01:48 PM -
Start Swing GUI program by Java Web Start with IE in Eclipse debug mode
By albertkao in forum EclipseReplies: 1Last Post: 01-18-2011, 06:27 PM -
Error while executing the executable jar file using Java webstart (JNLP)
By praveen_has in forum New To JavaReplies: 0Last Post: 04-28-2010, 03:33 PM -
How do you start a Java program from the "Start" menu under Windows?
By ScottVal in forum New To JavaReplies: 5Last Post: 03-20-2009, 10:04 PM
Bookmarks