Hey just a weird question. I'm in Comp Sci at school, and we basicalyl do Java stuff. How do I run my prgms I make at school at home. I have the JRE 1.42, but I dont know how to run it. Any help?
Hey just a weird question. I'm in Comp Sci at school, and we basicalyl do Java stuff. How do I run my prgms I make at school at home. I have the JRE 1.42, but I dont know how to run it. Any help?
Da Numba1Xclusive King
http://java.sun.com/j2se/1.4.2/install-windows.html
you have to install java then compile it to byte code then run it through the java virtual machine.
it means its cross machine compatible but it can take a big performace hit which really sucks sometimes.
Wait, I already have the SDK, so how do I run it through that?
Last edited by numba1xclusive; 03-11-2005 at 12:43 AM.
Da Numba1Xclusive King
If you make an applet it'll run in a browser.
But you're probably not onto applets yet. If you want them to run a class they'll need to have the JRE as well.
We're doing Applications. So applets are out of the question.lol
Da Numba1Xclusive King
If you don't have your classpath set up for it yet, go to the /bin directory of the Java install and copy your source files there. If you've got a file called MyClass.java that you want to compile:Originally Posted by numba1xclusive
If you then want to run a class called MyClass.classjavac MyClass.java
no .class on the endjava MyClass
Ok I got that working. But I still dont get how to configure classpaths. Like, it says to say the args, but when I do something like, "java classpaths
or some crap like that, it doesnt work.
Da Numba1Xclusive King
Your classpath's an environment variable. It's set through the windows control panel.
[EDIT: More info:
Go to Control Panel > System > 'Advanced' tab > Environment Variables
Under System Variables, if CLASSPATH isn't there already, click the 'new' button, put CLASSPATH as the variable name and wherever you'll be putting your classes as the value.
Also, modify your path variable to put in the location of the /bin folder of your Java install]
Last edited by Rick Phlegm; 03-11-2005 at 02:50 AM.
Ok I figured how to run it. Is there an easier way than doing all the command line stuff? Like I can use DOS and stuff, but Its a pain in the ass to continously do the typing. Is there like a Easy Button, where u just specify which class u want to run and then run it?
Da Numba1Xclusive King
u can also get JCreator, quite a good program that compiles and runs Java codes (be it applet or application)
http://www.jcreator.com/ have fun with java
gildan2020
Please be kind to the noobs...we were once them after all
Bookmarks