Making a java program run in Windows and Linux via web applets

Hello, this is my first post at java.sun.com
I made an application in Linux, using Jbuilder Fundation 2005. I used the JDBC MySQL connector for Linux, and I used Mandriva as a distro. What I did is a program that allows me to connect remotely to my server, in order to update the news.
However I want to create an applet, in which you could click a button, and the main frame of the program will load. I have no idea how to do this, since this program runs great on my linux machine, and from what I know it uses the MySQL JDBC jar that's installed on my machine, and a lot of classes from the Jbuilder program directory.
How could I upload this program to a webpage (with the applet idea that I mentioned earlier) so that both Linux and (especially) Windows clients could use it?
It will also be nice to know how to create a .jar file that has all of the required classes in it, I know that Jbuilder enterprise does this, but I don't have that version or plan buying it.
Thanks in advance

Put the jre folder from your JDK install in your app folder.ok, but in this way he doesn't have to download jre
but I have to add it to the app folder so that an
application large just some kilobytes would become
some megas bigger... unless I have misunderstood what
you're suggesting me of course.Yeah, that's the downside. However, 17 MB isn't very large by todays standards.
jre\javaw -cp <your classpath> <your main class><your classpath> is the class i need to be run's path
or my classpath?
jre\javaw has to be written like this or preceeded by
the path of jre directory?As long as you point 'start in' to the correct directory, I don't believe you have to worry about that. That path you have there isn't quite right (neither was mine) but I think you've got that under control.
You can give anm explicit path, then you can have different users with different start-in values and store their properties there automatically.

Similar Messages

  • Execute Unix command from Java program running on windows

    Hello,
    I need to write a java program that fetches file count in a particular unix machine directory. But java program will be running on windows machine.
    The program should execute unix list command and fetch the output of that command.
    Can anyone help me on this?
    Thanks.

    Hi there,
    I had a similiar problem, though years ago. It was to have a java program execute any other. Lately, I've had to have a java program running on a unix machine execute a shell script. Entirely two different scenarios. I'm not sure what you will need for your app, but look into this:
    Java Native Interface for executing C/C++ code.
    C/C++ Code for launching the program you need to run.
    java.lang.Runtime(?).exec(....)
    With a combination of that stuff, you can make a launcher for any os that has Java running on it, and with Runtime, you can exec() pretty near any sort of unix shell or app command you'd like.
    Good luck.
    Tim

  • How to execute unix command from the Java program running on Windows

    Hello,
    I need to
    1. Execute a unix shell script from a Java program running on the Windows.
    2. I also need to capture the output of this shell script in my program.
    Please suggest me how to achieve this.
    Thanks in Advance.

    Hi...
    Something is missing here
    If you want to execute a shell script in windows that not posible unless you find or develop a unix shell script parser for windows.
    But if you are trying the execute a unix shell script on a remote unix computer from your java program running on a windows platform you can do that by logging on to the UNIX terminal which is running on port 23 I think.
    You can test this using telnet tool on windows
    just type on command prompt
    telnet <ip of the unix pc> <port number this case 23>
    you should get the unix terminal. If that works you can do the same through java or you can directly conect to port 23 of that pc using sockets that way your program will be platform independant

  • Making a java program work on windows xp  platforma without developer kit

    hi to you all!
    I've written some programs in java but until now I only had to compile and run them on my machine so there were no problems until now.
    I need now to write a little very easy program for a friend of mine and some other people who could need to use it. My friend said he wants a very "user-friendly" program so no command in ms dos prompt or stuff like that. I'm trying to make a .exe of my java program using "exe4j", is that good?
    second question: many of the people who will use my program have no idea of what java programming is and I don't think they want to download jdk and jre cause they won't be of any use to them, so how can I avoid this?
    is it possible?
    Thank you very much.

    Put the jre folder from your JDK install in your app folder.ok, but in this way he doesn't have to download jre
    but I have to add it to the app folder so that an
    application large just some kilobytes would become
    some megas bigger... unless I have misunderstood what
    you're suggesting me of course.Yeah, that's the downside. However, 17 MB isn't very large by todays standards.
    jre\javaw -cp <your classpath> <your main class><your classpath> is the class i need to be run's path
    or my classpath?
    jre\javaw has to be written like this or preceeded by
    the path of jre directory?As long as you point 'start in' to the correct directory, I don't believe you have to worry about that. That path you have there isn't quite right (neither was mine) but I think you've got that under control.
    You can give anm explicit path, then you can have different users with different start-in values and store their properties there automatically.

  • Making a Java Program run by itself

    Hi all I was wondering if there is anyway for me to make my game run by itself without using my java compiler bluej.
    Here is some information on my program I think will be helpful
    Its a Class
    I save highscores to a notepad file
    I use a lot of images
    I have audio within it
    I also have classes out side of it that runs inside of it like Emeny, Item
    Edited by: Quickfingers90 on Jun 11, 2009 4:21 AM

    Quickfingers90 wrote:
    I used Bluej to make my jar file from my message from above could someone post the code in a very simple format that any programmer can understand it.What are you asking? How to deploy your application in a JAR? [http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]
    edit: I don't know if you've heard of idea, but many people in this forum swear by it: start simple and do things one step at a time. For example:
    Doing something new like JARring an application?
    Start with a "hello world"-type program. You may not have a console window when running the JAR, so you should write to a file, or use a JOptionPane.
    Try accessing a resource, like an image or sound file zipped in the JAR. Hint: don't use file paths or File objects -- the resource is part of a JAR, now. See:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html#getresource]

  • How is the performance of Mac Pro if i use it as host for windows and linux virtual machines.

    How is the performance of Mac Pro if i use it as host for windows and linux virtual machines.
    I am planning to buy a high performance PC to run my Windows and Linux servers as vitrual machines for my testing purposes.
    Initially i planned to build my own computer with recommended configurations but considering space constaints and cooling factors i think Mac Pro can be a choice. But need some inputs if Mac pro (Intel Xeon E5, 12 GB RAM) is good for running virtual Machines.

    You could even run Windows natively and still run your VM servers.
    I have seen reports and such on MacRumors and elsewhere - run Windows natively as well as VMs (can also do testing and run Mavericks in a VM under Mavericks)
    The fast internal PCIe-SSD, plus 6 or 8 cores, and 32-64GB RAM. Of course for $5,000 for 8-core, some Thunderbolt storage and 32GB/64GB RAM you can buy some serious hardware.

  • How to close Internet Explorer and other programs running on Windows?

    In order for Flash Player to be installed or updated, any programs that use Flash Player must be closed.  This includes Internet Explorer or other browsers, instant messengers, Skype, etc.
    These programs may be running in the background, not as visible windows, but need to be closed anyway.
    To close such programs use the Windows Task Manager.  To start Task Manager, take any of the following actions:
    Press CTRL+ALT+DELETE, and then click Task Manager.
    Press CTRL+SHIFT+ESC.
    Right-click an empty area of the taskbar, and then click Task Manager.
    Once the Task Manager is running, select the Processes tab.  On older Windows version you may need to click on the Process Name or Image Name header to sort the process names.
    Now right-click on every process that the Flash Player installer needs to close (e.g. iexplore.exe), then select End Process.
    It would be desirable if the Flash Player installer could perform that action by itself; I have therefore created an enhancement request.  If you were affected by this problem, please head over to the Bugbase and vote for this request: https://bugbase.adobe.com/index.cfm?event=bug&id=3548136

    See How to close Internet Explorer and other programs running on Windows?

  • Process name representation in a LINUX machine for a JAVA program running..

    Hi,
    We are using an Intel machine loaded with Red Hat Linux 7.2 OS to run JAVA programs. We have a requirement to calculate the CPU and MEMORY usage for each JAVA program running. Unfortunately when a java program is run say "java ESR" and we run a ps -ef | grep -i java, it is shown as hkumar 2847 2799 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2874 2847 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2875 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2876 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2877 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2878 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2879 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2880 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2881 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2882 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2883 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2884 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    hkumar 2885 2874 0 19:15 pts/3 00:00:00 /usr/java/jdk1.3.1_03/bin/i386/n
    instead of the actual name of the program ie. ESR.
    Does anybody know why this happens? Is there a way out to ensure that "ps -ef | grep java" gives the actual name of the java program being RUN?
    Thanks in advance,
    Harish

    You have less chance to identify which programm that VM instance is running right now.
    But you could (as we do) keep track of your programs if you save the process-id when you start the program.
    We need this to shut down running java batch programs but you could find out the used system resources with this way as well...

  • Can I write a Java Program in Narrative view and make it work?

    Hi All,
    I got a requirement which demands me to write a java program in narrative view. As per my knowledge its not possible..........but do you guys have any work around or any other way to get that java program run when the report runs and the out must be seen on the dashboard???
    Thanks in advance,
    DK

    Joe thanks for the reply. I would like to communicate with a JavaScript API (MapQuest) by declaring a Proxy server and port number to communicate. Or I can directly use Java SDK to display maps.
    This is more a general question. If I can execute a java program then I will try doing many things.
    Thanks,
    DK

  • Executing WINWORD from both Windows and linux using Java

    Dear All,
    I have a problem when trying to use Runtime class to execute a winword document. My code is as follows.
    Runtime r= Runtime.getRuntime();
    try{
    r.exec("rundll32"+" "+"url.dll,FileProtocolHandler"+" "+"WINWORD"+ " "+"file://C://welkom.doc");
    catch(Exception ex){
    System.out.println("Unable to open the doc file:"+ex);
    When I execute this swing application with the above, the program is unable to open the specific file. And it says "Problem with the short cut, unable to open the file". When I run the program without the file name, it opens a new doc file.
    Attn: what I want to do here is I need to open the winword file from both windows and linux. So I cannot use the relative path of the WINWORD.exe file.
    Can anyone help me?
    Thanks in advance.
    Regards,
    Bala

    If you take a look at the api, there's an exec(String[]) method. This is the one you should use when calling a command with multiple parameters.
    so something like...
    String[] cmd = new String[] {"rundll32", "url.dll,FileProtocolHandler", "WINWORD", "file://C://welkom.doc"}
    r.exec(cmd);

  • Adding Java program as a Windows service

    Hi all,
    How can I run a Java program as a Windows service?

    There are free tools available...just google it.
    Try http://jslwin.sourceforge.net/

  • Is there any way to check another Java program running status?

    HI. I want to write a Java program on hand-set but my program seems needs lots of resources and if there is another Java program running on the same hand-set simultaneously, my program will slow down. So, I want to check if there is another Java program is running on the hand-set, my program will show a message to user reminding user to close another program first.
    Is there any way to do so?

    On most recent devices, the application is not terminated but paused by using phone functions, and can be reactivated from the aplication management software. The javax.microedition.midlet package documentation is quite specific, if a tad obscure, about the MIDlet lifecycle and the role of the MIDelt methods vis-a-vis the AMS.
    {color:#0000ff}http://java.sun.com/javame/reference/apis/jsr037/javax/microedition/midlet/package-summary.html{color}
    Parenthetically, I've never been able to figure out how resumeApp should be used, nor have I seen this method invoked in any of the samples that come with the WTK, but I haven't gone through all of them.
    I believe the still-in-progress MIDP3 will make it possible to have MIDlets that share the screen with native apps and which can be minimized and restored.
    db

  • Differences on Windows and Linux JVM about java.util.zip package

    Hello, there!
    I need some help if someone else has already face this problem.
    I have a Java server that process the bytes of a SWF File stored in the server and ouptut it to the user through a Servlet. The file was decompressed and re-compressed using the java.util.zip package (Deflater/Inflater).
    Everything works fine on Windows Server 2008 server. But now we need to migrate the server to Linux. The problem is that when I test the website now, the file seens to be corrupted.
    What really intrigues me is that everything runs normal on Windows Server configuration, when changed to Linux, the final file seens to be corrupeted... what could possible be the cause? Is there any difference between java.util.zip package on Window and Linux JVM?
    My Windows Server is:
    . Windows Server 2008 (6.0 - x86)
    . Apache 2.2.11
    . Tomcat 6.0.16.0
    . Java JDK 1.6.0_12-b04
    My CentOS Server is
    . CentOS 5.4 (2.6.18-164.15.1.el5 - i386)
    . Apache 2.2.3
    . Tomcat 6.0.16.0
    . Java JDK 1.6.0_12-b04
    Please, if someone could give me a lead, I would appreciate very much!
    Thank you all in advance,
    CaioToOn!

    ejp wrote:
    Thank you for the answer, but no. The path is correct.That's not what he meant. Zip file/directory entries are supposed to use / as the path separator. It is possible to use \ but such Zip files will only work under Windows. You may have erred here.Ohhh, I had really missunderstood what Ray said. But, I still think that this is not the problem, since the ZIP is a single SWF file generated by Flex SDK 3.4 and compressed in the ZLIB open standard (as in page 13, at [http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v9.pdf|http://www.adobe.com/devnet/swf/pdf/swf_file_format_spec_v9.pdf] ). This is how Flash Compiler compress the files.
    jschell wrote:
    If the above suggestions do not solve the problem...Specify in detail with the exact steps used how you determined that it was corrupted.The reason why I believe the SWF is getting corrupted is that when it is loaded by Flash Player (in the client-side) the Player throws a VerifyError: Error # 1033. The [documentation says (see error 1033)|http://help.adobe.com/en_US/AS3LCR/Flash_10.0/runtimeErrors.html] that this error means that the SWF file is corrupted.
    As I said, what intrigues me is that this work perfectly in a Windows Server 2008 server. I just had setup a CentOS server and deployed the application. The client-remains unchanged, so why could the result change?
    raychen wrote:
    I would remove the side effect you are doing and send the file straight through, with decompress and compress, the servlet. It is more likely that you have a bug in your swf processor than the zip library.
    I had already tried it when first coding, in Windows Server 2008, it had not worked.
    Thank you all for the help.
    CaioToOn!

  • All design programs running extremely slow and takes forever to save and sometimes shuts down randomly?

    Ok so  I'm a design student at a community college (about to graduate soon and will be continuing on getting my BFA) I have all of the creative cloud suite. I have Illustrator, Photoshop, Lightroom, InDesign, etc. Recently I started having problems with all of the programs. Whenever I work in the programs they would run extremely slow. Recently, I tried to save a .eps file that was only about 1.2 GB and it took me an hour to save, and this was when I was working off of my computer desktop. When I place the .eps file in Indesign, everything would go blank and it would freeze up. Also I had an error sign popping up from InDesign saying "out of memory". Im not sure if that is related to my computer's hard drive or indesign itself. I just started using creative suite so the creative suite is pretty new to me. Sometimes in Indesign when I do the Command+w to preview the whole project, it would be completely black and showing nothing and I would hit escape and the whole software screws up. Then I would do a force quit on the software and then Indesign would say there was a serious error and must shut down. That error message has been popping up several times now. I also talked to Apple support and they suggested me doing a Repair disk utility (which I am currently doing right now) and also recommended me contacting Adobe since they know their software. I checked software to see if there is any updates that is needed but everything is up to date. I'm not quite sure why its acting like this so I'm reaching out both to Apple and Adobe to see if both can help me solve the problem. If anybody had experienced this problem before and could help me troubleshoot this issue that would be great.

    I installed the creative suite about a year ago, and this just started happening last weekend. I didn't think it would be a problem and that it would last for a day since I was working on InDesign all day and Illustrator and it usually goes away after I finish using the programs. But this has been occurring for about a week now and has not gone away. and yes the other programs are running slow. I was trying to resize some images for a client and Photoshop was acting extremely slow  when I was trying to resize the image and also place an image into a 8x10 document in Photoshop. I'm not sure how to find my system specifications.
    All design programs running extremely slow and takes forever to save and sometimes shuts down randomly? 

  • My java program runs fine even if i don't specify access specifier of class

    Hi,
    My java program runs fine even if i don't specify access specifier of class as public .
    Then why do they say that atleast one class should be specified as public.
    please help.

    public access specifier is the default access
    specifier
    so if you dont give the access specifier before the
    class name it is not wrong.I think that you are wrong. The default specifier is package or "package-private".
    See here:
    http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
    Message was edited by:
    petes1234

Maybe you are looking for