Manuel Farias Hernandez

Greenhorn
+ Follow
since Jul 07, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Manuel Farias Hernandez

Hi folks,

I have started to write a class that will handle access to the UNIX file /etc/services. The class, will be named EtcServices. The class will, for example, have the possibility to search for a specific service, for example, ssh, and return an object holding information about that service.

Any thoughts? Suggestions?

Best regards,
Manuel Farias Hernandez
19 years ago
Hi folks!

I am writing an application that needs to add, modify, and remove entries (services) to the file /etc/services. Furthermore, I thought that my application might not necessary be the only application needing to access the /etc/services file. In addition, there is another file, the /etc/inet/services file. And, maybe, my application needs some day write to a database.

So, this is what I have tought:
MyApplication ---> Services ---> EtcServices ---> /etc/services

Now, is that a good approach, or are there other ways to go? What do you say?

Best regards,
Manuel Farias Hernandez
19 years ago
Hi folks! I am back!

Yes, I have been off, but now I have returned to the world of Java. I spend 2 hours to fresch up my mind, and to test the suggested solution. So I made a new prototype, and, yes, it functions! Thanks thanks thanks!

Now, I have another problem ... but that might be a new issue/topic.

Best regards,
Manuel
19 years ago
I am writing a kind of install wizard, that I have named JInstall. This JInstall calls a UNIX shell script named install. This script, is the real installation program, and my JInstall is just a nice front end that gathers settings from the user, presents the License.txt file, etc. My JInstall extends JFrame, and uses several JPanels together with a CardLayout Manager to handle the different pages that the user has to go through, for example, a License Agreement Page, Directory Selection Page, and so on.

In the Install Page, I want to display the output from the install shell script in a JTextArea. My problem is that, the output from the shell script install is not simultaneously displayed as the install script runs. All the output is displayed when the script ends, and the scripts takes 1 - 2 minutes to run. Thus, my Java application seams to hang when the user clicks the Install button (a JButton ...).

Please note that my call of the install shell script, is done through the following steps:

runInstallShellScript() {
cardLayout.show( cardPanel, "Install" );
SwingUtilities.invokeLater( this ); // To let the GUI be updated.
}

public void run() {
// Run the install script
}

The use of SwingUtilities.invokeLater is needed, as previously, the updates to the GUI did hang while the install script run. Now, the Install Page is displayed, and then starts the shell script.

So, thus somebody know what I should do? Maybe, there is a complete different approach to have when creating Java-GUI-shell-script-application.
19 years ago
I am writing a kind of install wizard, that I have named JInstall. This JInstall calls a UNIX shell script named install. This script, is the real installation program, and my JInstall is just a nice front end that gathers settings from the user, presents the License.txt file, etc. My JInstall extends JFrame, and uses several JPanels together with a CardLayout Manager to handle the different pages that the user has to go through, for example, a License Agreement Page, Directory Selection Page, and so on.

In the Install Page, I want to display the output from the install shell script in a JTextArea. My problem is that, the output from the shell script install is not simultaneously displayed as the install script runs. All the output is displayed when the script ends, and the scripts takes 1 - 2 minutes to run. Thus, my Java application seams to hang when the user clicks the Install button (a JButton ...).

Please note that my call of the install shell script, is done through the following steps:

runInstallShellScript() {
cardLayout.show( cardPanel, "Install" );
SwingUtilities.invokeLater( this ); // To let the GUI be updated.
}

public void run() {
// Run the install script
}

The use of SwingUtilities.invokeLater is needed, as previously, the updates to the GUI did hang while the install script run. Now, the Install Page is displayed, and then starts the shell script.

So, thus somebody know what I should do? Maybe, there is a complete different approach to have when creating Java-GUI-shell-script-application.
19 years ago
I am writing a kind of install wizard, that I have named JInstall. This JInstall calls a UNIX shell script named install. This script, is the real installation program, and my JInstall is just a nice front end that gathers settings from the user, presents the License.txt file, etc. My JInstall extends JFrame, and uses several JPanels together with a CardLayout Manager to handle the different pages that the user has to go through, for example, a License Agreement Page, Directory Selection Page, and so on.

In the Install Page, I want to display the output from the install shell script in a JTextArea. My problem is that, the output from the shell script install is not simultaneously displayed as the install script runs. All the output is displayed when the script ends, and the scripts takes 1 - 2 minutes to run. Thus, my Java application seams to hang when the user clicks the Install button (a JButton ...).

Please note that my call of the install shell script, is done through the following steps:

runInstallShellScript() {
cardLayout.show( cardPanel, "Install" );
SwingUtilities.invokeLater( this ); // To let the GUI be updated.
}

public void run() {
// Run the install script
}

The use of SwingUtilities.invokeLater is needed, as previously, the updates to the GUI did hang while the install script run. Now, the Install Page is displayed, and then starts the shell script.

So, thus somebody know what I should do? Maybe, there is a complete different approach to have when creating Java-GUI-shell-script-application.
19 years ago