Tolgar
asked on
How to create jnlp files for a java project?
I have a GUI application that I created in Java.
Now, I would like to create a jnlp file from this project. How can I do that?
Can you please give me step by step instructions?
Now, I would like to create a jnlp file from this project. How can I do that?
Can you please give me step by step instructions?
ASKER
I fixed that problem but now I am getting another error:
I thought the png file was corrupted and I replaced it but it didn't work.
I signed the jar file. So this should not be the problem.
Why do you think I still get this error?
Thanks,
org.eclipse.swt.SWTException: i/o error (java.io.FileNotFoundException: folder.png (The system cannot find the file specified))
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.graphics.ImageLoader.load(Unknown Source)
at org.eclipse.swt.graphics.ImageDataLoader.load(Unknown Source)
at org.eclipse.swt.graphics.ImageData.<init>(Unknown Source)
at org.eclipse.swt.graphics.Image.<init>(Unknown Source)
at com.something.tools.workflows.standards.Gui.main(Gui.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: folder.png (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.eclipse.swt.internal.Compatibility.newFileInputStream(Unknown Source)
... 14 more
I thought the png file was corrupted and I replaced it but it didn't work.
I signed the jar file. So this should not be the problem.
Why do you think I still get this error?
Thanks,
ASKER
When I switch back to 64 bit swt , I don't get this error but this time I get the following error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.something.tools.workflows.standards.Gui.main(Gui.java:146)
... 9 more
Seems pretty clear:
Caused by: java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
ASKER
Well, when I change the swt jar then the previous FileNotFoundException error shows up.
On the other hand, I am ok with creating a runnable jar for now and run in on the command line. But then I got the following error:
How can I fix this problem?
On the other hand, I am ok with creating a runnable jar for now and run in on the command line. But then I got the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-win32-3735 in java.library.path
no swt-win32 in java.library.path
Can't load library: /home/tolgar/.swt/lib/linux/x86_64/libswt-win32-3735.so
Can't load library: /home/tolgar/.swt/lib/linux/x86_64/libswt-win32.so
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at com.something.tools.workflows.standards.Gui.main(Gui.java:146)
How can I fix this problem?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So, aside from jnlp, how can I make this project in a way that people can start the app.
It's an internal app only a few people will use it. Therefor, any solution is greatly appreciated.
Thanks,
It's an internal app only a few people will use it. Therefor, any solution is greatly appreciated.
Thanks,
jnlp is probably your best chance of doing it, as it should be able to cope with the varying architectures and OSs you might find, but you need to look closely at the jnlp spec so you can get it right.
Of course, you're going to need to know what binaries and files are required for each architecture and platform, so i'd probably experiment with various builds outside of jnlp beforehand.
Of course, you're going to need to know what binaries and files are required for each architecture and platform, so i'd probably experiment with various builds outside of jnlp beforehand.
ASKER
But I have a public static void main(String[] args) method in the class that I referred in the as main-class.
Why does this happen?