Results 1 to 12 of 12
Thread: Java Questions...
- 09-19-2008, 04:38 AM #1
Member
- Join Date
- Sep 2008
- Posts
- 5
- Rep Power
- 0
Java Questions...
1.)
I have a Windows XP and Linux[Kubuntu 8.04]
Java won't install on Kubuntu and I have no idea how to install it.
I looked up some tutorials, I found some, installed Java, but it doesn't work.
Is it that KDE sucks, or me? :eek:
Will Ubuntu/Gnome work better?
Well on the Windows XP it works, anyway...
2.)
Also, I'm wondering if Java is right for me.
I want to make games and applications... [GUI Programming]
Java applets look good but they are in HTML code...
I don't want my applet on the website,
I want it to be downloaded and played.
Example) - I downloaded the exe and I'm ready to play!
Or is it somehow possible to have it on the website,
but all the data is stored on the user's computer?
3.)
One last question...
I need good beginner tutorials and stuff that can get me started.
I want a tutorial that teaches gets me to an Intermediate Java Programmer,
and teaches me about apples, creating software, creating games, etc...
Or you can just give me a link to a few tutorials...
Ebooks are cool too!
[Not really any good programming experience... ]
Any help appreciated!!!
~ Xarver :)
-
1. I've no experience with Java and Ubuntu other than I've seen Ubuntu folks on the forums talking about their java programs.
2. No exes are made with standard Java, but you don't want exes which are limited to one os. Jars are easy to make in Java and will fill the role that you are looking for.
3. The best java tutorial is free: the Sun Java Tutorials
- 09-19-2008, 05:08 AM #3
Member
- Join Date
- Sep 2008
- Posts
- 8
- Rep Power
- 0
I don't know the answer to #1..
but;
#2; you'll want to make them into JAR files.. I know a lot of IDE's basically do this for you. I don't know which ones, or how.. but I'm sure google has all more than enough answers.
#3; I haven't gone through 'Sun's' Java tutorials.. but I bought this book called "Head First Java" published by O'Reilly.. everyone swears by this publisher, and the book. I've only gotten into two chapters.. but it already seems a lot less boring than the books I've had to purchase for my Computer Science Java programming classes!
=)
may you have better luck in learning java than myself! =P
- 09-19-2008, 05:09 AM #4
Member
- Join Date
- Sep 2008
- Posts
- 5
- Rep Power
- 0
I have a question about all the filetypes.
A .java file I'm guessing is the source
A .class is the executable?
A .jar file contains files and runs as an executable?
Can I double click a .class file and run it?
Can I double click a .jar file and run it?
:confused:
- 09-19-2008, 05:28 AM #5
Member
- Join Date
- Sep 2008
- Posts
- 8
- Rep Power
- 0
A .java file is the source. This is what you compile to get the .class file.
From what I understand, I think the .class is just 'Java speak' .. it's what the compiler turns your code into so that the JVM can read it and execute it when run it. From my journeys, I haven't been able to double click the .class file and run it. It just opens a text file. You have to go to the CMD prompt and actually run the name of the file.
And you are correct on the .jar. It holds the files and runs the program from the JVM.
Someone correct me if I'm wrong on any of these. =)
-
- 09-19-2008, 10:35 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
*.java is the source file, as you said. It's the file extension which you have to use in files that write your application. You can write a simple java code in word pad, text file and so on. Then simple change the file extension to java.
*.class file the byte code, or machine code, or the binary file. So it contain streams of binary value. You can see/read in simply. If you open it on notepad you can see some annoying characters. Your PC can't directly understand the java source code. So you have to convert it to binary file, that is the *.class file. JVM do it for you by compilation.
*.jar file, yes, in simple word I can say that it can execute by double click. But actually you have to do few things. *.jar is the distribution package use in Java.
- 09-19-2008, 11:37 PM #8
Member
- Join Date
- Sep 2008
- Posts
- 5
- Rep Power
- 0
Thanks everyone, that really helped!
Can anyone tell me how to make a JAR file? :)
- 09-20-2008, 12:17 AM #9
To make a jar file, use the jar command. It's documented in Sun's JDK doc. There are probably examples you could search for here on the forum.
- 09-20-2008, 01:10 AM #10
Member
- Join Date
- Sep 2008
- Posts
- 5
- Rep Power
- 0
I made one :)
The only probably is I don't see the output,
any easy way to make it pause?
- 09-20-2008, 03:06 AM #11
Make what pause? What output? Are you getting an error message when you open the jar file by double clicking on it? On windows, open a command prompt, cd to the directory with the jar file and enter:
java -jar <jarname>
If you want to see the contents, a jar file can be read by WinZip on Windows. Not sure what utility program works on Linux. Try renaming the jar file to .zip and opening it.
- 09-20-2008, 05:37 AM #12
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
Few Questions about java
By Grom in forum NetBeansReplies: 11Last Post: 09-13-2008, 02:26 PM -
2 simple java questions
By jimJohnson in forum New To JavaReplies: 2Last Post: 02-02-2008, 09:35 AM -
www.javaadvice.com - The one stop resource for all your Java questions and answers
By JAdmin in forum Reviews / AdvertisingReplies: 0Last Post: 01-24-2008, 07:53 PM -
few java questions
By hiaslpix in forum New To JavaReplies: 4Last Post: 01-01-2008, 05:47 AM -
A few questions about Java and design
By ldb88 in forum New To JavaReplies: 4Last Post: 12-07-2007, 12:51 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks