What can i do with java?

Status
Not open for further replies.

gohand

In Runtime
Messages
151
i first learned php by myself was intended to create forums and dynamic sites. And now, finally after a year of studying java in my high school class, it disappoints me; I don't see any point of doing java. when i had no goal it's hard for me to keep on. All they taught in class are the concepts and the way how to program and do the project, there's never been any practical use of it. We are using Jcreator and the jdk kit to run the codes. here is some question i've posted but no one answer: we use jcreator with the jdk kit; after compilation there well be a .class file produced, but how can i use it?? if i just take the .class for example it's a game, and will i be able to take it to my friend's house and run it?? I just thought that the worse thing able java was that it had this restriction(it seems to me it only can run while you PRESS the compile buttom from Jcreator, and no other way else) but obviously i am wrong.
 
You have to learn to package before you can do binary distributation.. there are plenty of online tutorial that help you do it, so i won't elaborate..

try some other language if you feel your time is wasted.. i feel learning java for two years is two years wasted, they put wayy too much restriction in the name of safety, that's complete bs.. everything to make a programmer's life easier.. if your not smart enough to protect yourself, don't program..
 
To make a java program executable by double-clicking (on system's where you can open programs that way) you have to put all the .class files into a .jar file together with a manifest file stating where the main method. The java documentaion (available for download from Sun's java site) explains how to make a manifest and .jar file

Obviously it will still only run if the machine has a JVM installed. Less obviously, if you use features from a version of Java that is later than the installed JVM you will get unpredictable results. The Java documentation lists the version in which each feature first was released.
 
there must be some benefit of java, while people some people using it instead of C++ they said it's cross plat form but honestly, i really see very few pratical programs are programed using java. Because of the disadventage of java, it made me wanted to learn C++ but i don't know where to start since it's different then java that had a unique compiler from sun, it seem to me that many good C++ compiler are not free, like visual C++ can someone let me know some standerdize tool for learning and get start with C? And i really want do know how to make .jar file and to use the adventage of java, would you please show me more specific of how to do it?

btw, how can i learn how to package? well it take so long to learn? i suppose not, can you show me? thx a lot for ur reply!
 
.NET will be cross platform, eventually....

I suggest you learn one of the .NET CLR-compatible languages... Visual C#, Visual C++, etc.

The best way to learn it is to find a book on the subject. I've always like the Microsoft Press books.
 
i've got like 5 or 6 c++ books they include deitel how to program in c++ second edition, effective c++, c++ in nt invironment, also the training cd of mastering asp.net--programming in visual C#.net etc. etc. it maybe enough source, i just want to find some alternate standardize compiler(if possible) so to make a transaction from my previous knowledge to this. Can you show me what's difference between those you've mentioned? .net visual c# and visual c++? because i got confused with those many versions sometimes
 
All the .NET languages compile to the same intermediate language. They are also mostly similar in terms of code.

Go on MSDN and look at some classes and the examples are given in C++, C#, J#, etc. They are very similar languages at this point, with all the .NET enhancements.
 
I've got some time on my hands, so be prepared for a rant:

Java has two main advantages: it's cross-platform and has an extremely elegant interface. I'll elaborate.

Java will work on any platform for which a JVM exists. This functionality is not really used on full-featured computers; as previous posters have pointed out, you will not found many practical Java application for use on a PC or Mac. There's a reason for this. These are mature and full-featured sytems with their own ways for devloping for them and using a completely new technology would not work well; as well as all old apps becoming useless the technology would become tied to Java.

But for low-cost consumer electronics, many of which go through several designs in a short time using a consistent interface is ideal. And Java is indeed used here. Look into any cellphone that offers fairly sophisticated apps and you'll find it's powered by Java.

The fact that Java works on regular computers is an advantage here too. You can learn Java from the comfort of your own machine, and then, with hardly any adaptation, use your skills on programming digital devices. What's more, you can develop and test these apps on a PC and then simply transfer them to the device.

(Obviously it's not all like that. Some Java features work differently in different implementations. But the Java documentation will always let you know if that's the case. And profiling - checking that the app is not overusing resources - obviously has to be done on the target device.)

The second feature of Java is its clean interface. Java is more than just a language. It provides an immense array of classes which you can use to build (literally) an application. These classes are organised in an extremely organised and orthogonal manner, and present an easy yet useful to the user. Try creating a window using the Windows API, and you'll appreciate what I mean.

There's more, but this an area in which I'm not talking from experience. That's servers. Java has (this I know) an extremely advanced yet easy-to-use (like most of Java) remote and security architecture. Apparently its used a lot in the server world. But find out more about this.

So what's the downside. Well, Java programming can take some getting used to. Don't be fooled by its similarity to C/++; if you're coming from C/++ ther are a lot of tricks you'll have to unlearn. Java insists on one way of doing almost everything. The fact that everything must be a class is one example.

Another one is control. The way Java manages to simplify all these programming tasks while still allowing to do serious programming is by taking away control. In C/++ you can follow every memory reference in your program if you so wish. Java just says: tell us what you want to and we'll do it.

For these reasons some people get fairly apoplectic about Java. Ignore them. Programming is not a religion. If Java is good for what you want, use it. If C++ is more to the point use that. If sometimes this is good and sometimes that, use each as appropriate.

You mentioned that you spent a long time learning the concepts of Java programming. That wasn't time wasted. I know many people who can write an app in Java that works but are wasting Java's powerful (if limiting) capabilities. Java is a technology; not just a language. I do agree, though, that after it's time to stop learning and start programming. You can pick up the language itself in weeks.

Finally, get the documentation. It will be your best freind as you program in Java. It is one of the most well-written documentations for any technology and, because it comes from Sun, is guaranteed to be accurate. And... it's absolutely free.
 
thx a lot ever_thus(for your time) i've read your knowledgeable post. I truly agree that you can go through the language in a week, cause after i learned php, i almost can scored all exams above 90 without any studying(i've never touched the book in that year, not in AP tho), but it's harrable to learn the object astraction at a point without something i wanted to accompish with it. which is why i wanted so much to understand what I'm doing here in my class. If i have a goal(or a task that i wanted so much to acomplish) it'll sorten my time for leaning something as much as 10 times or more! I know what you mean of the "java in cell phone" i've played games that were powered by java in a cell phone, and much more. just that for now it don't seem to be a language that is so practical that can arouse my passion like php in a way. But of course i'm going to finish the AP course no matter what. I still not sure how to package the "java byte code" as infered from my AP book, tho, i do get the idea of what java is used for. btw, you'r so knowledgeable that i really had much more to learn from you:))I'm from NY too. If possible I really wish i could contact you through instant messanger or the like. One more question if you said it's absolutely free, do you include those features for enterprise, and the package feature, I don't even know how to simply use the interpreter that the jdk kit provide to run the .class file :) sorry for my poor enlgish.
 
Status
Not open for further replies.
Back
Top Bottom