cancel
Showing results for 
Search instead for 
Did you mean: 

Compile java file from mbscore.jar

Former Member
0 Kudos

Hi all,

I have a problem with recompiling the FrontServlet from the mbscore.jar file. I have added some logging into this file, but when I try to compile it via

"javac FrontServlet.java"

I am getting 88 erros.

I want to add the jar file into this sentence, something like:

"javac FrontServlet.java -sourcepath mbscore.jar"

, but this is not working. I am getting the same 88 errors.

I am using this site as refference: http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html#options

Can someone help me with this?

Thanks in advance,

Bart Elshout

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I tried something else, because I was wrong:

"javac -sourcepath mbscore.jar FrontServlet.java"

But now I am getting 85 erros (cannot resolve symbol).

I hope someone can help me.

Thanks in advance,

Bart Elshout

Former Member
0 Kudos

hi bart,

try using the -classpath option rather than the sourcepath; and use the complete

path of your jar files. other than the mbscore.jar, also include the MI libraries.

regards

jo

Former Member
0 Kudos

Hi Jo,

I think I am still missing some libraries or something:

javac -classpath <libraries> FrontServlet.java

The libraries I included (with full path reference):

- tools.jar

- mbscore.jar

- crimson.jar

- db2ejdbc.jar

- jasper.jar

- jaxp.jar

- MEg.jar

- pinstall.jar

- servlet.jar

- webserver.jar

- xalan.jar

I only added 9 lines with some lines with the following code:

System.out.println("<Text>");

So the code should be ok, but I get 88 errors again.

I hope you can help me. Thanks in advance and kind regards,

Bart Elshout

Former Member
0 Kudos

hello bart,

i decompiled the FronServlet.java, added some sysout lines just like what you did.

i was able to compile it without any errors at all. here's what i have in my command

line. the generated class file is stored in the folder specified by the -d option i.e. in

the D:\02PRJ\JDEV\FSC\classes folder. (note the command is in one line)

D:\02PRJ\JDEV\FSC\src>javac

-classpath D:\02PRJ\MELIB\sp9\MEg.jar;D:\02PRJ\MELIB\sp9\servlet.jar;

D:\02PRJ\MELIB\sp9\webserver.jar;D:\02PRJ\MELIB\sp9\jasper.jar;

D:\20TST\MAM\mbscore.jar

-d D:\02PRJ\JDEV\FSC\classes

D:\02PRJ\JDEV\FSC\src\com\sap\mbs\core\web\FrontServlet.java

hope this gives you an idea. if you still get errors, try adding the -verbose option &

let me know what error was that.

regards

jo

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jo,

Thanks you helpt me a lot, it is working.

Thanks in advance and kind regards,

Bart Elshout