Re: target release conflicts with default source release
- From: "Redbeard" <tom.cowdery@xxxxxxxxxxx>
- Date: 9 Sep 2006 13:17:05 -0700
Thomas Hawtin wrote:
Doug Pardee wrote:Thanks! My code compiled OK with just -source added, but some other
Redbeard wrote:
I'm trying to compile some code to release 1.4 because it needs to run
on some older Mac's that don't have Java 5. But I keep getting the
error message "target release conflicts with default source release 1.5"
Add "-source 1.4" to the javac command line.
You should also use -bootclasspath.
Consider this source code.
class Target {
public static void main(String[] args) {
new StringBuffer().append(new StringBuffer());
}
}
$ /usr/java/j2sdk1.4.2_11/bin/javac Target.java
$ ~/1.3/jdk1.3.1_18/jre/bin/java Target
Exception in thread "main" java.lang.NoSuchMethodError
at Target.main(Target.java:3)
$ /usr/java/j2sdk1.4.2_11/bin/javac -bootclasspath
~/1.3/jdk1.3.1_18/jre/lib/rt.jar Target.java
$ ~/1.3/jdk1.3.1_18/jre/bin/java Target
$
Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
code might not. This will save me having to ask a similar question
again.
.
- References:
- target release conflicts with default source release
- From: Redbeard
- Re: target release conflicts with default source release
- From: Doug Pardee
- Re: target release conflicts with default source release
- From: Thomas Hawtin
- target release conflicts with default source release
- Prev by Date: Re: Need suggestion for online tutorials in network programming with java
- Next by Date: Re: target release conflicts with default source release
- Previous by thread: Re: target release conflicts with default source release
- Next by thread: Re: target release conflicts with default source release
- Index(es):
Relevant Pages
|
|