d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Java Program To A Tablet
Add Reply New Topic New Poll
Member
Posts: 5,269
Joined: Oct 18 2006
Gold: 21,400.00
Apr 9 2014 04:10pm
I have a Java program that I wrote. Fairly simple, uses Swing and accesses a database to do some inventory updates. Currently my employees just use a laptop to run it and everything works fine. The problem is that i need something more mobile so my employees can walk around while using it instead of walking back and forth from product to the computer.

I am looking for advice for which tablet to get. If possible, I would like to use a Nexus 7 or an iPad since I already have those on hand. From what I have read however, that is not going to happen.

I do not want to rewrite programming that works, but I want to move it to a simple/small device.

I am currently researching and any help I can find would be much appreciated.

Thanks!
Member
Posts: 582
Joined: Mar 22 2014
Gold: 0.00
Apr 9 2014 05:33pm
I am not aware of any tool to transform your Java code to Java code working on Android. You are unfortunately stuck either reimplementing it for a mobile OS or reimplementing it into a web application. I would suggest the latter, as it avoids having to implement two versions, one for iOS and one for Android.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 9 2014 06:38pm
as ^ stated, you must re-write code. sounds like it's pretty straight forward if it's small.

Quote (poodaH @ Apr 9 2014 06:33pm)
I am not aware of any tool to transform your Java code to Java code working on Android. You are unfortunately stuck either reimplementing it for a mobile OS or reimplementing it into a web application.  I would suggest the latter, as it avoids having to implement two versions,  one for iOS and one for Android.


you can also use a cross-platform mobile framework. i tried titanium appcelerator recently, but there are many available. if he's only comfortable with java, then native android is probably his easiest approach.
Member
Posts: 582
Joined: Mar 22 2014
Gold: 0.00
Apr 9 2014 06:45pm
Quote (carteblanche @ Apr 9 2014 08:38pm)
as ^ stated, you must re-write code. sounds like it's pretty straight forward if it's small.



you can also use a cross-platform mobile framework. i tried titanium appcelerator recently, but there are many available. if he's only comfortable with java, then native android is probably his easiest approach.


But then the same code can't be used for desktops as well.
A web application wouldn't suffer from this.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 9 2014 07:48pm
i assume you're trying to get away from a keyboard. i never used windows 8. can java programs run on there fine? if so, you can try one of those pseudo-tablets like the thinkpad twist. i'm sure there are others too. but you can't simply use your plan java program on android/ios, so you'll have to look for something with a windows / mac / unix desktop version.

if you're ok with a keyboard, maybe even a netbook? i've seen some small enough to put in a purse. but if the app is simple, i'd just rewrite it tbh

Quote (poodaH @ Apr 9 2014 07:45pm)
But then the same code can't be used for desktops as well.
A web application wouldn't suffer from this.


just saiyan it's an option. dont know enough about his app to make a good recommendation. for all i know, he's updating a local database on the computer and he's in a warehouse where he won't have any internet/wifi.

This post was edited by carteblanche on Apr 9 2014 07:50pm
Member
Posts: 5,269
Joined: Oct 18 2006
Gold: 21,400.00
Apr 10 2014 03:52pm
Thanks for the ideas! The web application sounds like my best option since that would make it very flexible and we have wifi in our warehouse. I'm decent with designing webpages and writing php, but I know very little (to nothing) about hosting these programs.

How hard would it be to host a web application on my local computer where my SQL Server is already running? I setup the SQL Server so I can access it anywhere. Do I need to completely dedicate a computer to host a website/web application?
Member
Posts: 20,165
Joined: Dec 5 2007
Gold: 692.20
Apr 12 2014 12:31am
Quote (poodaH @ Apr 9 2014 06:33pm)
I am not aware of any tool to transform your Java code to Java code working on Android. You are unfortunately stuck either reimplementing it for a mobile OS or reimplementing it into a web application.  I would suggest the latter, as it avoids having to implement two versions,  one for iOS and one for Android.

Processing is Java based and can convert Android.

Unfortunately Swing and Processing don't work well together

Member
Posts: 15,949
Joined: Feb 8 2013
Gold: 22,500.00
Apr 16 2014 08:49am
Do a web page that makes some calls to a web service and then the web service uses your java application. (If i understand your needs and this is for collecting data) The program can then return some values through your web service to your tablet if you need display; If no, then it is even more simple.

sorry for bad english. You can pm me if you have questions.
Member
Posts: 2,757
Joined: Nov 26 2007
Gold: 1,214.81
Apr 16 2014 09:14am
I suggest you use Vaadin with Touchkit. Vaadin is a web application framework that runs on java, and Touchkit is a Vaadin addon that lets you create cross-platform, mobile versions of your application (however Vaadin web apps run fine on a tablet, without Touchkit)

https://vaadin.com/home
Member
Posts: 2,095
Joined: Apr 15 2003
Gold: 100.08
Apr 17 2014 05:27pm
Quote (xandumx @ 10 Apr 2014 23:52)
Thanks for the ideas!  The web application sounds like my best option since that would make it very flexible and we have wifi in our warehouse.  I'm decent with designing webpages and writing php, but I know very little (to nothing) about hosting these programs.

How hard would it be to host a web application on my local computer where my SQL Server is already running?  I setup the SQL Server so I can access it anywhere.  Do I need to completely dedicate a computer to host a website/web application?


Well if you already have a local computer available in your warehouse there would be no problem running a java based web application with access to your sql db Don't know about PHP but most likely It's the same for PHP.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll