Java School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a Java Expert!

Join 306,830 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,740 people online right now. Registration is fast and FREE... Join Now!




Help for a beginer

 

Help for a beginer

jaw

29 Apr, 2009 - 08:44 AM
Post #1

New D.I.C Head
*

Joined: 14 Apr, 2009
Posts: 13


My Contributions
Hello i am new to java (realitively new to programing in general). I use textpad for my java programs. how do i compile and save the class file? i can compile it inside textpad but do not know how to make a class file.




User is offlineProfile CardPM
+Quote Post


jaw

RE: Help For A Beginer

29 Apr, 2009 - 08:44 AM
Post #2

New D.I.C Head
*

Joined: 14 Apr, 2009
Posts: 13


My Contributions
Hello i am new to java (realitively new to programing in general). I use textpad for my java programs. how do i compile and save the class file? i can compile it inside textpad but do not know how to make a class file.



User is offlineProfile CardPM
+Quote Post

samuraitux

RE: Help For A Beginer

29 Apr, 2009 - 09:14 AM
Post #3

New D.I.C Head
Group Icon

Joined: 29 Apr, 2009
Posts: 21


Dream Kudos: 25
My Contributions
Hi Jaw. Well to compile the program you will run the following on any system.
CODE

javac <your app>.java


and to run the application use
CODE

java <your app>


do not put the .class or you will get a runtime error.
User is offlineProfile CardPM
+Quote Post

Locke

RE: Help For A Beginer

29 Apr, 2009 - 09:21 AM
Post #4

Treasure Hunter
Group Icon

Joined: 20 Mar, 2008
Posts: 4,020



Thanked: 299 times
Dream Kudos: 325
Expert In: Java

My Contributions
Compiling it should make a .class file.
User is offlineProfile CardPM
+Quote Post

trtherrien

RE: Help For A Beginer

29 Apr, 2009 - 09:28 AM
Post #5

New D.I.C Head
*

Joined: 17 Apr, 2009
Posts: 11



Thanked: 1 times
My Contributions
QUOTE(Locke @ 29 Apr, 2009 - 09:21 AM) *

Compiling it should make a .class file.


I am not sure about the tool you are using, but normally it will end up in some sort of build folder. If you run javac from the command-line it will be in the same folder as the .java file. Also, the file tends to end up in a subdirectory based on the package name.

So:
CODE

package com.some.package


Will end up in:
build\com\some\package\something.class

Hope this helps.
User is offlineProfile CardPM
+Quote Post

pbl

RE: Help For A Beginer

29 Apr, 2009 - 03:11 PM
Post #6

Java Lover
Group Icon

Joined: 6 Mar, 2008
Posts: 9,962



Thanked: 1187 times
Dream Kudos: 450
My Contributions
Duplicate topics merged
Please avoid double posting
User is online!Profile CardPM
+Quote Post

jaw

RE: Help For A Beginer

13 May, 2009 - 08:27 AM
Post #7

New D.I.C Head
*

Joined: 14 Apr, 2009
Posts: 13


My Contributions
so how do i turn a .java file into a class file?
User is offlineProfile CardPM
+Quote Post

trtherrien

RE: Help For A Beginer

13 May, 2009 - 09:14 AM
Post #8

New D.I.C Head
*

Joined: 17 Apr, 2009
Posts: 11



Thanked: 1 times
My Contributions
QUOTE(jaw @ 13 May, 2009 - 08:27 AM) *

so how do i turn a .java file into a class file?


Basically, just run the javac command.

CODE

javac <filename>

example:
javac c:\hello\helloworld.java


User is offlineProfile CardPM
+Quote Post

jaw

RE: Help For A Beginer

20 May, 2009 - 08:23 AM
Post #9

New D.I.C Head
*

Joined: 14 Apr, 2009
Posts: 13


My Contributions
on the comand line?
User is offlineProfile CardPM
+Quote Post

Ed_Bighead

RE: Help For A Beginer

20 May, 2009 - 08:47 AM
Post #10

D.I.C Head
Group Icon

Joined: 26 Apr, 2009
Posts: 166



Thanked: 14 times
Dream Kudos: 50
My Contributions
Yep, granted you have the necessary Java files installed on your computer (JDK)
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/20/09 10:45PM

Live Java Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month