Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

Runs in Eclipse, Not in .jar ??

Thread view: 
patrickcate@gmail.com - 03 Nov 2006 23:14 GMT
I made a math program as a project for my Java class, but I've suddenly
run into problems. The program runs perfectly in Eclipse, but when I
export it as a .jar, the program will run almost perfectly, but not
quite; there are some math problems that aren't displayed. I've used
both Eclipse's .jar exporter and the fatjar plugin, but both produce
.jar's with the same problem. Does anyone know what is wrong? I
appreciate any help.

You can download the programs .jar w/source code at:
http://www.kerensky.tierranet.com/temp/euclid.jar

Also:
The specific math problems that aren't working are the Surface Area and
Volume: Rectangular Rectangle, Right Circular Cylinder, and Right
Pyramid.

This isn't a case with jar's inside of jar's.

I've tried the eclipse.exe -clean command already.

I've uninstalled and then reinstalled the Java 5.0 JDK already.
Daniel Pitts - 04 Nov 2006 00:26 GMT
> I made a math program as a project for my Java class, but I've suddenly
> run into problems. The program runs perfectly in Eclipse, but when I
[quoted text clipped - 17 lines]
>
> I've uninstalled and then reinstalled the Java 5.0 JDK already.

Without spending the time to download your jar (try using an sscce
http://www.physci.org/codes/sscce/), my guess is that you might be
accessing properties on UI components outside of the EDT. The swing
spec has some specifics about threading that many people don't fully
understand.  Threads and Swing is a good place to start
http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html.

If you aren't using the EDT the way you're supposed to, you get
concurrency problems which can manifest in undefined behaviour.
patrickcate@gmail.com - 04 Nov 2006 02:34 GMT
OK I found the problem. Some .pngs I use in the program had a character
in the filename accidently mis-capitalized. Wish Eclipse would have
shown me an error or something, it would have been much easier to
de-bug.

> I made a math program as a project for my Java class, but I've suddenly
> run into problems. The program runs perfectly in Eclipse, but when I
[quoted text clipped - 17 lines]
>
> I've uninstalled and then reinstalled the Java 5.0 JDK already.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.