Convert Javase to javame [duplicate] - java

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Porting Java SE Game to Java ME
i write a a game with swing and java socket as my this semester java project at school ..our instructor said us that if you can write this code for mobiles i will give you extra points!now i dont know anything about j2me and i should write this extra project until next 2 week and i don't know anything about j2me!(but i am strong at aspects of j2se very good).my question is converting code from swing and socket in j2se to j2me is very hard in other word can i do that in 2 week?
can you say me some good tourial about that?
thanks alot

Well ive had the same dilema before, i have a program on my computer that would be great as a mobile app but i thought it would take forever, but really theres not a lot of difference between the 2. They are both still java except android uses some XML to do layouts, which is very easy to do by the way. How long will it take you might ask? well it all depends on the app, if its a really complex app then it could take longer than 2 weeks, if its a simple app you could finish it by yourself in less than 1 week. If i was you i would go the extra mile and at least try it. Android is a very powerful tool and it is very easy to use if you know Object Oriented Programming well. Good Object Oriented Programming skills will make transferring your app a piece of cake. If you need any help at all with the conversion let me know but i think these tutorials should explain a lot to you:
http://developer.android.com/guide/basics/what-is-android.html
http://developer.android.com/resources/tutorials/hello-world.html
http://developer.android.com/resources/browser.html?tag=sample (These are sample apps)
And you'll need to download eclipse and install a plugin. All of the information on how to install everything can be found here:
http://developer.android.com/sdk/index.html
And heres the Eclipse Website where you can download the correct version:
http://www.eclipse.org/downloads/packages/eclipse-classic-37/indigor
If you need any help whatsoever, send me an E-Mail and ill help you with whatever you need! Hope this helped!

Related

Can I use Java for building cross-platform mobile apps? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have read an article about Xamarin was buying RoboVM and enables developers to write mobile apps in Java for cross-platform. I am not sure if it is possible now to use Java for developing cross-platform mobile apps. Is there any reliable tools where I can write in Java for cross-platform mobile apps development? Is it a good choice to choose Java only for potential cross-platform mobile apps? I don't consider using C, C++, C# for that purpose since I have never been focusing on one of them. I apologize for the fans of those langauges. Or Is it a better choice that I better work with Java for Android apps and Swift for iOS apps? I plan to choose Java as a main language for all web apps, cross-platform mobile apps and robotic programming development.
I've been using Codename One for quite a while now. Libgdx wasn't exactly an option as I'm not a game developer.
I played a bit with RoboVM before picking Codename One and it seems that it's more about Java for iOS and not about WORA (Write Once Run Anywhere). This might be a good choice for you if that's what you want but I prefer WORA. I tried the RoboVM FX bindings and they were just horribly broken in basic ways.
A few things I love about Codename One are:
Support - I have never used a product with such amazing free support. You get answers within a day at the latest and that really sealed the deal for me.
No need for a Mac - I use my Mac at home but in the office I need a PC.
Customization and familiarity - this is pretty much Swing but WAY better. Like we always wanted Swing to be as they put it...
The docs used to suck but they made a big push on it and it shows. Now if only they could fix the IntelliJ/IDEA plugin to the level of the NetBeans plugin I'd be golden!
Depending on what you're trying to write, libgdx might be a good solution.
You write your code once in java and it compiles to basically everything (even html5!)
You have to adhere to its coding conventions and use it's classes though. (Which are great for game development, not so much for other things... but you could still probably do whatever you want with it).
As far as I know they are not compatible with Java, but they claim that if you know Java you'll be fine with C#.
I found few interesting weird facts on their website about the transition... source
In Java, you can pass parameters only by value, while in C# you can pass by reference as well as by value. (C# provides the ref and out keywords for passing parameters by reference; there is no equivalent to these in Java).
In a Java switch statement, code can fall through into the next case section, but in C# the end of every switch section must terminate the switch (the end of each section must close with a break statement).
....

Eclipse RCP 4 vs NetBeans Platform 8 today: what to choose?

I'm about to start a fairly big application for my company, and since it HAS to be cross platform, we're pointing towards Java (would have loved C#, but explored the Xamarin ecosystem and the Mac part seems to be quite behind the rest package...)
Now, I'm evaluating both Netbeans 8 and Eclipse 4 as RCP. Before I continue I have to say that I've been maintaining for almost a year our previous software which was written in Netbeans Platform, but it has so many performance issues and so many bugs (some of which, it seems, tied to the platform itself -- i.e. plugins not updating with no apparen reason) that both me and my company kinda lost faith in Netbeans Platform, but on the other side I can't seem to figure out a good way to start digging in Eclipse RCP. Of course, mantaining that software means that I'm already experienced in Netbeans Platform, while I'm at "Hello World" level with Eclipse RCP.
On top of that, I guess I'm going to use JavaFX 8, which I have to learn as well, since it seems it's the new de facto standard in Java GUI.
Basically my software should handle a (local, SQLite or JavaDB or similar) database of customers, with various data to be sent via Ethernet to other devices.
So, has anyone experiences with one or the other? And, if someone's into Eclipse, could gift me with some updated tutorials for Eclipse 4 RCP before I start buying books?
Thanks anyone.
Depends on your choice of UI toolkit, eclipse is SWT and netbeans is pure swing, therefore pure java. I have not worked with eclipse, but I have been doing Netbeans plugins for nearly three years. Netbeans modular programming is pure pleasure like no other I know.
Which Rich Client Platform to use
JSR 296 has been postponed to Java 9 after being postponed from java 7 to Java 8. So I wouldn't wait on that. Spring RCP is dead long time ago. The author of the above post seems to have preconceived notions about Netbeans RCP's approach.
Netbeans has already implemented both JSR 296 & JSR 277 long time ago and their implementation is time tested, nearly 15 years now.
At the end of the day, it boils down to what you are trying to do. But Netbeans RCP is a great tool and is used by many customers. FedEx and US airforce are the ones that come to my mind.
Listed below is netbeans' showcase that lists all the existing users of the RCP. It may be a bit out of date IMO.
https://platform.netbeans.org/screenshots.html
Update
There was one more thing I wanted to write but found it hard to gather myself at the bar last night :). A while ago I tried to convert SquirrelSql to use JavaFX, but as with all my other ideas, I lost interest midway. I found it surprising that I could just use the JavaFx's sorta kinda MVC with JBoss weld CDI and I really liked programming MVC in Java Desktop UI world. I know you must have already made your decision, but this with worth taking a look at ,i am sure it might come in handy for your future endeavours as you spend your time doing desktop apps for a living. Here is the code, look into fw-fx directory.
udutha-sql

Webchat: Flash or Java or HTML5 or other? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want to start to make a chat client that runs in web browsers, upon a colleges requests. Its my first time doing something like this, so i made some research about this mostly about HTML5. I did research on the platform itself, how fast and how used it is, but my most important factor was: mobile support
I plan to develop this chat for a long while for experience because, as a coder/programmer I am still inexperienced.So i was thinking in the future as well. i have a forum community with pretty limited chat access. I want to change that as well, and as an extra include mobile support.
i researched Flash, java and HTML5, the two most obvious choice in web applications, and pretty much the new comer HTML5.
Flash is more widely used as web app(at least what i saw and found.), and its more designer oriented than programmer, but many chats are written in this, and are used. but there is no mobile support for it, to my knowledge. thats hinders my future plans.
Java, is a robust programming language, and saw a few webchats in this, but my main issue with this is performance: its much slower than flash. But at least there is mobile support, at least the android mobiles.
as for HTML5....its pretty much still a child, not all web browsers support it fully but the major ones support web socket already, except IE9. and IE9 is the most used web browser, sadly. And i cant find any support for it on mobiles yet.
And i don't know any other platforms out there in the Internet that could do the same as the above three, but i'm open.
So my question is: Which is the best platform for writing a webchat, that lest me do mobile support at a latter stage?
No, the correct answer is: Understand which method is quick to deploy, cost-effective and easy to learn. You'll need to integrate languages to make this work. HTML 5 is the latest and greatest, that's one. JAVA ~ still in demand on the Android side..learn it..
Flash is dying..don't learn that.
Windows ~ .NET..don't count this out...Microsoft is planning on coming out with a mobile platform...this is still good to learn..always learn a language that's going to give you job opportunities in the future.
You cannot write a chat in HTML 5 alone (because it operates on the client and there needs to be server code), you would need PHP or JSP for that.
I wouldn't use flash except if you are already very proficient in it because:
it needs an extra plugin
it frequently blocks or crashes some browsers
I think it is difficult to develop and I am not sure if the development software is free
So my choice would be Java Applet by default. It needs an extra plugin but it is much more stable than flash and you need it for many applications anyways but it has so much functionality that is very easy to make a chat with it.
P.S.: Java's speed is absolutely no problem for a chat. Java is maybe 10% behind C++ depending on the application but we are talking about languages like Flash or PHP so Java is not slower but it doesn't matter anyways because a chat has next to no resource requirements.
The correct answer is: it depends. You can implement such a program using many technologies. Each of these technologies have different characteristics and pros and cons but you have mentioned that this is going to be made for a university task. This way i recommend you to choose HTML5, this is a quite new technology, i think it worths it to have a little experience in that!
If you want to have the least work with this project, you should use java.
This is MY opinion.
You should have a look at nodejs:
http://nodejs.org/
Also the socket.io module for nodejs which allows you to use websockets as a transport mechanism for capable browsers and provides fallback methods for older browsers:
http://socket.io/
There's a node and socket.io chat tutorial which might be helpful and a working chat demo based on node (though I couldn't see any reference to socket.io when I reviewed the code).
I would not discount using Flash. It is still an industry standard in web development. It is way faster than a Java applet, but you are right, Java is not going anywhere. Flash allows you to deploy your project to the web, stand alone application on Mac and PC, and on mobile.

Learning Android SDK using only Android API examples

I keep reading that I have to learn Java to make android programs. But when I read about Java, none of it applies to the modules in the Android SDK. I am not much of a programer so if I have to spend years trying to learn another language and mess with other compilers before Android SDK will look like something that can be done, I'm not intrested. This should be an easy request, but when I asked on IRC they were very rude.
You cannot possibly program Android without knowing Java. I suppose you could try learning both at the same time, but that will be quite a steep learning curve. The android-samples won't make any sense to you if you don't understand Java.
sorry, there are no shortcuts.
I am by no means an expert, but I studied the basics of Java a couple of years ago in college and then went on to use Android for my bachelor thesis project (this was back when the newest Android version was 1.6 IIRC). In my limited experience, Android SDK modules indeed have very little to do with Java. In any case, it felt like I was learning a completely new language and SDK. In my opinion, you'll be fine learning Android by itself. I would suggest you give it a shot, and if you find yourself stuck at some point you can always take a step back and get a book on Java.
Also, since you mention you're not much of a programmed, Google had a project called App Inventor last year that non-programmers could use to make simple Android apps. I've never used it but I've heard great things about it, so depending on your project you might want to check it out. Google has since dropped support for it, but it seems MIT has picked it up: http://www.appinventor.mit.edu/.
Edit: fixed link.

Fastest path to Android development for a non-Java programmer

The decision to jump on the Android bandwagon has been made. The entire development environment has been installed and configured properly. I went through the steps suggested in http://developer.android.com/sdk/installing.html and even managed to "write" the Hello World application and run it on the emulator. :)
Unfortunately, however, I am not an experienced Java programmer and so, despite successfully completing all the suggested steps, and consulting an excellent speedy Java tutorial for C++ programmers, I feel that a lot is missing on the way to mastering Android development.
It would have been great to first master the Java world (note: I didn't say language, as Java is so much more than just syntax), then delve into Android, but in the real world there are deadlines to meet and so starting to develop/learn directly on Android is very tempting...
My question: Is it possible to develop good Android code while skipping the step of being an experienced Java programmer?
Do you know of a fast track that allows mastering both?
I have come from .NET and it was very easy to pick it up.
I bought Android Pro 2 book and that was all I needed.
UPDATE
Well, it seems that a few people have found the book really terrible because of typos and errors in the samples - and even in the book itself.
In any case, as you will find in the comments, this is by no means a definitive answer and please read Amazon reviews and choose the one you prefer. This worked for me since I need to understand the concept and then pick up the samples from Android documentations itself.
I believe a great share of Android developers come from other languages without any knowledge in Java at all. In fact all you need to know about Java in order to write Android code is it's syntax and core APIs: java.lang., java.util., java.net., java.io. etc. The rest is Android-specific APIs and a profound Java programmer won't have much advantage over you in learning them.

Categories