server_crash 64 Postaholic

I JUST gave you the answer to this problem a couple of days ago. Your program works fine...Nowhere in your code do you actually run the program though..What do you expect it do output if you don't make it output.

This is the link...Don't crosspost. If you have further questions let me know, but your code DOES work fine and will output the grades if you add the output lines like I gave you.

http://daniweb.com/techtalkforums/thread27345.html

server_crash 64 Postaholic

I know what it is now. It's your browser causing the trouble. I can view my applets in IE but as soon as I try to open them in FF it gives me the same error message you are getting. I believe the browser is not using the updated version. I'm going to find out how to do get it to work and get back to you.

server_crash 64 Postaholic

Unless a lot of people that voted for Bush decide to vote independent in protest against his inaction against the destruction of civil liberties by the US suppreme court I think they'll fail a third time.

I would NOT be suprised at all if that happened.

By the way, what kind of government is in the Niederlandes? You seem to know A LOT about ours!

server_crash 64 Postaholic

I've never had cavier before, and with that price don't think I will!

server_crash 64 Postaholic

Actually she's got the popularity to beat almost anyone. The republicans are already preparing to match her if she runs..I'm thinking they will send condoleza rice. It's going to be a sad election year if all these rumors are true, but who knows, she might not even run.

server_crash 64 Postaholic
server_crash 64 Postaholic

That's why I ask you to download the latest jre, was because of backwards capability...I have 1.5 and this works one time, then the next time it won't work.

I hate to ask this because you've probably already done it, but have you downloaded jdk 1.5 and recompiled with it?

server_crash 64 Postaholic

I don't think there is a "pretty" way of doing this. You could create a flag in the servlet context object(using a session listener, i think), or you could somehow use a cookie(stupid idea).

I'm guessing the session listener would be the way to go.

server_crash 64 Postaholic

how can a half-geek find a decent gf???

haha I hear you can order women off the internet. whahahahhaha

Dang, I wish walmart had an isle of nothing but chicks for sale.

server_crash 64 Postaholic

Could someone please tell me how to hyperlink to a page? Say if I had a combobox and the user selected an item, how could I hyperlink to a page?

server_crash 64 Postaholic

You have to watch these videos. These are some of the most amazing animals I have ever seen:

http://www.holylemon.com/GeniusBird.html

http://www.holylemon.com/KarateChimp.html

http://www.holylemon.com/ElephantSoccer.html

server_crash 64 Postaholic

Well, that's still amazing. I guess if it was real time you would need more than broadband!

server_crash 64 Postaholic

That is simply amazing. Is it "real time"? I noticed a building missing in my neighborhood.

server_crash 64 Postaholic

I thought you didn't like Kaffe? Or could you not find anything else?

server_crash 64 Postaholic

How exactly are you converting to unicode? This can cause problems if you accidently mess up in the range of values.

server_crash 64 Postaholic

At first it didn't open, but I tried again and it did.
When it didn't open, I opened the java console and it gave this error message:

java.lang.UnsupportedClassVersionError: HydraSWApplet2 (Unsupported major.minor version 49.0)

	at java.lang.ClassLoader.defineClass0(Native Method)

	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)

	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

	at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:148)

	at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)

	at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)

	at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:501)

	at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)

	at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)

	at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)

	at sun.applet.AppletPanel.run(AppletPanel.java:292)

	at java.lang.Thread.run(Thread.java:536)

java.lang.UnsupportedClassVersionError: HydraSWApplet2 (Unsupported major.minor version 49.0)

	at java.lang.ClassLoader.defineClass0(Native Method)

	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)

	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

	at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:148)

	at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)

	at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)

	at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:501)

	at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)

	at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)

	at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)

	at sun.applet.AppletPanel.run(AppletPanel.java:292)

	at java.lang.Thread.run(Thread.java:536)

java.lang.UnsupportedClassVersionError: HydraSWApplet2 (Unsupported major.minor version 49.0)

	at java.lang.ClassLoader.defineClass0(Native Method)

	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)

	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

	at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:148)

	at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)

	at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)

	at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:501)

	at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)

	at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)

	at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)

	at sun.applet.AppletPanel.run(AppletPanel.java:292)

	at java.lang.Thread.run(Thread.java:536)

I would suggest updating the JRE...If that doesn't work then try reinstalling both the jdk and jre and make sure on the jdk that you at least have version 1.4.2 or higher.

server_crash 64 Postaholic

Ok, I've changed what I was doing to JList and that worked out fine. Thank you both for helping me. I'll give rep to you guys for your help.

server_crash 64 Postaholic

Your only comfort can be that it could be worse, it could be Hillary :)

:cheesy: :cheesy: :cheesy:

OHHHH NOOOO! And to think that women will probably run for president in the upcoming election....

server_crash 64 Postaholic

I don't really look like the steriotypical geek, so I have no problem in getting girls that look more than descent.

server_crash 64 Postaholic

There is one other way I know of: If you are programming on windows you can create shortcuts that have properties set(path, app name and that junk);

server_crash 64 Postaholic

I know of one way, but that still requires you to run it from the command prompt. After that, you can close the command line and it will still run:

Try the javaw command:


javaw ApplicationName

That will start the program and then you can close the command prompt withought closing the program..

server_crash 64 Postaholic

I know, I was just messing with you.

server_crash 64 Postaholic

funnay

Hmmm. Haven't heard of that characteristic yet.

server_crash 64 Postaholic

I have a "dynamic" JComboBox. What I mean by that is items are removed and added on "the fly".

The getSelectedIndex() is returning -1 when an item is selected. I looked this up and it indicates the selected item is not in the list....What in the world does that mean? The item was added to the ComboBox.

One more thing, the getItemCount() does return the correct number of items..So I don't know why I can't get the selected item or get the selected index.


So, can anyone help me with this?


By the way, I've tried adding a revalidate call but that didn't work.

server_crash 64 Postaholic

I'm guessing you took the picture in your avatar?

server_crash 64 Postaholic

He's been the senator for my state, and I know him. I cannot stand that dude. I laughed when he was getting his butt kicked during a debate up untill he became a sore loser and said something inappropriate.

server_crash 64 Postaholic

Eh where's the edit button...how'd I edit it last time ._.;;

Anyways the restart did it. Though I wonder why the java command would work while javac wouldn't...*shrug*

Sorry, looks like we posted at the same time. Some times you do need to restart your computer for changes to take affect. The java command just invokes the JRE, so no problem should arise there. Anyways, glad you got it fixed.

server_crash 64 Postaholic

I've looked up the class api and can only find one other possible method that will help: exitValue()

It returns the exit value for the subprocess, but I don't know what you could do with that.

Now, one other way to kill the process is to call the kill.exe file on your computer(if you have windows).

Runtime.getRuntime().exec("kill fileID"), where fileIDis the Process Id. You'll probably have trouble finding the process ID, so I don't know about that either.


Overall, I think this is a problem with your VB code not handling the exit right, or else you're just out of luck.

server_crash 64 Postaholic

No, it has to be one of your path variables. The reason it doesn't work is because it cannot find javac.


Anyways, I'm thinking it could be your Path variable(not the classpath since it looks correct). Please post your PATH variable. You might be pointing it to the jdk directory when you should be pointing it to the jre directory.


The path variable is located at the same place the classpath is, or you can type this at the command prompt:

echo %PATH%

server_crash 64 Postaholic

I'm not sure why that's not working, unless you have more to your classpath. If that's the case, be sure the seperate using a semi-colon(;).

The other(better) way...I really don't know much about it.
See this thread for a little help:

http://www.daniweb.com/techtalkforums/thread26307.html

I really can't help you much with that though. I'm sure Mr. Wenting would be willing to help if you ask.

server_crash 64 Postaholic

I just now saw who took that picture!(I'm a bit slow sometimes) Did you by any chance take that while you were in spain?

I like space pictures myself, but I guess you would need a telescope to take pictures of that.

server_crash 64 Postaholic

The founding fathers offered many check and balances, but people can now change the freaking constitution(how did it come to this?), and amend it to what they want. Personally, I feel the extreme power the supreme justice's posess is potential disaster.

As for crap spending, if we could have a president that could get rid of riders on bills and lobbyist, that would cut down a lot.

server_crash 64 Postaholic

try the destroy() method.

server_crash 64 Postaholic

If you do an encryption type program, you'll probably spend more time reading up on it than writing code...So you might not have much to show for your work. Once you figure out the basics there's really not much code involved unless you do some really advanced encryption scheme, which most cannot do.

You said that you had a powerful mathmatical background. Why not show that off? Come up with some tool that will solve equations of any form(very tuff). Or a tool that will aid in learning(teachers love this stuff, trust me).


Try to do something that guaratees that you will have something interesting to show. I wanted to do a webcrawler as my end of the year project and ended up studying about the stupid thing more than working on it. I didn't have hardly anything to show because it was so crappy, and wrote several other applications to make up for it.

server_crash 64 Postaholic

Put a period at the end of your classpath so that it looks like this:

.;%classpath%.;C:\Program Files\Java\jdk1.5.0_04\lib\tools.jar.

I must warn you though, recently I've learned that setting the classpath variable to tools.jar isn't the best way to do it anymore. It will still work, but it's not recommended by professionals.

server_crash 64 Postaholic

You haven't set your classpath.

server_crash 64 Postaholic

Yup. John Edwards (you know, the running mate and financier of John Kerry last year?)

I know that idiot. I'm embarrassed to say that he's from my state. What makes me hate him more, is the way he tried to recover from a terrible beating during a debate with Cheny.

server_crash 64 Postaholic

I see what your saying, but creating software for each individual would take more time than it's worth, and not bring in the profit like massing one program on the market.


Why not create your own software? I do, and only things you choose are part of the program.

server_crash 64 Postaholic

Well, you do have options. No one forces you to use Microsoft Word Perfect over Notepad. You can only do so much with software built for users looking for something simple. Complex software offers a wide range of flexibilty and use. The more complex the task, the more complex the tool must be(in some cases!).

Take creating a graphical picture, one of great quality for example:
Would you want to do this in paint just because it's simpler?
Or would you rather use something like photoshop to get the job done?


I guess it's a matter of what your doing and the like. I'm sure you can find tools that are more simplistic than others if you desire so.

server_crash 64 Postaholic

You don't have a "main" method to even run the program? Once you do, your program will work fine(I've already tried it).

Add this method to your code:

public static void main(String[] args)
{
 	Student s = new Student();
	s.inputGrades();
	System.out.println("Average --> " + s.getAverage());
	System.out.println("Letter grade --> " + s.letterGrade());
	System.out.println("s.toString() --> " + s.toString());
	
}

Remember that you MUST call those methods, they won't run themselves.

server_crash 64 Postaholic

That was my problem in thinking about this. I couldn't see where the JVM would come in to play, which I know it must.

server_crash 64 Postaholic

Yep, the lawyers REALLY rip people off. Most people cannot afford them, so they say: "Hey, don't worry about paying me right now, but if we win, I get 50%". I think I saw on a television show about this crap a while back, and one lawyer made 900 million a YEAR...All from getting 50% of the wins and from stupid lawsuits.

server_crash 64 Postaholic

Damn shame we don't have a fair bit more of its elements here in Australia. We did once, and enjoyed one of the best infrastructures in the developed world, back before short-sighted dickheads in office sold off pretty much all of it to private enterprise!

If you don't mind me asking, what exactly do you like about socialism? I don't know too much about it, so please explain.

server_crash 64 Postaholic

Where have you been?

server_crash 64 Postaholic

You can't write an OS purely in Java. I've even heard you can't do it in c/c++ either...But don't know if that's true or not.

server_crash 64 Postaholic

By the way, I don't understand the Stage part either. Unless you are extending a class that takes a Stage as an argument, you don't need that...It does look pretty useless though.

server_crash 64 Postaholic

Try using "getters" and "setteres":

public class Block
{
       private int[][] where;
       
       public Block(Stage s)
       {
              super(s);
              fillArray(4,4);
       }
 
       public void fillArray(int firstIndex, int secondIndex)
       {
                  where = new int[firstIndex][secondIndex];
                  int x = 0; 
                  for (int i=0; i<firstIndex; i++)
                  {
                          for (int j=0; j<secondIndex; j++)
                          {
                                  where[i][j] = x;
                                  x++;
                          }
                 }
       } 

      [B] public int getElement(int firstIndex, int secondIndex)
       {
               return where[firstIndex][secondIndex];
       }[/B]
}


------Main Class-----------

public class Test
{
        public static void main(String[] args)
        {
                 Block b = new Block(StageName);
                 System.out.println(b.getElement(0,2));
        }
}
server_crash 64 Postaholic

The part I'm not sure about is how the tax works. Is it a yearly tax that should be entered, or is it a percentile that is added to the principle each month(or year)?

server_crash 64 Postaholic

That's excellent! Leave it just like it is now. You've got the perfect colors picked as of now.

server_crash 64 Postaholic

How do you actually implement the code on a bare bones system? I mean, will the code run from a cd and know everything to do from there?