Results 1 to 5 of 5

Thread: Problem in running java on intranet

  1. #1
    Join Date
    Aug 2006
    Posts
    209

    Problem in running java on intranet

    Hi Friends,
    I was facing some problem while making code of Java chat application that is to be used in an intranet. So thought that posting you, I will definitely get some help. Starting with the problem when I made a code for the Java chat application and tried to Run that code on single machine, it worked fine. Now when I am trying to run this program on two computers, keeping one as server and other as client, I am not able to use the clients command prompt to run the program. Does anyone out there knows the better way to run the java program at the client side. Please help me soon..!!
    Blessings to you

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Problem in running java on intranet

    I think that you can use the Java Archive concept of the Java programming language. You can easily package an application's entire set of resources and classes into a Java Archive (JAR). You can use the java command's -jar option to execute a jar file. When installed on an OS like Microsoft Windows the Java Runtime Environment (JRE) also gets installed which associates jar files with the JVM. So you have to double-click on them to run the application. A file called MANIFEST.MF is stored in a directory called META-INF inside the JARs.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Problem in running java on intranet

    You can check the following coding and can make changes as you desire. When I checked the coding it was working fine on the Intranet. Hope that it will be some useful for you. Here is the coding :

    Properties props = System.getProperties();
    props.put("mail.smtp.host", host);
    Session session = Session.getInstance(props, null);

    try {
    MimeMessage msg = new MimeMessage(session);
    msg.setFrom(new InternetAddress(from));
    InternetAddress[] address = {new InternetAddress(to)};
    msg.setRecipients(Message.RecipientType.TO, address);
    msg.setSubject(subject);

    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setText(msgText1);

    MimeBodyPart mbp2 = new MimeBodyPart();

    FileDataSource fds = new FileDataSource(filename);
    mbp2.setDataHandler(new DataHandler(fds));
    mbp2.setFileName(fds.getName());

    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    msg.setContent(mp);
    msg.setSentDate(new java.util.Date());

    Transport.send(msg);
    flag=true;

    }catch (MessagingException mex) {
    mex.printStackTrace();
    }

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Problem in running java on intranet

    I will suggest you to use the Java Plug-in. Java Plug-in is a software product from Sun Microsystems, Inc. that allows enterprise web managers to direct JavaBeans and Java applets components on their intranet web pages to run using Sun's Java Runtime Environment (JRE). The Sun has made available a variety of technical documentation to assist in your deployment of Java Plug-in. The features of the Java Plug-in are mentioned below :
    • Full Java Compatible support.
    • Key capabilities to enterprises using Internet Explorer or Netscape's Navigator on Win32 and Solaris desktops.
    • Full JDK 1.1 support.
    • Free Java Plug-in HTML Converter.

  5. #5
    Join Date
    May 2008
    Posts
    2,012

    Re: Problem in running java on intranet

    You will need to download and store the Java binary file on web server to deploy plug-in in intranet environments with Internet Explorer. Then you need to modify the codebase attribute inside the <OBJECT> tag in HTML file to pint to the binary. It is recommended that you use the .exe version, rather than the .cab version for the codebase attribute in the OBJECT tag. The .cab version on java.sun.com may point to an updated version that you do not want to use for your deployment. Hope that you will get some help from this post..!

Similar Threads

  1. Running the Java Swing application in a Web browser
    By Namuchi in forum Software Development
    Replies: 5
    Last Post: 23-07-2010, 03:33 AM
  2. Intranet with Java programs
    By New ID in forum Software Development
    Replies: 5
    Last Post: 02-03-2010, 12:39 PM
  3. Running simple java program.....
    By Kushan in forum Software Development
    Replies: 4
    Last Post: 16-11-2009, 03:38 AM
  4. Replies: 3
    Last Post: 18-05-2009, 05:09 PM
  5. Java not running?
    By Din_the1 in forum Windows Software
    Replies: 3
    Last Post: 09-01-2009, 10:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,125,547.49896 seconds with 17 queries