• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I deploy a web application that contains non-java application?

 
gao zhixin
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a application using swing, which contains some module that do not belong to java( c and unix shell), I have to change this application to java, and the cost should not too large. So can I first change the application to web, and then deploy it using a web container? If it can't, can I change it to applet ( the client using windows)
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look into JNI (Java Native Interface) for calling your C code.
Look into Runtime.exec for calling your shell scripts.
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html
[ August 15, 2006: Message edited by: Ben Souther ]
 
gao zhixin
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, buddy, I think you misunderstand my question, I can run that code in java application, but I want to change it to web...
 
Dave Robbins
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
explain in more detail what you want to do

Dave
 
gao zhixin
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to move that application which using swing to web, but I don't know whether I can do that, because it has none java module
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can a Swing application have no Java?
 
gao zhixin
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean , it has non-java module using JNI to access
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be very difficult to port your Swing application to a web app, not because of any non-native code or JNI issues, but because your entire Swing layer would need to be jettisoned in favor of a new UI implemented using HTML pages.

Was the app written using a strict MVC pattern that would allow your model to work using a completely different presentation layer?

If not, you are looking at a re-write. if so, you are at least looking at implementing a new UI.

It might be a lot easier to go the Applet route, but I really don't know what would be involved there since I've never even seen the code for one, let alone written one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic