Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » run programs on a different machine(generated jar file does not run)
run programs on a different machine [message #1146593] Sun, 20 October 2013 08:50 Go to next message
Franz-Josef Lindemann is currently offline Franz-Josef LindemannFriend
Messages: 3
Registered: November 2010
Location: Frankfurt, Germany
Junior Member
I have tested my program (converting XML structure into csv format) within Eclipse. Now I have generated the jar-file and want to run the program on a different machine. But I get the error:

java.lang.ClassNotFoundException: org.apache.xmlbeans.XmlException

I have copied my Java-environment to a stick and want to run the program with the environment on the stick only.

The program still runs on the machine where I developed it but not on the other machine.

Here is my .bat-file with the statements:

REM start of .bat-file

SET CLASSPATH=K:\java\JRE\lib;K:\java\JRE\lib\ext;c:\windows
SET PATH=K:\java\JRE\bin;%PATH%
java -jar K:\work\testprog\testprog.jar

REM end of .bat-file

Additionally I identified an extra row in the protocol of the second machine saying:
Picked up _JAVA_OPTIONS:-Duser.home=<windows directory>

What's wrong?
How can I go on with the analyse, i.e. identify from where the apache-class is loaded in the functioning develop-machine?

Thanks for your help.
Re: run programs on a different machine [message #1150596 is a reply to message #1146593] Tue, 22 October 2013 22:05 Go to previous message
Doug Slavens is currently offline Doug SlavensFriend
Messages: 6
Registered: September 2013
Junior Member
It's probably that there are other dependent jar files in your eclipse project that are not set in the classpath of your bat file. You could look in the project explorer in eclipse to see what other jar files are being used or you could print the value of your environment to the console window when your program is running to see what the value of the classpath is during execution from within eclipse.
Previous Topic:Creating a web project programmatically
Next Topic:Exporting Ant scripts
Goto Forum:

Current Time: Thu Jun 21 16:39:53 GMT 2018

Powered by FUDForum. Page generated in 0.01665 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top