Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't compile on later JDKs #17

Closed
ingenthr opened this issue Nov 21, 2011 · 10 comments
Closed

can't compile on later JDKs #17

ingenthr opened this issue Nov 21, 2011 · 10 comments

Comments

@ingenthr
Copy link
Contributor

Was trying the latest JDK on a random EC2 box today and found that there's a dependency on non-public API. I think that's what's wrong anyway.

[javac] /root/faban/driver/src/com/sun/faban/driver/engine/RunInfo.java:937: package com.sun.tools.javac does not exist
[javac]             int errorCode = com.sun.tools.javac.Main.compile(arg);
[javac]                                                ^

This is with the Sun/Oracle JDK:

java -version

java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)

@shanti
Copy link
Collaborator

shanti commented Nov 27, 2011

I ran into this too recently on Windows when trying to build faban from
scratch. I don't think the OS matters as it happened on RHEL as well with
the same JDK version (the latest that I downloaded about a couple of weeks
ago). Was meaning to ask Akara about it but didn't get around to it.
Akara - any thoughts?

Shanti

On Sun, Nov 20, 2011 at 7:12 PM, Matt Ingenthron <
reply@reply.github.com

wrote:

Was trying the latest JDK on a random EC2 box today and found that there's
a dependency on non-public API. I think that's what's wrong anyway.

[javac]
/root/faban/driver/src/com/sun/faban/driver/engine/RunInfo.java:937:
package com.sun.tools.javac does not exist
[javac] int errorCode =
com.sun.tools.javac.Main.compile(arg);
[javac] ^

This is with the Sun/Oracle JDK:

java -version

java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)


Reply to this email directly or view it on GitHub:
#17

@shanti
Copy link
Collaborator

shanti commented Nov 27, 2011

On Sun, Nov 27, 2011 at 1:13 PM, Shanti Subramanyam (gmail) <
shanti.subramanyam@gmail.com> wrote:

I ran into this too recently on Windows when trying to build faban from
scratch. I don't think the OS matters as it happened on RHEL as well with
the same JDK version (the latest that I downloaded about a couple of weeks
ago). Was meaning to ask Akara about it but didn't get around to it.
Akara - any thoughts?

Shanti

On Sun, Nov 20, 2011 at 7:12 PM, Matt Ingenthron <
reply@reply.github.com

wrote:

Was trying the latest JDK on a random EC2 box today and found that
there's a dependency on non-public API. I think that's what's wrong anyway.

[javac]
/root/faban/driver/src/com/sun/faban/driver/engine/RunInfo.java:937:
package com.sun.tools.javac does not exist
[javac] int errorCode =
com.sun.tools.javac.Main.compile(arg);
[javac] ^

This is with the Sun/Oracle JDK:

java -version

java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)


Reply to this email directly or view it on GitHub:
#17

@shanti
Copy link
Collaborator

shanti commented Nov 28, 2011

JDK7?
Nope, can't use it yet. The compilation API seemed to have changed. It was non-public anyway, but the whole world used it as there was nothing else that worked.

-Akara

Sent from my iPhone

On Nov 27, 2011, at 1:14 PM, "Shanti Subramanyam (gmail)" shanti.subramanyam@gmail.com wrote:

On Sun, Nov 27, 2011 at 1:13 PM, Shanti Subramanyam (gmail) shanti.subramanyam@gmail.com wrote:
I ran into this too recently on Windows when trying to build faban from scratch. I don't think the OS matters as it happened on RHEL as well with the same JDK version (the latest that I downloaded about a couple of weeks ago). Was meaning to ask Akara about it but didn't get around to it.
Akara - any thoughts?

Shanti

On Sun, Nov 20, 2011 at 7:12 PM, Matt Ingenthron reply@reply.github.com wrote:
Was trying the latest JDK on a random EC2 box today and found that there's a dependency on non-public API. I think that's what's wrong anyway.

[javac] /root/faban/driver/src/com/sun/faban/driver/engine/RunInfo.java:937: package com.sun.tools.javac does not exist
[javac] int errorCode = com.sun.tools.javac.Main.compile(arg);
[javac] ^

This is with the Sun/Oracle JDK:

java -version

java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)


Reply to this email directly or view it on GitHub:
#17

@ingenthr
Copy link
Contributor Author

Note, this is not a JDK 7 thing. It's gone in 1.6.0_27, actually.

Well, there was some indication that I just needed tools.jar, but even after I ensured that was in the classpath, still no go.

I found some postings that indicated what the replacement was, but the replacement had a very different API. I started to put together a patch, but just didn't have time right then.

@shanti
Copy link
Collaborator

shanti commented Nov 30, 2011

Just to verify, I rebuilt it in a brand new directory from scratch on a Mac
using JDK 1.6.0_26 and it works without a problem.
But it doesn't work on Windows or Linux even with the requisite tools.jar

Shanti

On Mon, Nov 28, 2011 at 8:01 AM, Matt Ingenthron <
reply@reply.github.com

wrote:

Note, this is not a JDK 7 thing. It's gone in 1.6.0_27, actually.

Well, there was some indication that I just needed tools.jar, but even
after I ensured that was in the classpath, still no go.

I found some postings that indicated what the replacement was, but the
replacement had a very different API. I started to put together a patch,
but just didn't have time right then.


Reply to this email directly or view it on GitHub:
#17 (comment)

@shanti
Copy link
Collaborator

shanti commented Nov 30, 2011

I'll try with 1.6.0_27. I just rebuilt it with JDK1.6 in October when we had a ton of perf work here without problems. It certainly was not _27.

-Akara

From: Shanti Subramanyam <shanti.subramanyam@gmail.commailto:shanti.subramanyam@gmail.com>
Reply-To: "faban-users@googlegroups.commailto:faban-users@googlegroups.com" <faban-users@googlegroups.commailto:faban-users@googlegroups.com>
Date: Wed, 30 Nov 2011 11:42:47 -0800
To: Matt Ingenthron <reply@reply.github.commailto:reply@reply.github.com>, "faban-users@googlegroups.commailto:faban-users@googlegroups.com" <faban-users@googlegroups.commailto:faban-users@googlegroups.com>
Subject: Re: [faban] can't compile on later JDKs (#17)

Just to verify, I rebuilt it in a brand new directory from scratch on a Mac using JDK 1.6.0_26 and it works without a problem.
But it doesn't work on Windows or Linux even with the requisite tools.jar

Shanti

On Mon, Nov 28, 2011 at 8:01 AM, Matt Ingenthron <reply@reply.github.commailto:reply%2Bi-2300996-04f5ac9efbddfac5cb73da36017296b9011146e7-72508@reply.github.com> wrote:
Note, this is not a JDK 7 thing. It's gone in 1.6.0_27, actually.

Well, there was some indication that I just needed tools.jar, but even after I ensured that was in the classpath, still no go.

I found some postings that indicated what the replacement was, but the replacement had a very different API. I started to put together a patch, but just didn't have time right then.


Reply to this email directly or view it on GitHub:
#17 (comment)

@jvirkki
Copy link
Contributor

jvirkki commented May 9, 2012

I ran into this as well, compiling with jdk1.6.0_20

Adding tools.jar to the classpath in build.xml fixed it:

% git diff build.xml
diff --git a/driver/build.xml b/driver/build.xml
index 95cd0d2..0a4a30c 100644
--- a/driver/build.xml
+++ b/driver/build.xml
@@ -38,6 +38,7 @@

     <path id="class.path">
         <fileset dir="lib" includes="*.jar"/>
+        <fileset dir="${jdk.home}/lib" includes="tools.jar"/>
     </path>

     <path id="test.class.path">

@shanti
Copy link
Collaborator

shanti commented Jun 21, 2012

Did you add a 'jdk.home' property in build.properties?

Shanti

On Wed, May 9, 2012 at 3:03 PM, jvirkki <
reply@reply.github.com

wrote:

I ran into this as well, compiling with jdk1.6.0_20

Adding tools.jar to the classpath in build.xml fixed it:

% git diff build.xml
diff --git a/driver/build.xml b/driver/build.xml
index 95cd0d2..0a4a30c 100644
--- a/driver/build.xml
+++ b/driver/build.xml
@@ -38,6 +38,7 @@

<path id="class.path">
    <fileset dir="lib" includes="*.jar"/>
  •    <fileset dir="${jdk.home}/lib" includes="tools.jar"/>
    

Reply to this email directly or view it on GitHub:
#17 (comment)

@jvirkki
Copy link
Contributor

jvirkki commented Jun 21, 2012

No, jdk.home is already set in driver/build.properties

shanti added a commit to shanti/faban that referenced this issue Jun 21, 2012
Fix for Issues akara#17 - can't compile on JDK 1.6/1.7
@shanti
Copy link
Collaborator

shanti commented Jun 21, 2012

yes - thanks. Don't know how I missed that.
I have now committed this change.

Shanti

On Wed, Jun 20, 2012 at 5:41 PM, Jyri J. Virkki <
reply@reply.github.com

wrote:

No, jdk.home is already set in driver/build.properties


Reply to this email directly or view it on GitHub:
#17 (comment)

shanti added a commit that referenced this issue Jun 22, 2012
Added tools.jar to the classpath of the driver and harness build files
@shanti shanti closed this as completed Jun 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants