I have a java project built in eclipse in my Windows machine. Now i had to run it in Linux machine. I created a jar , and i am trying to run the jar.
The main class, takes a XML file as input. Previously on Windows, i had given path of the file in Windows. Now i kept the .xml file in the root location in Unix.
can i modify the code in Windows, to the root path of Linux machine and try to run the jar.
I did it like this ,
XYZ parsero = new XYZ("//root//workflow.xml");
Created the jar and tried to run in Unix.
I got the below exception.
java.net.UnknownHostException: root
How do i need to run this.
I got the solution. It should be XYZ parsero = new XYZ("/root/workflow.xml"); unlike in Windows
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.