Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Java throwing up weird errors... Compile fine but running doesn't happen
New Posts  All Forums:Forum Nav:

Java throwing up weird errors... Compile fine but running doesn't happen - Page 2

post #11 of 19
Thread Starter 
Tbh this is a bit too much for me right now. I just wanted to do the light recapping. And make some notes on the programs I'd already created and maybe change a few things. Getting a bit confusing as now I have to learn how to use eclipse!! Does anyone has any suggestions about my original problem? Would save me hours if I could just getting it EditPlus working again...
Dark Star
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 - Currently Overclocking ;) Gigabyte GA-EP45-UD3P HD 6950 OCZ Blade LC DDR2 PC29200 4GB (GOT) 
Hard DriveOSMonitorKeyboard
640GB for Storage and OCZ Vertex 2e 60GB Windows 7 Ultimate-Signature Edition 3 x 22" -BenQ G2222HDL Logitech G15 
PowerCaseMouse
Corsair TX850 HAF 932 Logitech G500 
  hide details  
Reply
Dark Star
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 - Currently Overclocking ;) Gigabyte GA-EP45-UD3P HD 6950 OCZ Blade LC DDR2 PC29200 4GB (GOT) 
Hard DriveOSMonitorKeyboard
640GB for Storage and OCZ Vertex 2e 60GB Windows 7 Ultimate-Signature Edition 3 x 22" -BenQ G2222HDL Logitech G15 
PowerCaseMouse
Corsair TX850 HAF 932 Logitech G500 
  hide details  
Reply
post #12 of 19
How are you trying to run the program?
Have you set your environmental variables?
    
CPUGraphicsRAMHard Drive
Intel Core i7-4650U Intel HD Graphics 5000 Samsung 8GB DDR3 Samsung 512GB SSD 
OS
Macintosh OS X "Yosemite" 
  hide details  
Reply
    
CPUGraphicsRAMHard Drive
Intel Core i7-4650U Intel HD Graphics 5000 Samsung 8GB DDR3 Samsung 512GB SSD 
OS
Macintosh OS X "Yosemite" 
  hide details  
Reply
post #13 of 19
another option would be to use the command line (javac.exe) to compile and execute the program, maybe that will work.
post #14 of 19
Jcreator is really noobish but it's really really really simple (really).
post #15 of 19
Thread Starter 
Quote:
Originally Posted by MrAlex View Post
How are you trying to run the program?
Have you set your environmental variables?
I looked into that but wasn't too sure it was the problem, because I'd never set them before and my java programs used to work just fine :/

Quote:
Originally Posted by galaxyy View Post
another option would be to use the command line (javac.exe) to compile and execute the program, maybe that will work.
How would I go about doing this??!

Quote:
Originally Posted by Phoriver View Post
Jcreator is really noobish but it's really really really simple (really).
I'll give it look see!
Dark Star
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 - Currently Overclocking ;) Gigabyte GA-EP45-UD3P HD 6950 OCZ Blade LC DDR2 PC29200 4GB (GOT) 
Hard DriveOSMonitorKeyboard
640GB for Storage and OCZ Vertex 2e 60GB Windows 7 Ultimate-Signature Edition 3 x 22" -BenQ G2222HDL Logitech G15 
PowerCaseMouse
Corsair TX850 HAF 932 Logitech G500 
  hide details  
Reply
Dark Star
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 - Currently Overclocking ;) Gigabyte GA-EP45-UD3P HD 6950 OCZ Blade LC DDR2 PC29200 4GB (GOT) 
Hard DriveOSMonitorKeyboard
640GB for Storage and OCZ Vertex 2e 60GB Windows 7 Ultimate-Signature Edition 3 x 22" -BenQ G2222HDL Logitech G15 
PowerCaseMouse
Corsair TX850 HAF 932 Logitech G500 
  hide details  
Reply
post #16 of 19
Do you have JDK updated?
post #17 of 19
How are you compiling this file? This exception is because it cannot find the .class file. So either you didnt compile the output to the right place, or you forgot to compile

Since you specified a package, ch01_intro, you need to run the java command one level higher than your .class file.

I bet this is what you are doing wrong.... if you want to run right where the .class file is located, you need to remove th pacakge statment. Otherwise, something like this:

if output bin is:
C:\\myjava\\ch01_intro\\HelloWorld.class

You should run from:

C:\\myjava and command would be java ch01_into.HelloWorld
Edited by Phobos223 - 5/16/11 at 6:42am
Sweaty Box
(10 items)
 
Stacker T01 v5.0
(10 items)
 
Sturbin' Box
(13 items)
 
CPUMotherboardGraphicsRAM
i7 5960X ASUS Rampage V Extreme 2x Nvidia 1080ti SLI 32GB Corsair Dominator DDR4 3400Mhz 
Hard DriveCoolingOSMonitor
Samsung 850 pro NVMe M.2 Custom EK watercooled loop Windows 10 Pro Triple LG 4K 27" 
PowerCase
Cosair 1500Ti CaseLabs M10 
CPUMotherboardGraphicsRAM
Delidded i7 3770K @ 5Ghz ASUS Maximus V Gene EVGA GTX 670 SLI - Heatkiller Blocks 16GB Corsair Vengeance DDR3 @ 2400Mhz 
Hard DriveCoolingOSMonitor
Samsung 840 EVO Custom Loop - EK Supreme HF Windows 7 Pro 64-bit Dell 30" + 2 x Dell 24" 
PowerCase
Sparkle Gold 1200W CM Stacker T01 
CPUMotherboardGraphicsRAM
Phenom II X6 1055T @4.0GHz (308x13) / 3.08GHz NB ASUS Crosshair IV Formula w/EK full coverage block ATI 5870x2 Crossfired @ 950/1250 8GB Corsair Vengeance DDR3 1600 
Hard DriveCoolingOSMonitor
OCZ Vertex 3 SSD Swifttech Apogee Drive Block/Pump Windows 7 64bit Pro ASUS 27" LCD 
PowerCase
Corsair Professional Series Gold 650W  Lian-Li PC-650A 
  hide details  
Reply
Sweaty Box
(10 items)
 
Stacker T01 v5.0
(10 items)
 
Sturbin' Box
(13 items)
 
CPUMotherboardGraphicsRAM
i7 5960X ASUS Rampage V Extreme 2x Nvidia 1080ti SLI 32GB Corsair Dominator DDR4 3400Mhz 
Hard DriveCoolingOSMonitor
Samsung 850 pro NVMe M.2 Custom EK watercooled loop Windows 10 Pro Triple LG 4K 27" 
PowerCase
Cosair 1500Ti CaseLabs M10 
CPUMotherboardGraphicsRAM
Delidded i7 3770K @ 5Ghz ASUS Maximus V Gene EVGA GTX 670 SLI - Heatkiller Blocks 16GB Corsair Vengeance DDR3 @ 2400Mhz 
Hard DriveCoolingOSMonitor
Samsung 840 EVO Custom Loop - EK Supreme HF Windows 7 Pro 64-bit Dell 30" + 2 x Dell 24" 
PowerCase
Sparkle Gold 1200W CM Stacker T01 
CPUMotherboardGraphicsRAM
Phenom II X6 1055T @4.0GHz (308x13) / 3.08GHz NB ASUS Crosshair IV Formula w/EK full coverage block ATI 5870x2 Crossfired @ 950/1250 8GB Corsair Vengeance DDR3 1600 
Hard DriveCoolingOSMonitor
OCZ Vertex 3 SSD Swifttech Apogee Drive Block/Pump Windows 7 64bit Pro ASUS 27" LCD 
PowerCase
Corsair Professional Series Gold 650W  Lian-Li PC-650A 
  hide details  
Reply
post #18 of 19
try making the class public?
post #19 of 19
Nah, public isn't the problem as the default access modifier will allow for package level access. The no classdef exception is because it cannot find the .class file, probably because he is running the java command from the wrong place like I mentioned above!
Sweaty Box
(10 items)
 
Stacker T01 v5.0
(10 items)
 
Sturbin' Box
(13 items)
 
CPUMotherboardGraphicsRAM
i7 5960X ASUS Rampage V Extreme 2x Nvidia 1080ti SLI 32GB Corsair Dominator DDR4 3400Mhz 
Hard DriveCoolingOSMonitor
Samsung 850 pro NVMe M.2 Custom EK watercooled loop Windows 10 Pro Triple LG 4K 27" 
PowerCase
Cosair 1500Ti CaseLabs M10 
CPUMotherboardGraphicsRAM
Delidded i7 3770K @ 5Ghz ASUS Maximus V Gene EVGA GTX 670 SLI - Heatkiller Blocks 16GB Corsair Vengeance DDR3 @ 2400Mhz 
Hard DriveCoolingOSMonitor
Samsung 840 EVO Custom Loop - EK Supreme HF Windows 7 Pro 64-bit Dell 30" + 2 x Dell 24" 
PowerCase
Sparkle Gold 1200W CM Stacker T01 
CPUMotherboardGraphicsRAM
Phenom II X6 1055T @4.0GHz (308x13) / 3.08GHz NB ASUS Crosshair IV Formula w/EK full coverage block ATI 5870x2 Crossfired @ 950/1250 8GB Corsair Vengeance DDR3 1600 
Hard DriveCoolingOSMonitor
OCZ Vertex 3 SSD Swifttech Apogee Drive Block/Pump Windows 7 64bit Pro ASUS 27" LCD 
PowerCase
Corsair Professional Series Gold 650W  Lian-Li PC-650A 
  hide details  
Reply
Sweaty Box
(10 items)
 
Stacker T01 v5.0
(10 items)
 
Sturbin' Box
(13 items)
 
CPUMotherboardGraphicsRAM
i7 5960X ASUS Rampage V Extreme 2x Nvidia 1080ti SLI 32GB Corsair Dominator DDR4 3400Mhz 
Hard DriveCoolingOSMonitor
Samsung 850 pro NVMe M.2 Custom EK watercooled loop Windows 10 Pro Triple LG 4K 27" 
PowerCase
Cosair 1500Ti CaseLabs M10 
CPUMotherboardGraphicsRAM
Delidded i7 3770K @ 5Ghz ASUS Maximus V Gene EVGA GTX 670 SLI - Heatkiller Blocks 16GB Corsair Vengeance DDR3 @ 2400Mhz 
Hard DriveCoolingOSMonitor
Samsung 840 EVO Custom Loop - EK Supreme HF Windows 7 Pro 64-bit Dell 30" + 2 x Dell 24" 
PowerCase
Sparkle Gold 1200W CM Stacker T01 
CPUMotherboardGraphicsRAM
Phenom II X6 1055T @4.0GHz (308x13) / 3.08GHz NB ASUS Crosshair IV Formula w/EK full coverage block ATI 5870x2 Crossfired @ 950/1250 8GB Corsair Vengeance DDR3 1600 
Hard DriveCoolingOSMonitor
OCZ Vertex 3 SSD Swifttech Apogee Drive Block/Pump Windows 7 64bit Pro ASUS 27" LCD 
PowerCase
Corsair Professional Series Gold 650W  Lian-Li PC-650A 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Java throwing up weird errors... Compile fine but running doesn't happen