Results 1 to 4 of 4
Thread: Jar file problems!
- 12-30-2008, 05:50 AM #1
Member
- Join Date
- Dec 2008
- Posts
- 3
- Rep Power
- 0
Jar file problems!
Hi, I'm new.
Here is my problem. Currently, i've used Eclipse to do my assignment which is a simple game( MasterMind Game using Server and Client socket). The thing is my program worked really fine within the Eclipse(API environment itself). However, when i exported my project to 2 jar files, one is server.jar and the other is client.jar, the program didn't work properly.
any one has solution or suggestion for this?
Thx in advance.
- 12-30-2008, 05:07 PM #2
You didn't narrow things down much...
First, you need each application to run separately. I assume the server starts first and then waits for the client. Create two batch files, one for each application. Make sure you set up the classpath correctly on the java command line. The JAR file must be listed in the classpath. Make sure you specify the fully qualified main class, i.e. dir1.dir2.MainClassName
Get the server working first. Using java, rather than javaw, so your batch window gets the console messages. Put a "pause" at the end of the batch file to keep it from ending.
Once the server is working, work on the client.
Eclipse helps you out a lot by setting up the environment. That's most likely your problem.
Good luck...
- 12-31-2008, 02:59 AM #3
Member
- Join Date
- Dec 2008
- Posts
- 3
- Rep Power
- 0
Thank you for your help.
Yes you are right. In my program, the server starts first and waits for the client. And I traced the log file, nothing was wrong in the server side. Here is the situation where the problem occurs in the client side:
Logically, when a user runs the program, a main window will come up. This main window has a few buttons like: single game, multiplayer game...etc. Then when the user clicks on either those two buttons, the main window supposingly leads to another window(i used card layout for this). However, the program didnt work as it's supposed to (It worked in Eclipse though o.o). Anyway, i will do as what you told me and see if i can solve this. Thx again.
- 12-31-2008, 10:50 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Can you show the content of the MANIFEST.MF file in your build jar file. I think you know that how to find that file?
Similar Threads
-
File read/write problems
By p900128 in forum New To JavaReplies: 4Last Post: 06-27-2008, 12:15 AM -
Problems with file dir
By willemjav in forum Java AppletsReplies: 0Last Post: 02-07-2008, 12:08 AM -
Problems sending file throught TCP sockets
By Nite in forum Advanced JavaReplies: 2Last Post: 08-04-2007, 09:01 PM -
problems trying to view the contents of a text file in JTextArea
By warship in forum New To JavaReplies: 1Last Post: 07-18-2007, 11:20 PM -
problems with the name of file
By bbq in forum Java ServletReplies: 0Last Post: 06-28-2007, 04:47 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks