Click here to Skip to main content
16,011,436 members
Home / Discussions / Java
   

Java

 
AnswerRe: Construction of firewall decision diagram Pin
goWomenCS21-Mar-11 12:30
goWomenCS21-Mar-11 12:30 
QuestionEOF in BufferedReader Pin
002comp8-Jan-10 0:13
002comp8-Jan-10 0:13 
AnswerRe: EOF in BufferedReader Pin
David Skelly8-Jan-10 1:40
David Skelly8-Jan-10 1:40 
AnswerRe: EOF in BufferedReader Pin
Richard MacCutchan8-Jan-10 5:12
mveRichard MacCutchan8-Jan-10 5:12 
GeneralRe: EOF in BufferedReader Pin
002comp10-Jan-10 19:32
002comp10-Jan-10 19:32 
GeneralRe: EOF in BufferedReader Pin
Richard MacCutchan10-Jan-10 23:20
mveRichard MacCutchan10-Jan-10 23:20 
GeneralRe: EOF in BufferedReader Pin
002comp10-Jan-10 23:58
002comp10-Jan-10 23:58 
Question[Solved]Fatal Exception occured when running jar file [modified] Pin
Jordanwb7-Jan-10 3:17
Jordanwb7-Jan-10 3:17 
I'm writing a program using BlueJ. I created a jar file and set the Main class to the desired class. When I run the jar in Explorer I get an error window saying "Java Virtual Machine Launcher. Fatal Exception occured. Program will exit." I have a Main method which instantiates a class which extends JFrame. I wrapped that in a try-catch block to see if there was an error on my code. The message still appears. Is there a way to get a more verbose error?

*Edit*

Okay I ran it on my linux machine and this is the error:

jordanwb@jordanwb-laptop:/media/DEFB-0C36/PhpDesigner$ java PhpDesigner.jar
Exception in thread "main" java.lang.NoClassDefFoundError: PhpDesigner/jar
Caused by: java.lang.ClassNotFoundException: PhpDesigner.jar
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: PhpDesigner.jar.  Program will exit.


So it can't fine the class, but how do I go about fixing that? Apparently the compiler and BlueJ can find the MainWindow class but the virtual machine can't.

modified on Thursday, January 7, 2010 4:16 PM

AnswerRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 4:52
mveRichard MacCutchan7-Jan-10 4:52 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb7-Jan-10 7:16
Jordanwb7-Jan-10 7:16 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 9:01
mveRichard MacCutchan7-Jan-10 9:01 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb7-Jan-10 9:32
Jordanwb7-Jan-10 9:32 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 9:40
mveRichard MacCutchan7-Jan-10 9:40 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb7-Jan-10 9:53
Jordanwb7-Jan-10 9:53 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 10:03
mveRichard MacCutchan7-Jan-10 10:03 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb7-Jan-10 10:11
Jordanwb7-Jan-10 10:11 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan7-Jan-10 23:33
mveRichard MacCutchan7-Jan-10 23:33 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb8-Jan-10 2:49
Jordanwb8-Jan-10 2:49 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan8-Jan-10 4:31
mveRichard MacCutchan8-Jan-10 4:31 
GeneralRe: Fatal Exception occured when running jar file Pin
Jordanwb8-Jan-10 4:34
Jordanwb8-Jan-10 4:34 
GeneralRe: Fatal Exception occured when running jar file Pin
Richard MacCutchan8-Jan-10 4:56
mveRichard MacCutchan8-Jan-10 4:56 
QuestionMouseZoom Pin
002comp6-Jan-10 19:13
002comp6-Jan-10 19:13 
Questionreq coding in java Pin
thileebandr4-Jan-10 23:25
thileebandr4-Jan-10 23:25 
AnswerRe: req coding in java Pin
Richard MacCutchan4-Jan-10 23:31
mveRichard MacCutchan4-Jan-10 23:31 
QuestionSome exception Problem Pin
002comp4-Jan-10 22:27
002comp4-Jan-10 22:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.