Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2008, 11:48 PM
Member
 
Join Date: Oct 2008
Posts: 27
Rep Power: 0
nwboy74 is on a distinguished road
Unhappy Communicate between Windows and UNIX
I am trying to come up with a solution to allow users on Windows machines to access the file system on our UNIX machines at work. The UNIX boxes are not webservers, but are accessible via XManager (or other such terminal emulator). I basically need to create a form that will gather information from the UNIX file-system, present it in a user-friendly format, and submit changes.

I tried having the user start a java program using Swing to open a new window, but it disrupts the xterm sessions. I tried using an applet, but applets don't have privileges to access the file system; also I don't know how to make the applet available to everyone since there isn't a url they can go to. I could possibly run a server on the unix box that listens on a particular port, but not sure how to connect or how to get the client program loaded onto the user's pc. Help?
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-01-2008, 01:53 AM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Rep Power: 4
Norm is on a distinguished road
Default
If its Swing that is a problem, have you tried the older AWT?
It'll be a lot simpler GUI it that's not important.
If the program on Unix is a server for the Windows users, does it need a GUI?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-01-2008, 10:08 AM
serjant's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Ukraine,Zaporozhye
Posts: 451
Rep Power: 2
serjant is on a distinguished road
Send a message via ICQ to serjant Send a message via Skype™ to serjant
Default
Do you access the UNIX machine with root rights?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-01-2008, 10:14 AM
serjant's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Ukraine,Zaporozhye
Posts: 451
Rep Power: 2
serjant is on a distinguished road
Send a message via ICQ to serjant Send a message via Skype™ to serjant
Default
Usually i access my UNIX server with root rights,that enables me to do everything on the system.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-03-2008, 09:58 PM
Member
 
Join Date: Oct 2008
Posts: 27
Rep Power: 0
nwboy74 is on a distinguished road
Default
Actually, it's looking more and more like AWT is the problem. Since Swing is built on AWT, I can't use either. In all fairness, it's the interaction between xterm and AWT. I just don't know how to solve it.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 11-03-2008, 10:59 PM
serjant's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Ukraine,Zaporozhye
Posts: 451
Rep Power: 2
serjant is on a distinguished road
Send a message via ICQ to serjant Send a message via Skype™ to serjant
Default
Can you try not to make an AWT Frame,try to make a JFrame and see what happens.ok?
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 11-03-2008, 11:30 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Rep Power: 4
Norm is on a distinguished road
Default
Quote:
I just don't know how to solve it.
Do you need any GUI at all?
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 11-03-2008, 11:34 PM
Member
 
Join Date: Oct 2008
Posts: 27
Rep Power: 0
nwboy74 is on a distinguished road
Default
The same thing happens if I try JFrame or Frame. Apparently, sun is aware of the issue and have supposedly addressed it. It has something to do with AWT loading a certain libraries in a particular order.

Quote:
XToolkit on Solaris/Linux

Starting with release J2SETM 5.0, AWT has been re-implemented on the Solaris and Linux platforms. The new Toolkit implementation provides the following advantages:
  • Removes the dependency on Motif and Xt libraries.
  • Interoperates better with other GUI Toolkits.
  • Provides better performance and quality.
The new Toolkit (XToolkit) is the default on Linux in J2SE 5.0. Solaris will continue to use the MToolkit (Motif-based Toolkit) as the default in J2SE 5.0, but eventually will be replaced with XToolkit.

Explicitly Setting the Toolkit

You can explicitly set the toolkit for an applet or application using an environment variable or a system property. Keep in mind that the environment variable overrides the system property.

Setting the toolkit for an application:

Using an environment variable. This needs to be set before starting the VM.
csh:
setenv AWT_TOOLKIT XToolkit #selects the XToolkit
setenv AWT_TOOLKIT MToolkit #selects the MToolkit

ksh/bash:
export AWT_TOOLKIT=XToolkit
export AWT_TOOLKIT=MToolkit

Unfortunately, what they've suggested does not work for me. I'm assuming because I don't have XToolkit as part of my runtime environment.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 11-04-2008, 12:00 AM
Member
 
Join Date: Oct 2008
Posts: 27
Rep Power: 0
nwboy74 is on a distinguished road
Default
I need some sort of user interface that will allow me to display a list of files and have users be able to "check" off which ones they want included. Sure, I could go one-by-one through each file and ask "Do you want to include this file?", but that's monotonous, especially for a large list.
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 11-04-2008, 08:24 PM
Member
 
Join Date: Oct 2008
Posts: 27
Rep Power: 0
nwboy74 is on a distinguished road
Default
It seems that my problem is with XManager 2.0, the program we use to grab an xterm session. Unfortunately, I don't think my company is willing to invest in XManager 3.0 to fix my problem.
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 11-04-2008, 08:53 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
Rep Power: 4
Norm is on a distinguished road
Default
How about a mini HTTP server without a GUI that uses a browser for communications with the user via localhost. Let the browser handle the GUI.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Swing and Unix nwboy74 AWT / Swing 9 11-05-2008 02:04 AM
Unable to connect to MySQL on another (unix) host from Eclipse on my windows host kairamr Eclipse 0 10-31-2008 07:07 PM
how to run java app on windows in a cron like on unix rockie12 Advanced Java 7 05-23-2008 01:39 PM
Communicate vb.NET with Java cachi Advanced Java 1 08-02-2007 12:41 AM
To communicate an Applet with an application that uses struts Eric Web Frameworks 1 07-06-2007 05:21 PM


All times are GMT +2. The time now is 02:55 AM.



VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org