Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

JAR program works in Eclipse but when exported it doesn't work

Foxface918
 Share

When I'm programming in Eclipse the program works fine but when I export it to a runnable JAR file it doesn't work it just shows a JFrame but doesn't show any of the graphics. 

Link to comment
Share on other sites

Link to post
Share on other sites

*uses magic code conjuring powers because there's nothing here to check* *gets nothing because I don't have magic powers* (add some source code, please)

 

Did you make sure any external libraries were included in it?

Main System (Byarlant): Ryzen 5 1600X | Asus B350-F Strix | Corsair H80i V2 | 16GB G.Skill DDR4 3200MHz CAS-14 | XFX RX 5600 XT THICC II | Samsung 960 PRO 512GB / Samsung 970 EVO 500GB / Crucial MX500 2TB / Seagate 7200RPM 3TB / WD White 7200RPM 8TB | Corsair CX650M | Mellanox ConnectX-3 10G NIC | Anidees AI-07BW Case | Dell U3415W Monitor | Microsoft Modern Keyboard

 

TrueNAS Server (Veda): Core i3-4170 | Supermicro X10SLL-F | Corsair H60 | 32GB Micron DDR3L ECC 1600MHz | 4x 10TB WD Whites / 2x 1TB HGST 2.5" / 1x Samsung PM961 128GB SSD / 1x Kingston 16GB SSD | Seasonic Prime Fanless 500W | Mellanox ConnectX-3 10G NIC | LSI 9207-8i LBA | Fractal Design Node 804 Case (side panels swapped to show off drives)

 

Media Center/Video Capture (Jesta): Core i7-2600 | Asus H77M-PRO | Stock Cooler | 8GB No-name DDR3 | EVGA GTX750Ti SC | Sandisk UltraII SSD 64GB / Seagate 1.5TB HDD | Corsair CX450M | Hauppauge ImpactVCB-PCIe | Syba USB3.1 Gen 2 Card | LG UH12NS30 BD-ROM | Silverstone Sugo SG-11 Case

 

Laptop (Narrative): Lenovo Flex 5 81X20005US | Ryzen 5 4500U | 16GB RAM (soldered) | Vega 6 Graphics | SKHynix P31 1TB NVMe SSD | (all-around awesome machine)

Laptop (Rozen-ZuluSony VAIO VPCF13WFX | Core i7-740QM | 8GB Patriot DDR3 | GT 425M | Kingston 120GB SSD | Blu-ray Drive | (lived a good life, retired with honor)

 

Tablet (---): Samsung Galaxy Tab A 8" (crosses fingers)
Tablet (ReGZ)Asus T102HA (BIOS clock doesn't tick, loses time when sleep/off) (I kill tablets with disturbing regularity)

Tablet (Unicorn)Surface Pro 2 (battery will reset total capacity to current charge, leading Windows to think it's always 100% charged until it dies)

Tablet (Loto)Dell Venue 8 Pro (screen discoloration issues, wouldn't update to Windows 10)

Tablet: iPad 2 16GB (WiFi died, basically useless after that)

 

Testbed/Old Desktop (Kshatriya): Xeon X5470 @ 4.0GHz | ZALMAN CNPS9500 | Gigabyte EP45-UD3L | 8GB Nanya DDR2 400MHz | XFX HD6870 DD | OCZ Vertex 3 Max-IOPS 120GB | Corsair CX430M (?) | HooToo USB 3.0 PCIe Card | NZXT H230 Case

 

Camera: Sony ɑ7II (w/ Meike Grip) | Sony SEL24240 | Samyang 35mm ƒ/2.8 | Sony SEL50F18F | Sony SEL2870 (kit lens) | PNY Elite Perfomance SDXC cards

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, AbydosOne said:

*uses magic code conjuring powers because there's nothing here to check* *gets nothing because I don't have magic powers* (add some source code, please)

 

Did you make sure any external libraries were included in it?

What part of the code do you want I don't think its a issue with the code i think it is a issue with Eclipse or the export setting I tried all three of the exporting options. Do you think it could be because it is being ran on java 1.8 intend of something like 10 or 13.

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Foxface918 said:

What part of the code do you want I don't think its a issue with the code i think it is a issue with Eclipse or the export setting I tried all three of the exporting options. Do you think it could be because it is being ran on java 1.8 intend of something like 10 or 13.

If you developed it against e.g. Java 10 and you're using some Java 10 features, then yeah it wouldn't run on Java 8. But if you developed against Java 8 it should (usually) run fine on the newer versions. Do you have multiple versions of Java installed?

 

My best bet would be that while you created a runnable JAR, the JAR doesn't include the libraries needed to run it (i.e. a "fat" JAR). In that case you need to specify the libraries it needs to run it when you start it.

 

Other than that: Maybe add some error logging, some console output anything that shows what, if anything, is going wrong?

Remember to quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×