Hi ....
I am trying to compile my generated Java code.
Then I am getting an error .... "javac": CreateProcess error=2.
The command is ... javac -d C:/Converter/Webapps_Source_Files/Sample/web/WEB-INF/classes -classpath C:/Converter/spring_library/spring.jar;
C:/Converter/spring_library/servlet-2.2.jar;C:/Converter/Webapps_Source_Files
/Sample/web/WEB-INF/classes C:/Converter/Webapps_Source_Files/Sample/src/java/org/iitkgp/erp/controllers
/ViewJSP.java
I am running it ... in Console, it's running perfectly.But whenever I trying to do it with Runtime.exec(command) then I am getting this error.
Please help!
Debasis Jana.
9 15006
Don't do it that way: read about the ToolProvider class and the JavaCompiler
interface (you need Java 1.6 for them).
kind regards,
Jos
Don't do it that way: read about the ToolProvider class and the JavaCompiler
interface (you need Java 1.6 for them).
kind regards,
Jos
I am buliding a Code Converter Tool where I am generating some Java files and compiling those files.
I tried it in my machine after changing the path in Windows Environment.
It was running fine.
But now I am runing in different machine after changing the path.
The path is set correctly because it's running from console fine ...
Please help.
Debasis Jana.
I am buliding a Code Converter Tool where I am generating some Java files and compiling those files.
I tried it in my machine after changing the path in Windows Environment.
It was running fine.
But now I am runing in different machine after changing the path.
The path is set correctly because it's running from console fine ...
Please help.
Debasis Jana.
The "CreateProcess: error = 2" means that the ProcessBuilder can't find your
executable file. You have to check your path. The tip I gave you doesn't need
that executable file javac.exe (which simply tries to fire up another jvm; javac is
written in java itself, remember?) But feel free to ignore my tip.
kind regards,
Jos
The "CreateProcess: error = 2" means that the ProcessBuilder can't find your
executable file. You have to check your path. The tip I gave you doesn't need
that executable file javac.exe (which simply tries to fire up another jvm; javac is
written in java itself, remember?) But feel free to ignore my tip.
kind regards,
Jos
How silly I am ....
Every time i ignore your tip.
Sorry I ll see it ....
Debasis Jana.
Every time i ignore your tip.
Finally .
The "CreateProcess: error = 2" means that the ProcessBuilder can't find your
executable file.
Jos
Hey Jos,
I also got this error the other day. Basically an IOException was thrown and this appeared as the message. So I looked at the doc for IOException but couldn't find anything related.
this should be there in the java docs...right? And if it is there in the java doc, where will I find it?
Hey Jos,
I also got this error the other day. Basically an IOException was thrown and this appeared as the message. So I looked at the doc for IOException but couldn't find anything related.
this should be there in the java docs...right? And if it is there in the java doc, where will I find it?
I didn't find it in the API docs either so I experimented a bit and tried to start
something non-existent such as "foobar"; then this error came up; I guess
it's an OS completion code which is returned by a native method 'create' in
a ProcessImpl class (which extends the Process class) so I lost track there.
kind regards,
Jos
I didn't find it in the API docs either so I experimented a bit and tried to start
something non-existent such as "foobar"; then this error came up; I guess
it's an OS completion code which is returned by a native method 'create' in
a ProcessImpl class (which extends the Process class) so I lost track there.
kind regards,
Jos
Ok.
Btw I also did a similar experiment, after fixing the problem by guess work :)
Ok.
Btw I also did a similar experiment, after fixing the problem by guess work :)
I guess great minds think alike ...
Sign in to post your reply or Sign up for a free account.
Similar topics
by: King W.Wang |
last post by:
Hi Java gurus,
I've copied the following program from the book "Java by Examples".
It compiles well with javac. But it does not run as expected.
EXPECTED:
It is expected that, when you input...
|
by: Phillip Montgomery |
last post by:
Hello all;
I'm trying to debug an issue with a java script called, SelectSockets.
It appears to be a fairly common one found on the web. I downloaded
the SGI Java v1.4.1 installation from SGI's...
|
by: D E |
last post by:
Ok the subject line is basically the question. Obviously this won't work.
What is the technical reason?
Is it because here, "test1" is sort of like a static object now?
What exactly is "test1"...
|
by: Steven Buroff |
last post by:
I can't seem to get the @SuppressWarnings("unchecked") to work.
Here is my test program.
public class Tryit {
@SuppressWarnings({"unchecked"})
public <T> T doit(Class<T> clazz){
T val =...
|
by: joecch |
last post by:
If I have many jar files used to compile my java application, can I use wildcard (the example is shown below) in order to eliminating the full paths for each jar files that make the command clumsy?
...
|
by: maheshnew2007 |
last post by:
Hi,
I have simple Ant's build.xml file, which contains fork="yes".
build.xml file:
<?xml version="1.0"?>
<project name="test" default="compile" basedir=".">
<property name="src"...
|
by: pjerald |
last post by:
package test;
import java.util.ArrayList;
public class MyArrayList{
public static void main(String args)
{
ArrayList al = new ArrayList();
al.add("Jerald");
...
|
by: Ananthu |
last post by:
Hi
This is my codings in order to access mysql database from java.
Codings:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
|
by: rcreddych |
last post by:
I am getting the following error while deploying a simple Java Stored Procedure. I am using db2 8 and using the IBM Data Studio. I am new to DB2. Your help will be apreciated.
CHETR.PROCEDURE1 -...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |