Bootclasspath? [message #258001] |
Fri, 09 January 2009 02:22  |
Eclipse User |
|
|
|
Hi,
this question is not directly related to the Eclipse IDE. I've got to
mantain a Java tool that uses JDT to compile some sources, both 1.4 and
1.5, and should be run using a Java 5 runtime.
I have some issues when compiling 1.4 sources (targetting 1.4 platform): I
set the properties org.eclipse.jdt.core.compiler.compliance,
org.eclipse.jdt.core.compiler.source and
org.eclipse.jdt.core.compiler.codegen.targetPlatform to 1.4 so I was able
to compile the code, but now I have a runtime error (invalid BigDecimal
constructor). I suspect this is because JDT compiles against the Java 5
runtime libraries.
Is there any property I can set to force JDT to compile against another
runtime? A sort of "bootclasspath" that I should use with javac.
Thank you.
Regards,
Andrea Bianchi
|
|
|
|
Re: Bootclasspath? [message #258013 is a reply to message #258001] |
Fri, 09 January 2009 09:44   |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 1/9/2009 2:22 AM, andrea bianchi wrote:
> Hi,
>
> this question is not directly related to the Eclipse IDE. I've got to
> mantain a Java tool that uses JDT to compile some sources, both 1.4 and
> 1.5, and should be run using a Java 5 runtime.
> I have some issues when compiling 1.4 sources (targetting 1.4 platform):
> I set the properties org.eclipse.jdt.core.compiler.compliance,
> org.eclipse.jdt.core.compiler.source and
> org.eclipse.jdt.core.compiler.codegen.targetPlatform to 1.4 so I was
> able to compile the code, but now I have a runtime error (invalid
> BigDecimal constructor). I suspect this is because JDT compiles against
> the Java 5 runtime libraries. Is there any property I can set to force
> JDT to compile against another runtime? A sort of "bootclasspath" that I
> should use with javac.
In addition to setting the compiler compliance, you should also be
setting the JRE Lib to a 1.4 JRE/JDK. that is easy to do in the IDE
(Project Properties > Java Build Path > Libraries tab), but I'm not sure
how you are setting those kinds of things non-interactively.
Hope this helps,
Eric
|
|
|
Re: Bootclasspath? [message #258067 is a reply to message #258013] |
Tue, 13 January 2009 02:37  |
Eclipse User |
|
|
|
Thank you for your answers... in the meanwhile I decided to rewrite that
module of the application avoiding jdt to compile classes.
Thank you again,
Andrea
|
|
|
Powered by
FUDForum. Page generated in 0.03746 seconds