Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8761079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:12:12+00:00 2026-06-13T15:12:12+00:00

I want to compile java code that uses some Java’s deprecated sun packages and

  • 0

I want to compile java code that uses some Java’s deprecated “sun” packages and Gradle compile task fails with this error

error: package com.sun.xml.internal.ws.developer does not exist

I am using Hotspot JDK and I can see this package there (so it actually exists – in rt.jar file)
I also tried to add rt.jar itself into Gradle dependencies:

compile files( 'C:/Program Files/Java/jdk1.7.0_05/jre/lib/rt.jar')

but with no effect

here is my gradle -v output:

------------------------------------------------------------
Gradle 1.2
------------------------------------------------------------

Gradle build time: Streda, 2012, september 12 10:46:02 UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_05 (Oracle Corporation 23.1-b03)
OS: Windows 7 6.1 amd64

I also tried to add jaxws-rt.jar to classpath – no effect neither

I would really appreciate any help

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:12:13+00:00Added an answer on June 13, 2026 at 3:12 pm

    It’s Oracle’s intent that these classes be inaccessible at compile-time.

    See the response to this javac bug report.

    For a likely solution, see Using internal sun classes with javac . The javac -XDignore.symbol.file switch should fix this – but I’m a gradle newb, and don’t see how to feed this to gradle’s JavaCompile. My best guess is

      apply plugin: 'java' 
      compileJava.options.useAnt = true 
      compileJava.options.compilerArgs << "-XDignore.symbol.file" 
    

    Incidentally, ct.sym (referred to in the link) appears to be a jar-file that lists, as class stubs, all the accessible classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In C++ if we do not want some statements to compile into code that
I have some code which uses java.awt.Color. I want to translate my Java Code
I'm trying to convert to Java some code that uses SDL. I'm using the
This should be simple but I'm having trouble changing some C code that uses
I want to compile my .java's (several) into one .jar that are compatible with
I want to compile the Rigi source code but I get some error while
I am trying to match some Java code that has mismatched strings in it.
I have this java program that I want to package within a jar. It
I want compile some GUI into a Windows standalone application ( *.exe ). The
I want to compile php sqlite3 with custom compile option. to do that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.