Getting UnknownHostException While Executing Java Class In Linux Machine

Oct 16, 2014

Find the error log here ......

[pccbuildmgr@svl-jbuild-d1 Logical_Versioning]$ java -jar VersionUpdate1.jar

Picked up _JAVA_OPTIONS: -Xmx10g -XX:MaxPermSize=10g

can get the values for 1.0

java.net.UnknownHostException: home
at java.net.PlainSocketImpl.connect(PlainSocketImpl.j ava:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.j ava:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)

[Code] ....

View Replies


ADVERTISEMENT

Executing Java Class From SRC Folder In JSP Page?

Apr 14, 2014

I want to execute a class from src folder in JSP page. But i have receiving the error only..,

Java Code:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@page import="ServerInitiator" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

[Code] ....

My package structure is :

I have try by using the above, is their any perfect way to call this..

View Replies View Related

Class Not Found Exception While Executing XQuery Using Java

Aug 8, 2014

I am validating an xml file using XQuery in Java using XQJ API. When the query is triggered it is giving the ClassNotFoundException for orai18n.text.OraCollator. I have placed the orai18n-collation.jar file in MANIFEST.MF file and it is loaded in to the class path.

Not sure on why it is giving the exception.

The JDK i am using JDK1.7 and application server is weblogic.

View Replies View Related

Java Code To Access Windows Machine From Unix Machine

Feb 28, 2014

I have a requirement where I have to send a file from a local system to unix box(present on client side) using java code.I have developed a code that is successfully sending the file from local system to client side unix box (I am connecting to client side unix box using VPN) provided I run the code in my eclipse IDE present in local system. But when I am running the same code in the unix box it is throwing null pointer exception.Might be the unix system is not recognising the local system. Please find the code.
 
package abc;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.Properties;
import com.jcraft.jsch.Channel;

[Code] ....

Error on unix box which I am getting is :-
 
Inside sftpConnection method
llllllll
fffffffffffff
Connection Successfull
Channel Connection Succesfull
aaaaa
Inside findFile method
Exception in thread "main" java.lang.NullPointerException
        at abc.TranferFile.sftpConnection(TranferFile.java:58)
        at abc.TranferFile.main(TranferFile.java:21)

View Replies View Related

Class File Compiled In Linux Mint Does Not Work On Windows

Dec 20, 2014

Is Java really cross platform programming language?

I compiled a .java file and tested it on linux mint, then I tried to run it on windows vista but it did not run.

The message is: Error: Could not find or load main class myClassName.

The JDK is 8

View Replies View Related

Executing Perl Script From Java

Mar 17, 2014

How to correct these warning?

View Replies View Related

How To Install Java In Linux

Apr 5, 2014

I am trying to install Java on my Debain based Linux OS and can`t seen to figure it out. I first typed "chmod +x jdk-8-nb-8-linux-i586.sh", than typed "./ jdk-8-nb-8-linux-i586.sh" to install it. It started to install, but than it gave my this message: (computer name has been changed)

bobsmith@bobsmiht-OptiPlex-GX620:~/Downloads$ ./jdk-8-nb-8-linux-i586.sh
Configuring the installer...
Searching for JVM on the system...
Preparing bundled JVM ...
./jdk-8-nb-8-linux-i586.sh: 1: eval: /tmp/.nbi-5045119.tmp/jre-7u4-linux-i586.bin: not found
Cannot prepare bundled JVM to run the installer.
Most probably the bundled JVM is not compatible with the current platform.

How do I fix this? My Linux computer is not connected to the internet, I don`t know if this is a problem or not.

View Replies View Related

Is There Any Java GUI Editor For Linux

Jul 29, 2014

Not a Java editor with a GUI, but and editor for editing Java GUI's (Graphically (With JFrame, Swing etc) (Kinda like FrontPage for HTML only for Java/Linux. You just add stuff / drag objects around and then optionally review the code after..

View Replies View Related

Running Java File From Linux CMD

Apr 24, 2014

import acm.util.* ;
import acm.program.*;
import java.awt.* ;
class Chap6_ex1 extends ConsoleProgram {
public void run() {
println("This program displays a randomly schosen card.");
int number = rgen.nextInt(1 ,13);
int suit = rgen.nextInt(1 ,4);

[Code] ....

I am running the this from a Linux command line , in the cmd first i use :

javac -classpath acm.jar Chap6_ex1.java

end then :

java -cp .:acm.jar Chap6_ex1

The output i m getting after second command is :

Exception in thread "main" acm.util.ErrorException: Cannot determine the main class.
at acm.program.Program.main(Program.java:1358)

I know the problem is from the RandomGenerator class in packet acm.util.* but i dont know how to fix the problem . Every other program has worked . What I am missing or how this whole issue of packet importing works when running a java file from cmd ?

View Replies View Related

ATM Machine - Inner Listener Class

Mar 31, 2014

Couple of problems here...

1. I am trying to use the getSource method in my inner class, in order to set the JPasswordField within an Inner Listener Class. This is a 4 integer password, setup by my for statement in the loop. I know what I want the program to do, but I don't know the correct language to use. I want the user to press one of the keys (0-9), that value be stored in JPassword (at least I think that is how it works) and for it to display the "*" in the Field---I want this to loop 4x. How do I use the getSource() to do this.

Also, I believe I need to use the set and get methods for the password entered into the JPassField, is that correct? The inner class is not recognizing my the object password that represents the JPasswordField.

2. In my second Inner Listener Class, clearButton, I set the event.getSource method to reset the JPasswordField to " ", when the clear button is pressed. Again, the problem is that the inner class does not recognize password. Why is this the case, since it is still a part of the parent class Atm?

Java Code: import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class Atm extends JFrame {
Atm(){
super("ATM");
int i = 0;
//Create Panels For ATM
JPanel buttonPanel1 = new JPanel(); //To Contain Digits 1-9
buttonPanel1.setLayout(new GridLayout(4, 3));

[code]...

View Replies View Related

Run Sudo Linux Commands From Java Program

Apr 6, 2014

I want to find information about running sudo commands from java, but without gksudo/kdesudo.

This is my code. It works, but after removal "sudo" element.

Java Code:

String array[]={"sudo", "dolphin"};
Process proc = null;
try {
proc = Runtime.getRuntime().exec(array);
}
catch (IOException e) {
e.printStackTrace();
} mh_sh_highlight_all('java');

How I can insert password in this terminal? I tried write pass after array with commands and in, and even in outputstream.

View Replies View Related

Networking :: Connecting To Remote Windows Machine From Local Machine Using SSH2

Apr 11, 2014

I have developed a code to connecting remote windows M/C from local M/C by using SSH2 (ganymed-ssh2-build209.jar) API. when I run the code its giving below error. Is there any other way to connect remote windows system using java code.
 
Exception.
 
java.io.IOException: There was a problem while talking to <host name>:22
  at ch.ethz.ssh2.Connection.connect(Connection.java:642)
  at ch.ethz.ssh2.Connection.connect(Connection.java:460)
  at Connect.RemoteServer.ConnectWindowsServer.runCommand(ConnectWindowsServer.java:55)
  at Connect.RemoteServer.ConnectWindowsServer.main(ConnectWindowsServer.java:27)
Caused by: java.net.ConnectException: Connection refused: connect

[Code] ....
 
JAVA Code

import ch.ethz.ssh2.Connection;
import ch.ethz.ssh2.Session;
 public void setAuthenticationInfo(String hostname, String username,String password) {
       this.host = hostname;
       this.userid = username;
       this.password = password;      
       this.recentCommand = "";     
       System.out.println("setting authentication info completed for host=" + host );
 
[Code] .....

View Replies View Related

Running Java Program In 32bit / 64bit Versions Of Linux

Jul 17, 2014

I wrote some java applications on my computer, which is 32-bit Ubuntu 12.04 LTS. Could the application run on both 32-bit and 64-bit versions of linux? Or could it only run on 32-bit versions of linux?

System.out.println(System.getProperty("sun.arch.da ta.model")); // outputs 32

I would like to know if I run it on a 64-bit version of linux if it will take advantage of the performance advantages of 64 bits.

View Replies View Related

What Is Java Virtual Machine

Mar 5, 2014

What is Java Virtual Machine (Java VM)?

View Replies View Related

Could Not Create The Java Virtual Machine

Dec 11, 2014

I keep getting this error:-
/opt/solr# java -v
Unrecognized option: -v
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

View Replies View Related

Could Not Create Java Virtual Machine

Jan 19, 2012

Since a few weeks i receive windows reports with the text: "Could not create the Java virtual machine". That were not disturbing, but now i would like to play a game that based on Java, but every time I would start it, the message come and the game do not start. The game called "Edna and Harvey: The Breakout" (German: Edna bricht aus) and is developed by a german game studio called "Daedalic entertainment".

View Replies View Related

Java Virtual Machine Launcher

May 1, 2015

I created a program and am able to run it perfectly fine in netbeans/cmd. Then I made an .exe file with "Launch4j" and every time that I run the .exe file I get the following error: Java Virtual Machine Launcher: "A Java Exception has occurred."

Here in detail:

Exception in thread "main" java.lang.NoClassDefFoundError: edu/cmu/sphinx/util/props/PropertyException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)

[code]...

View Replies View Related

Vending Machine Program - Inheritance In Java

Mar 24, 2015

I'm making a vending machine program to practice inheritance and have a few questions. My superclass is a Soda class, and I'm making subclasses like "Orange soda", "Coke", etc. My first question is, what is the point of the subclass inheriting the instance variables of the superclass? If you have to define them again is there any point in the super class having them? Here is an example of this:

My superclass:

public abstract class Soda {

public double price;
public int numAvailable;
public String name;
public String machineCode;

[code]...

Besides not having to write the vendSoda() method again, what is the benefit of inheritance in a situation like this if you have to define all variables again? My second question is, how could I store all of the code strings from all of the different subclasses in one place? (so when the user enters a code it can search for the code entered to give the desired soda)...

View Replies View Related

Java - Connection With Time Attendance Machine In Network

Apr 15, 2015

I'm working in project, my theme is to develop an application management system for fingerprint and RFID card attendance machine in java programming language.

My problem i didn't find documentation in java for connecting with this device.

View Replies View Related

Virtual Machine Launcher - Java Exception Has Occurred

Apr 29, 2014

I developed a Java application and it works fine on my computer, but when i tried it on another computers, I have the following errors :

A window named Java Virtual Machine Launcher appears and it says "A Java Exception has occured".

My application don't even launch.

Here is the error lines, but I don't know what to do :

C:UsersAdministrateur_localserveurtimet>java -jar ServeurTimeT.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: TimeTracking/
ServeurTimeT : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)

[Code] ....

Java is up to date.

View Replies View Related

Accessing File On Remote Ubuntu Machine Using Java

Mar 3, 2015

From java running on Windows, I need to access a file on a remote Ubuntu machine. I use the following:

URL U = new URL ( "http://" + SERVER_IP + ":" + SERVER_PORT + "/" + ClsName + ".class" );

where:

SERVER_IP is the Ubuntu IP address obtained from any site that shows the IP address of the machine you are using.SERVER_PORT is the Ubuntu port where the server is listening.

Now:

Do I need to modify this code any further?Do I need to configure the Windows and/or Ubuntu machine(s) for this to work? 

View Replies View Related

Enterprise JavaBeans :: Virtual Machine Has Aborted Error During Java EE SDK Install

Aug 5, 2014

I'm trying to install java_ee_sdk-6u3-jdk7-windows-x64.exe on our new Windows Server 2012 machine but the installer starts and I then get a Setup box appear that says Error: The Java(TM) Virtual Machine has aborted.  I've looked in the Event Viewer and there are no messages and I've tried to get the installer to create a log file (by passing the parameter -l <loglocation>) but it doesn't seem to get that far as no log is created.
 
The very first time I tried to run the JavaEE install on this machine, it installed everything ok but didn't create the windows service as .NET Framework 3.5 was missing.  So I uninstalled JavaEE and added in the .NET Framework 3.5 and then my problems began.  I have already installed these versions of Java and JavaEE successfully on a previous Windows Server 2012 machine which had the .NET Framework 3.5 on it. 
 
The JRE installed already on the computer is jre-6u45-windows-x64.exe and I am logged in as an administrator.  I've tried uninstalling the JRE and reinstalling and also doing a registry clean using CCleaner incase there are any old references to the JRE/JavaEE but it didn't work.

View Replies View Related

Executing A Program With Several Classes

Apr 29, 2015

I am working my way through "Head First Java" and typing the code in the book into Notepad++ as I go. In the first few chapters the code was simple and only had one class (main). Now the code has two or more classes. Originally I would compile the code in the Command Window by typing "javac" and the program's name. After it compiled I would execute the program by typing "java -classpath . " and the program's name. However, now when program has several classes I get the following error: Could not find or load main class. Below is a program I am having issues with... does it need to be saved as two separate files?

class DogTestDrive {
public static void main (String [] args) {
Dog one = new Dog();
one.size = 70;
Dog two = new Dog();
two.size = 8;

[Code] ....

View Replies View Related

Executing Jar With Multiple Libraries

May 16, 2015

I am not necessarily 'new' to java, however I have always used NetBeans so I am not entirely sure how to do what I need with the terminal commands. I am trying to execute a java jar file(which works perfectly on windows) on the Raspberri Pi, essentially debian linux.

As I mentioned previously, I have a java jar file which I can execute on windows, but it depends on three other libraries, namely RXTX, MySQL, and JSON. I am not positive how to compile this into a jar, or execute it in debian.

This was how I attempted to load two of those libraries, however the last line is the error I received.

Direct copy from the terminal:

pi@raspberrypi ~/Desktop $ java -Djava.library.path=/usr/lib/jni -cp /usr/share/java/RXTXcomm.jar:/usr/share/java/mysql-connector-java-5.1.10.jar:. Automation_System.core.HAS

Error: Could not find or load main class Automation_System.core.HAS

Specifically, the problem seems to be that I cannot use the -cp flag to indicate classpaths, and the -jar flag indicating I am executing a jar in the same command. I am not sure how to point the compiler to my main class HAS in the core package of the jar, and also to the libraries referenced.

View Replies View Related

Print Out Statement After Executing To ThreadPoolExecutor?

Jul 26, 2014

I'm trying to make a statement of elapsed time print out after I've executed everything with a ThreadPoolExecutor. What happens is that instead of printing out after all the iterations within the for each loop are done, it prints out the elapsed statement in the middle of the iterations or even in the beginning of the whole execute() method. Here is my code:

package com.atem;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
public final class Example {

[Code]...

View Replies View Related

Jar Files Not Executing / Running Under Windows 8.1

Dec 14, 2014

I've just installed the last Java kit JDK plus netbeans and I've done my first project in Java. It is running perfect from command line<but is is difficult to execute each time from there my tests> but I couldn't run the jar file from windows with double click he jar file even I've spent 3 hour on google to find different methods (registry modifying, control panel/program running in windows, a patch file etc, ) ....

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved