Your Ad Here Your Ad Here
Results 1 to 10 of 10

Thread: Java

  1. #1
    numba1xclusive's Avatar Xclusive Gangsta
    Join Date
    Jan 2004
    Posts
    208
    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

  2. Software & Hardware   -   #2
    4play's Avatar knob jockey
    Join Date
    Jan 2003
    Location
    London
    Age
    35
    Posts
    5,530
    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.

  3. Software & Hardware   -   #3
    numba1xclusive's Avatar Xclusive Gangsta
    Join Date
    Jan 2004
    Posts
    208
    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

  4. Software & Hardware   -   #4
    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.

  5. Software & Hardware   -   #5
    numba1xclusive's Avatar Xclusive Gangsta
    Join Date
    Jan 2004
    Posts
    208
    We're doing Applications. So applets are out of the question.lol

    Da Numba1Xclusive King

  6. Software & Hardware   -   #6
    Quote Originally Posted by numba1xclusive
    Wait, I already have the SDK, so how do I run it through that?
    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:

    javac MyClass.java
    If you then want to run a class called MyClass.class

    java MyClass
    no .class on the end

  7. Software & Hardware   -   #7
    numba1xclusive's Avatar Xclusive Gangsta
    Join Date
    Jan 2004
    Posts
    208
    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

  8. Software & Hardware   -   #8
    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.

  9. Software & Hardware   -   #9
    numba1xclusive's Avatar Xclusive Gangsta
    Join Date
    Jan 2004
    Posts
    208
    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

  10. Software & Hardware   -   #10
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •