• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to setup a swing application

 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I have made a student management application. No i want to give it to my university. The problem is i have used the liquid LAF. The path is set on my pc. Now i need something that should set up the application just on a click for a new user. How can i do that.


Thanks and Regards
alexander
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want a setup file or something like that, then Google
Java exe wrapper
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would tie it down to windows. I doubt the professor would be impressed

Create a structure like

In your application manifest.mf create a Class-Path entry and point it to lib/laf.jar

This way, your package can be deployed anywhere without bothering with anything else.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your replies.
My manifest file is below i have some images also. How could i add those to the jar




Thanks and Regards
alexander
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't you put the images in the file structure then call them with foo.getClass().getResource("MyPicture.jpg");

You can add the images to a .jar: look in the Java™ Tutorials.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
Thanks for the links i am able to workout. I got a new problem. I use JCreator and compiled my application through it. I have included the LAF JAR in JCreator and when i execute all goes fine. When i created a JAR file and try to use it, i dint get any output. I tried to execute(class file) through the command prompt. I got the error below.


G:\college>java Login
Exception in thread "main" java.lang.NoSuchMethodError: com.birosoft.liquid.LiquidLookAndFeel.setShowTableGrids(Z)V
at Login.main(Login.java:310)

Then i commented the three lines which i used as options for LAF. They are below


com.birosoft.liquid.LiquidLookAndFeel.setLiquidDecorations(true, "mac");
com.birosoft.liquid.LiquidLookAndFeel.setShowTableGrids(true);
com.birosoft.liquid.LiquidLookAndFeel.setPanelTransparency(false);


I dont understand why the error occurs when i try to run the application through command prompt using above options included in it. I have also set the classpath properly. I get the LAF for the application, but the problem occurs only when i use those three lines.

Thanks and Regards
alexander
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using the same LAF jar version for compiling as well as distribution? The error indicates some discrepancy.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i am sure. I have checked once again.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I executed the program successfully on other system. The execution error shows only when i am trying to run on my laptop. I couldn't verify the problem. The exception is


Exception in thread "main" java.lang.NoSuchMethodError: com.birosoft.liquid.LiquidLookAndFeel.setLiquidDecorations(ZLjava/lang/String;)V
at Login.main(Login.java:312)


I have even configured the laptop same as the config. of pc. Even though i get that exception.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somewhere on your laptop classpath, there is another version of the same jar which is being used.
 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
The mainifest file is below.



Is the classpath what i have given above is correct or not, i mean the syntax. When i create and run the jar. The application look for the files which i have given in the Class-Path in manifest or the path which i have set in windows.


Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!