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 9121445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:51:51+00:00 2026-06-17T05:51:51+00:00

TFile depends on java.nio.file.Path (toPath() method returns java.nio.file.Path) that isn’t available on Java 6

  • 0

TFile depends on java.nio.file.Path (toPath() method returns java.nio.file.Path) that isn’t available on Java 6 so calling any TFile method on Java 6 throws “java.lang.NoClassDefFoundError: java/nio/file/Path”

How do you manage to use TFile on Java 6? What I’m thinking of is getting the sources, re-compiling them without this method and using a patched version which is kind of unpleasant solution.

  • 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-17T05:51:52+00:00Added an answer on June 17, 2026 at 5:51 am

    No, TrueZIP 7 does not require JSE 7, JSE 6 is enough as the home page documents. However, some features are only available on JSE 7 (e.g. the TrueZIP Path module) and hence a run time test is performed.

    With correct class loader implementations you will never see NoClassDefFoundError. However, some environments have broken class loader implementations which do eager class loading – despite the lazy class loading which is mandated by the spec. Only then you would get a NoClassDefFoundError.

    On another note, please mind the Eclipse license of the project. If you really wanted to fix this by patching (you can’t because there are circular dependencies between java.io.File and java.nio.file.Path which are the reason for this design), then you would have to publish this fork.

    Appendix:

    The Java Language Specification for Java 6, chapter 12.2.1 “The Loading Process” reads:

    Different subclasses of ClassLoader may implement different loading policies. In particular, a class loader may cache binary representations of classes and interfaces, prefetch them based on expected usage, or load a group of related classes together. These activities may not be completely transparent to a running application if, for example, a newly compiled version of a class is not found because an older version is cached by a class loader. It is the responsibility of a class loader, however, to reflect loading errors only at points in the program where they could have arisen without prefetching or group loading.

    English isn’t my mother tongue, but I take it from the last sentence that eager class loading is OK as long as the class loader doesn’t throw up just because an unused class failed to load eagerly. So if a class loader throws up because TFile.toPath() needs to return a java.nio.file.Path although you never call this method then I consider this to be a problem with the class loader. As an aside, TFile.toPath() throws an UnsupportedOperationException – please check the Javadoc for details.

    I would have preferred to take another route but the circular dependency between java.io.File.toPath() and java.nio.file.Path.toFile() left me with no choice.

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

Sidebar

Related Questions

I am trying to use the FileWalkTree() method in JDK 7 (java.nio.file) . To
I have a 'tafile' which contains files with complete path '/home/usr/path/to/file'. When I extract
This is a script that Upload a file in all directory. But when i
I have a file- message.txt that contains raw data, my application reads the file,
When I invoke: File input = new File(cmake.tar.gz); TFile sourceFile = new TFile(input); TFile
I have some problems with a PHP script that calls a Bash script.... in
is there a way to see if an instace of tfile stream is being
I want to creat this xml file from a txt file... i do this
Is it possible to change the newline character the .readline() method looks for while
Im currently creating a tile-based game for android. Using java via dalvik JVM. im

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.