Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardThe problem is due to the space character in the path.
Try enclosing in quotes:
"C:\\Program Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE"
Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardHow do I do it? I followed the instructions in MF website below;
http://supportline.microfocus.com/documentation/books/nx40/dijint.htm
I even modifies my MFJ.CFG (as you suggested above, this time with double quotes) as follows;
"C:\\Program Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE"
But still the error (or message) is appearing when compiling Java class in NetExpress V3.10 as displayed below;
#JavaClass
Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardIt appears as if there was a bug in the NX 3.1 product in handling these spacey filenames even with quotes around them.
This was fixed in 4.0 and later products.
For NX 3.1 use the short filename version instead:
"C:\\Progra~1\\Java\\jdk1.7.0_51\\bin\\javac.exe" -verbose
Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardHi Chris,
Yes. I modified the MFJ.cfg into the following;
"C:\\Progra~1\\Java\\JDK17~1.0_5\\bin\\JAVAC.EXE" -verbose
And it worked so far... except that new error is displayed, as below (screenshot is attached);
package javax.ejb does not exist
Tried searching for the file in NetExpress and Java folder and really I can't find any of that file.
I guess this a Java file, but is there any help that you can share this time? Thanks Chris, this really is time consuming. I just wanted to use Java compiled application which I will use experimenting with JSPs.
#JavaClass#cobolnetexpress
Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardThe "package javax.ejb does not exist" is because the CLASSPATH does not point to a j2ee.jar file, resource classically provided by the Java AS...
Yvon
Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardHi Yvon,
From my "Environment Variable", I already added CLASSPATH as follows;
CLASSPATH=C:\\Program Files\\MERANT\\Net Express\\Base\\BIN
Downloaded the (a) j2ee.jar and even (b) javax.ejb.jar and recompiled the application created in NetExpress V3.10 but the same error is displaying. Even copied these two jar files into "C:\\Program Files\\Java\\jdk1.7.0_51\\bin", which is my Java folder.... it still won't work.
Does Microfocus have a separate JAR files in this situations?
Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardHi,
The CLASSPATH has to point to the .jar file, not the DIR where it is installed i.e. CLASSPATH=c:\\myDIR\\j2ee.jar; ..... the same for MF .jar files.
j2ee.jar is not provided by MF, but by the Java AS.
Yvon
Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardYes Yvon, I already replaced my classpath (under environment variables) into;
CLASSPATH=C:\\Program Files\\Java\\jdk1.7.0_51\\bin
And even copied mfcobol.jar into such directory (as it needed I guess), but it is still showing me this display;
I followed everything except probably I am using and downloaded "jdk-7u51-windows-i586.exe" software devkit from Java/Oracle.
#J2EE#JavaClass
Hi,
Most of the time I am using COMponent, thus compiling all my application class in NetExpress Cobol. Currently I am experimenting NetExpress creating/compiling Java class (in Cobol wizard). I installed "Java SE Development Kit 7u51/compilers 32-bit" and so far I could compile the java sample code (cj2Bean.cbl) using NetExpress V3.10 command prompt.
Now I started creating Java class in NetExpress on my own using wizard... but when compiling, it says;
javac: invalid flag: Files\\Java\\jdk1.7.0_51\\bin\\JAVAC.EXE
I already included the PATH of java compiler in my Environment Variables. Any adjustments that I have to make??
#JavaclasswizardI am still not quite sure when your CLASSPATH points to j2ee.jar...
I did this quick test using this simple Java class.... since the issue encountered can be reproduced with a simple Java code
===
import javax.ejb.EJBException;
import javax.ejb.SessionContext;
import javax.ejb.SessionBean;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class Test3 implements SessionBean{
public void whatever() throws EJBException, NamingException
{
SessionContext context;
javax.ejb.SessionContext context1;
InitialContext ctx = new InitialContext();
}
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbRemove() {}
public void setSessionContext(SessionContext ctx) {}
}
===
javac with CLASSPATH not pointing to j2ee.jar
LOG:
Test3.java:1: error: package javax.ejb does not exist
import javax.ejb.EJBException;
^
Test3.java:2: error: package javax.ejb does not exist
import javax.ejb.SessionContext;
^
Test3.java:3: error: package javax.ejb does not exist
import javax.ejb.SessionBean;
^
Test3.java:8: error: cannot find symbol
public class Test3 implements SessionBean{
^
symbol: class SessionBean
Test3.java:9: error: cannot find symbol
public void whatever() throws EJBException, NamingException
^
symbol: class EJBException
location: class Test3
Test3.java:19: error: cannot find symbol
public void setSessionContext(SessionContext ctx) {}
^
symbol: class SessionContext
location: class Test3
Test3.java:11: error: cannot find symbol
SessionContext context;
^
symbol: class SessionContext
location: class Test3
Test3.java:12: error: package javax.ejb does not exist
javax.ejb.SessionContext context1;
^
8 errors
===
javac with CLASSPATH pointing to j2ee.jar
i.e. set CLASSPATH=.\\j2ee.jar;%CLASSPATH% ( j2ee.jar on current working DIR )
javac Test3.java indicates no error....
===
When it would still not work, possibly next step would be to create an incident by MF Customer Care...
I do notice you are using "Net Express V3.10".... quite an old MF product....
Anyway & nevertheless, I still think it has to be a CLASSPATH issue...
:) Yvon