Can Java do this

Hi,
I want to really learn Java after just taking classes to this point. I have a task I need to do, but cannot figure IF I can do it in Java, let alone how.
I have about 40 tools on my SGI. They are written in Fortran, C, or a commbination of both. Their code varies from a few lines to 200 or so source files. The machine is networked to other SGIs and Suns, but has no internet connections. My manager wants a top level GUI written to access these tools and to provide information about them.
Can this be done in Java without rewriting all of the tools?
I see that I need to be able to either:
1) Spawn a process (i.e. tell the system to run a given tool) from my Java top level GUI or
2) Write a small java interface for each tool and be able to compile that Java with the C or Fortran code.
Can you do this in Java? If so can someone suggest a book or website to send me in the right direction?
Thank you

Hi,
I want to really learn Java after just taking
g classes to this point. I have a task I need to do,
but cannot figure IF I can do it in Java, let alone
how.
I have about 40 tools on my SGI. They are written
n in Fortran, C, or a commbination of both. Their
code varies from a few lines to 200 or so source
files. The machine is networked to other SGIs and
Suns, but has no internet connections. My manager
wants a top level GUI written to access these tools
and to provide information about them.
Can this be done in Java without rewriting all of
f the tools?
I see that I need to be able to either:
1) Spawn a process (i.e. tell the system to run a
given tool) from my Java top level GUI or
2) Write a small java interface for each tool and be
able to compile that Java with the C or Fortran code.
Can you do this in Java? If so can someone suggest a
book or website to send me in the right direction?
Thank youYou can do number one, however this will have to be a system dependent implementation. We have created java applications that can launch non-java applications. It's a little messy but can be done pretty easily.
As far as number two goes, that sounds like a real mess.

Similar Messages

  • Can java complete this mission? If it can, how?

    please, Tell me about your oppinion.
    I want to make a applet which can control all opened windows [application] on windows O/S.
    In other words, this applet makes the explore which downloads this applet the most top window layer.
    So, When user change the active window using mouse or alt-tab, it doesn't works.
    I want to use this applet in the examination system. So, when the students show the page which contains this applet, the applet is downloaded and make the PC like dummy terminal during the user see this page.
    Can java do this? If it can, how i make this applet?
    Umm.. thanks for your reading.

    You can look at java.awt.Robot.
    If that doesn't do what you need then you will have to figure out how to do it in C/.C++ and then use JNI to connect it to your applet.

  • Can Java do this job?

    Hi all,
    I just thinking about writing a program that can display the caller ID.
    The problem is:
    When a user using dial-up access the internet, the program can detect the caller ID if somebody dial the user's number. Of course, caller ID can be displayed at anytime when somebody calling the user.
    I don't know which Java API can be used for this program and how to start writing this program.
    Please can you give me any suggestion?
    Thanks in advance.
    Leo.

    If you are talking about having someone call the computer through a modem and the local computer's modem answering it, then you can do JNI calls to packages for caller ID. If you are talking about getting the phone number of people browsing across a website--then you better learn how things operate: it is not possible (to my knowlege) no matter what language you use.

  • Can Java replicate this?

    Hello,
    Back "in the day" many of us enjoyed the Infocom text adventures (now called interactive fiction.) The one thing that made the games very fun to play with was the "recognition" of english speech. The programs were very smart about taking what you typed in and applying the appropriate response (allowing for the fact that you followed the rules).
    I would think that Java could mimic this but I want to make sure before I attempt to build an interactive fiction game in Java. Granted I have no idea how to go about it, but that's another story!
    Also, how suited is Java to deliver a finished retail product of this sort - whether by download or off the shelves at best buy?
    Thanks
    Tom

    Yeah, I have actually heard of Google, thanks.
    My point in asking in a forum was to get some people
    who are familair with Java and get their insight
    directly.
    So it's more a matter of can I figure out how to do
    it - Java should be fully capable. Thanks.Java is definitely fully capable, although there are already existing scripting languages that may be even easier. If you do choose Java, however, there are a great many resources to help you get started....
    The Java Tutorial - A practical guide for programmers
    Essentials, Part 1, Lesson 1: Compiling & Running a Simple Program
    New to Java Center
    How To Think Like A Computer Scientist
    Introduction to Computer Science using Java
    The Java Developers Almanac 1.4
    JavaRanch: a friendly place for Java greenhorns
    jGuru
    Bruce Eckel's Thinking in Java
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java

  • Can java provide a follow/depend/attatch compiling warning?

    I wrote a class called Query.It connect to database and return ResultSet.So user must manually call my method close() to close the ResultSet and Connection, otherwise resource will be avaliable.
    But user maybe forget call the close() method.If codes are released,problem will occur.
    For this reason I want java provides a compile warning if a important method is not called.
    e.g. Codes maybe like this:
    /**Start**/
    class Query(){
    ResultSet getResultSet(DataSource ds){
    //Codes get resultset
    return ResultSet;
    void close() follow getResultSet(DataSource){
    //Close databse
    //Note: "follow getResultSet(DataSource)" is my idea.
    class test{
    Query query = new Query();
    RsultSet rst = query.getResultSet();
    //query.close();//#1
    /**End**/
    If user forget writing line #1 (to close Database,etc), java compiler will give a warning:
    The method close() must follow method getResultSet!
    You will get error when running.
    Can java provide this function?
    Thanks!

    to mchan0 :
    I konw you mean I can copy ResultSet to another Object.But if databse is very very large,ResultSet will use large memory.It is not we want.
    e.g. our project database need to store 40,000,000 records.Once load large numbers records,server will crack.
    So I can only use ResultSet.
    If I wrong,please correct me.
    Thanks

  • Can Java save straight to EPS or similar?

    Thanks for reading, heres the setup--user visits my site to design his own custom plaque-he picks a template in my hypothetical Java app and sets to work entering names, congradulatory text and picking from pre-defined graphics/logos and then clicks the ORDER button.
    Can I export his design intact to my server in an EPS or similar, common vector file format? Preferably converting some of the type to curves in the process.
    I don't want to go through a lot of BS to get the file (as with Flash)--I can't run the output through some third party interpreter and get a sorta-kinda-like representation of his design--it's gotta be THE WYSIWYG design he produced. Reason being we're trying to avoid the layout-proof-update roundtrip--what he designed is exactly what we produce and if there are any mistakes they are his, not ours. (It may sound harsh but it's the only way we can possibly compete anymore--we need to offload the design process 100% onto the customer)
    So, can Java do this? Can I get an EPS or similar format straight out of a Java app?
    Thank you.

    http://barcode4j.krysalis.org/
    Next time, go and use Google yourself.

  • Can Java create HTML tables without running a web server?

    Hello,
    I would like to know if Java can output data into a simple HTML-like table without having to run a web server or jsp etc.
    I want my program to access a database and print records in HTML-like table cells.
    It is actually for an events calendar program, where each event would be printed in a cell (date). There would be a variable number of events per cell (date), with each one being editable.
    I have seen various "web" calendars like this but I want to make it a desktop application so that it is not dependant on the functioning (or non-functioning!) of a web server.
    Can Java do this? I would settle for any type of prewritten table creator (not necessarily HTML) but I do not want Excel type tables or a table where entries must be GUI buttons, such as in Outlook.
    Thank you very much for any idea you may have,
    Cat

    Thank you for the replies :)
    I found something with Jeditorpane (JTextComponent and HTML Text Display) at
    http://msp-of.de/oreilly/books/javaenterprise/jfc/ch03_21.htm
    which looks like what I want. It allows hyperlinks within the table cells and I'm not sure if JTable allows for that. Also, I will want multiple lines and even images (eg moon phases for the calendar) in each cell. I ran the example above and it works great. And yes, it makes use of the HyperlinkListener.
    I don't want to create an HTML file for those who suggested that. I just want the flexibility of HTML formatting withing my standalone Java application.
    I am still not sure why everyone is suggesting JTable though :) So I will look at it some more. The link above also has a turorial on JTable and does say its faster that JEditor pane because it doesn't have to do any HTML rendering. But it doesn't look to me like it can really ever look like a calendar.....
    Thank you again! Being a total Java novice, I am very impressed with how easy JEditorpane is.
    Cat

  • Can Java be used for this?

    Hi. As a hobby, I have built a game with a development tool called Macromedia Director.The game is a 'virtual tabletop' that allows people to play a variety of role playing games over the internet that are traditionally played in a face to face setting at a real table.
    Due to some shortcomings with Director I am looking for another language to program the game.I currently use an old version of Director and upgrading is expensive. Director also has limited cross platform support (no Linux). Finally, the future of Director is in question as Macromedia was acquired by Adobe and they have already end-of-lifed some of the acquired products.
    My game consists of some basic features. One user runs a server application that accepts connections from the client application. Once connected the cleints can do basis text chat. There is die rolling function. Finally there is a feature for the referee to send pregenerated images to the players, typically some sort of map. The image can be hidden from the players and revealed in pieces by the referee. I also plan on adding a shared whiteboard feature for creating on the fly images.
    I have done some preliminary investigation and it seems that Java is one of the obvious choices. The socket programming seems to be straight forward and allow you to create a similar client/server application. Swing covers building the GUI. What I am not clear on is the graphics capability of Java. Director has a fairly powerful graphics engine allowing you to work with 32 bit graphics (alpha channels) and pixel manipulation.
    It seems like Java can do all this, but I want to make sure before I invest to much time. You can see screen shots of my game at http://www.v-fort.org. It's definetly not a polished product. There are many of these types of programs already.I just do it because I enjoy programming (and gaming too). I appreciate any suggestions. Thanks
    -- Dave

    Java is it!

  • How can i  apply this  java program for  a jsp page?

    import java.io.*;
    import java.util.*;
    public class FileProcessing
      //create a vector container  for the input variables
         Vector variables = new Vector();
      //create a vector container for the constants
         Vector constants = new Vector();
      /*create a string expression container for the equation
         as read from the file */
         String expression = " ";
      //create double result container for the final result
         double result = 0;
         public boolean processFile(String filename,String delim)
          //index for values vector
              int num_values = 0;
          //index for constants vector
              int num_constants = 0;
          //current line being read from the external file.
              String curline = " ";
          //start reading from the external file
              try
                   FileReader fr = new FileReader(filename);
                   BufferedReader br = new BufferedReader(fr);
                   while(true)
                        curline = br.readLine();
                        if(curline == null)
                             break;
                    //determine the type of current interaction
                        boolean variable = curline.startsWith("input");
                        boolean constant = curline.startsWith("constant");
                        boolean equation = curline.startsWith("equation");
                        boolean output = curline.startsWith("result");
                   //on input variables
                        if(variable)
                          StringTokenizer st = new StringTokenizer(curline,delim);
                          int num = st.countTokens();
                          int count=0;
                          while(st.hasMoreTokens())
                               String temp = st.nextToken();
                               if(count==1)
                                    byte b[]= new byte[100];
                                    System.out.println(temp);
                                    System.in.read(b);
                                    String inputval = (new String(b)).trim();
                                    variables.add(num_values,inputval);
                                    num_values++;
                               count++;
                        // on constant values
                        if(constant)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==1)
                                       byte b[]= new byte[100];
                                       System.out.println(temp);
                                       System.in.read(b);
                                       String cons = (new String(b)).trim();
                                       constants.add(num_constants,cons);
                                       num_constants++;
                                  count++;
                        // on equation
                        if(equation)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==2)
                                       this.expression = temp;
                                  count++;
              // now we are ready to evaluate the expression
                       if(output)
                          org.nfunk.jep.JEP  myparser= new org.nfunk.jep.JEP();
                          myparser.setAllowAssignment(true);
                          for(int i=1;i<variables.size()+1;i++)
                             String name = "arg"+Integer.toString(i);
                             myparser.addVariable(name,new Double(variables.get(i-1)
                                                .toString()).doubleValue());
                          for(int i=1;i<constants.size()+1;i++)
                               String name = "arg" +Integer.
                                         toString(i+variables.size());
                               myparser.addConstant(name,new Double(constants.get(i-1).toString()));
                   //output is obtained as follows
                          myparser.parseExpression(expression);
                          result = myparser.getValue();
                          System.out.println("Assay value: "+result);
              catch(Exception e)
                   System.out.println(e.toString());
              return true;
         public static void main(String[] args)
              FileProcessing fp = new FileProcessing();
              fp.processFile("input.eqn",":");
    }//my text file name is: "input.eqn" (given below)
    input:Enter Value1:arg1
    input:Enter Value2:arg2
    input:Enter Value3:arg3
    constant:arg4
    constant:arg5
    Equation:arg1+arg2+arg3
    result:

    how can i apply this java program for a jsp pagewhy do you want to do this ?
    Your program reads from a file on the disk and formats based on a patterm.
    Jsp is not intended for such stuff.
    ram.

  • We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    Anyone any ideas to help please?

  • Can I use java on this machine?

    Because the machines of our schools all show the informaiton like below when I type "java":
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    How can I run java program on these machines?

    By following what the usage message tells you.
    Bare minimum:java SomeClass (You don't actually type "SomeClass." That's just a generic placeholder for the name of the class whose main method you want to run.
    More common: java -cp C:\some\path;C:\some\other\path\something.jar SomeClass something somethingElse And again, those are of course just generic placeholders for your real classpath, class, command line arguments.
    Of course, to do this, you'll have to have a Java program to run. Do you have one that you want to run? Or are you going to start learning how to code in Java? To write the code, you don't use Java, you use your favorite text editor or an IDE. Then you use javac to compile it and java to run it.
    If you're just looking to get an idea of what Java is, how to write code, how to run it, check out the second link below. Since Java seems to already be installed, you can skip the parts about downloading and installing.
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java. This one has been getting a lot of very positive comments lately.
    &para;

  • On certain web sites(with java applets embedded or rich content),sometimes browser hotkeys are beeing used with other functionality (eg.: youtube uses ctrl + tab for sliding between player controls).How can I prevent this?

    On certain web sites(with java applets embedded or rich content),sometimes browser hotkeys are beeing used with other functionality (eg.: youtube uses ctrl + tab for sliding between player controls).How can I prevent this ?

    Thanks for posting this!
    I would only mention that your definition is incomplete for this -
    Contextual selector A type of Style Sheet Selector that
    and that it's most often referred to now as a Descendent selector, not a contextual selector.  It's basically the same as the Compound selector that you have already defined....

  • I am new to this and a bit rusty with Java, Oracle, Web Development, et al; and, I need a free trial run at this time, Can we do this?

    I am new to this and a bit rusty with Java, Oracle, Web Development, et al; and, I need a free trial run at this time, Can we do this?

    your itunes accoutn have nothing to d with your computer
    you can go to any computer with internet access in the world and
    login into your itunes account if you have the appleID and password
    the itunes account is placed on apples itunes servers

  • Where can I find this download...I just updated to Yomesite and I got this message:What is says is To open "Adobe Dreamweaver CS5.app" you need to install the legacy Java SE 6 runtine.

    Where can I find this download...I just updated to Yomesite and I got this message:What is says is To open "Adobe Dreamweaver CS5.app" you need to install the legacy Java SE 6 runtine.

    Hi zimieh. Do you get it by going to the app store and run update,. If not here is a link for the only java update I find for Yosemite.  http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US

  • How can i rewrite this code into java?

    How can i rewrite this code into a java that has a return value?
    this code is written in vb6
    Private Function IsOdd(pintNumberIn) As Boolean
        If (pintNumberIn Mod 2) = 0 Then
            IsOdd = False
        Else
            IsOdd = True
        End If
    End Function   
    Private Sub cmdTryIt_Click()
              Dim intNumIn  As Integer
              Dim blnNumIsOdd     As Boolean
              intNumIn = Val(InputBox("Enter a number:", "IsOdd Test"))
              blnNumIsOdd = IsOdd(intNumIn)
              If blnNumIsOdd Then
           Print "The number that you entered is odd."
        Else
           Print "The number that you entered is not odd."
        End If
    End Sub

    873221 wrote:
    I'm sorry I'am New to Java.Are you new to communication? You don't have to know anything at all about Java to know that "I have an error," doesn't say anything useful.
    I'm just trying to get you to think about what your post actually says, and what others will take from it.
    what does this error mean? what code should i replace and add? thanks for all response
    C:\EvenOdd.java:31: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=true;
    ^
    C:\EvenOdd.java:35: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=false;
    ^
    2 errors
    Telling you "what code to change it to" will not help you at all. You need to learn Java, read the error message, and think about what it says.
    It's telling you exactly what is wrong. At line 31 of EvenOdd.java, you're calling isOdd(), with no arguments, but the isOdd() method requires an int argument. If you stop ant think about it, that should make perfect sense. How can you ask "is it odd?" without specifying what "it" is?
    So what is this all about? Is this homework? You googled for even odd, found a solution in some other language, and now you're just trying to translate it to Java rather than actually learning Java well enough to simply write this trivial code yourself?

Maybe you are looking for

  • Pls Help me made big mistake !

    hello, here's what happened ... without reason my computer set itself back to factory settings .. so everything lost, my document, my settings in iphoto, itunes, you know the whole lot but luckily for my i was using my external hard drive for iphoto

  • Attachments opening twice

    Just noticed this today... when I open attachments from Mail now, it opens them twice automatically. Didn't do this before the latest Java Security update.

  • Getting font files used by Java

    Hi everyone, I am writing an application which allows the user to use different fonts available on the system. When saving a document in this application, I would like to include the fonts with the document, rather than just references (in case the d

  • How do you update an ipad 1 to ios 5

    i am hoving trouble updating my ipad (1) to ios 5 it says on my pc that ipad 1 is supported but once the download in itunes has finished it just says this device is not elegible for the requested build and stays on ios 4. something        CAN YOU HEL

  • How to copy the bookmarks to an other apple id

    Hi, I need to copy the bookmarks from one apple-id to an other apple-id. both deviceses are NOT jailbroken and running on ios 704. any idea ? best RB