Hari Mohanan

Greenhorn
+ Follow
since Jun 30, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hari Mohanan

hello there to fellow java developers. I have developed a simple text editor which edits ".txt" files. Now I want help from the veterans in improvising the code or adding few beneficial features. You can check it out here:

http://sourceforge.net/projects/hivemindtexted/

Its nothing to brag about, but i am really a beginner. Suggestions are welcome at:

hariwonderful@aol.in

Thanks!
13 years ago
Thanks a lot for clearing my doubt, but can you tell me how to pass the reference?
13 years ago
what i am trying to say it, can i use the same JFrame (frame) as common for both the classes without defining a new one..
13 years ago
I am a beginner in java. So I have a small doubt....compare these two classes:

Marks Analysis class



Marks Pages class




Now my doubt is, if I inherit MarkPages from MarkAnalysis, can I modify the values of the JFrame 'frame'? That is, the components in the previous class will not be used, instead I only give a new form to the existing JFrame 'frame'. According to my knowledge, 'frame' is an object of class JFrame. So can an object's state be inherited? (Sorry for using confusing sentences, i am a newbie)
13 years ago
Guys!!! I made a very very silly mistake!!!

The part i went wrong in was executing it as :


java Test.class



The .class part was not necessary. I just had to write java Test, and voila I got an 800*600 window!

Thanks a lot...You guys gave me the best help. I'll keep troubling you guys though, cause i am still a novice.

Thanks again.
13 years ago

Ulf Dittmer wrote:Try compiling both in one go: "javac *.java". That will compile all Java files in the current directory.



It worked: i compiled it together

But the trouble is at execution time now----



C:\Documents and Settings\Mohan>java Test.class
Exception in thread "main" java.lang.NoClassDefFoundError: Test/class
Caused by: java.lang.ClassNotFoundException: Test.class
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Test.class. Program will exit.

C:\Documents and Settings\Mohan>

13 years ago
The files are in the same folder. I have tried this before while i was coding a calculator program. There was no problem then. The only change I made was install the newer version of java sdk.
13 years ago
hey guys, i am a newbie in java. While compiling this code(which i wrote to test whether swing's JFrame was working or not so as to add more components) I encountered an error:

Here's the code:
Test class code


MarkAnalysis class code


The error message was :


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Mohan>javac Test.java
Test.java:5: cannot find symbol
symbol : class MarkAnalysis
location: class Test
MarkAnalysis marks = new MarkAnalysis() ;
^
Test.java:5: cannot find symbol
symbol : class MarkAnalysis
location: class Test
MarkAnalysis marks = new MarkAnalysis() ;
^
2 errors

C:\Documents and Settings\Mohan>



Please help me. I am using Windows XP.
13 years ago