Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › [SOLVED] More NetBeans (maybe Java maybe browser?) Problems
New Posts  All Forums:Forum Nav:

[SOLVED] More NetBeans (maybe Java maybe browser?) Problems

post #1 of 3
Thread Starter 
So the one thing I've learned up to this point is that I am not a programmer, but this is my last workshop for class so I'm almost done. We're currently working on Applets/Java Web Start, and I'm terribly confused...I cannot, for the life of me, understand how to get this JApplet stuff to work...I copied the code out of the book, line by line exactly, and am running into errors, so not sure if it's the code, if it's pathing, or if it's just something simple with netbeans that I don't know about...my "fellow cohort members" have been unable to assist, and OCN has helped me out every single time, so this is the last go-round for me with Java below the error i'm receiving...

When I try to run the XHTML file in a web browser...
Code:
load: class AdditionApplet.class not found.
java.lang.ClassNotFoundException: AdditionApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: AdditionApplet.class
When I try to simply run the program, and not compile, it tells me that I don't have a main class. So I understand that, I don't think these files are meant to run in NetBeans necessarily but are supposed to create an applet in a web browser...

::edit:: Alright, so i fixed the issue with NetBeans compiling, stupid typing mistake on my part...but now, even though NetBeans compiles the code without issue and there is a AdditionApplet.class file, I am still receiving the above error when I try to execute the HTML/XHTML file in any brower (tried IE, FF, and Chrome), making sure I closed out the brower every single time and cleared the cache to make sure "bad code" wasn't stored in there...
Edited by b3machi7ke - 7/25/11 at 5:54am
First Time Build
(20 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 920 MSI X58 Pro-E (MS-7522) EVGA GeForce GTX 460 EVGA GeForce GTX 460 
GraphicsRAMRAMRAM
Galaxy GeForce GTX 460 Corsair  Corsair  Corsair  
Hard DriveOptical DriveCoolingOS
Seagate Barracuda 7200.12 Sony DVD+-RW Noctua NH-D14 Windows 7 64bit 
MonitorMonitorKeyboardPower
Acer P215H Acer P221W Dynex Silverstone OP1000-E 1kW PSU 
CaseMouseMouse PadAudio
Cooler Master HAF 932 Dynex Dynex ASUS Xonar DG 
  hide details  
Reply
First Time Build
(20 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 920 MSI X58 Pro-E (MS-7522) EVGA GeForce GTX 460 EVGA GeForce GTX 460 
GraphicsRAMRAMRAM
Galaxy GeForce GTX 460 Corsair  Corsair  Corsair  
Hard DriveOptical DriveCoolingOS
Seagate Barracuda 7200.12 Sony DVD+-RW Noctua NH-D14 Windows 7 64bit 
MonitorMonitorKeyboardPower
Acer P215H Acer P221W Dynex Silverstone OP1000-E 1kW PSU 
CaseMouseMouse PadAudio
Cooler Master HAF 932 Dynex Dynex ASUS Xonar DG 
  hide details  
Reply
post #2 of 3
load: class AdditionApplet.class not found

This is the key part, you need to narrow it down more to why it isn't being found. Is is spelt correctly with correct punctuation? That would be my first check, the next check would be that it is some place it can be accessed from and so forth.
Core Power!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9450 @ 3.2Ghz Maximus Extreme Gainward 'Golden Sample' 4850 740/1100 2x 2Gb || PC3-10666 OCZ Gold 
Hard DriveOSMonitorPower
80Gb Seagate Windows 7 19" Ace Widescreen Seasonic 500W 
CaseMouse
Armor LCS Habu 
  hide details  
Reply
Core Power!
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q9450 @ 3.2Ghz Maximus Extreme Gainward 'Golden Sample' 4850 740/1100 2x 2Gb || PC3-10666 OCZ Gold 
Hard DriveOSMonitorPower
80Gb Seagate Windows 7 19" Ace Widescreen Seasonic 500W 
CaseMouse
Armor LCS Habu 
  hide details  
Reply
post #3 of 3
Thread Starter 
Quote:
Originally Posted by Mebby View Post
load: class AdditionApplet.class not found

This is the key part, you need to narrow it down more to why it isn't being found. Is is spelt correctly with correct punctuation? That would be my first check, the next check would be that it is some place it can be accessed from and so forth.
yeah, i'm not sure why...i went through and double checked EVERYTHING, nothing was spelled wrong and everything was in the same directory...I accidentally commented out the package this program was in and compiled it, and it worked... I have no idea, but doing this worked, it seemed like it couldn't be in the package when it compiled in order for it to work?? I tried this on three different problems, and everytime I took out the package that netbeans defaulted it to, I could run the applet in the web browser, and everytime the package was left in there the browser would generate the above error...i don't know the why or how of it, but that seems to have fixed the problem...
First Time Build
(20 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 920 MSI X58 Pro-E (MS-7522) EVGA GeForce GTX 460 EVGA GeForce GTX 460 
GraphicsRAMRAMRAM
Galaxy GeForce GTX 460 Corsair  Corsair  Corsair  
Hard DriveOptical DriveCoolingOS
Seagate Barracuda 7200.12 Sony DVD+-RW Noctua NH-D14 Windows 7 64bit 
MonitorMonitorKeyboardPower
Acer P215H Acer P221W Dynex Silverstone OP1000-E 1kW PSU 
CaseMouseMouse PadAudio
Cooler Master HAF 932 Dynex Dynex ASUS Xonar DG 
  hide details  
Reply
First Time Build
(20 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i7 920 MSI X58 Pro-E (MS-7522) EVGA GeForce GTX 460 EVGA GeForce GTX 460 
GraphicsRAMRAMRAM
Galaxy GeForce GTX 460 Corsair  Corsair  Corsair  
Hard DriveOptical DriveCoolingOS
Seagate Barracuda 7200.12 Sony DVD+-RW Noctua NH-D14 Windows 7 64bit 
MonitorMonitorKeyboardPower
Acer P215H Acer P221W Dynex Silverstone OP1000-E 1kW PSU 
CaseMouseMouse PadAudio
Cooler Master HAF 932 Dynex Dynex ASUS Xonar DG 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › [SOLVED] More NetBeans (maybe Java maybe browser?) Problems