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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:17:01+00:00 2026-05-20T20:17:01+00:00

So basically I just want to debug a couple of simple scripts by trying

  • 0

So basically I just want to debug a couple of simple scripts by trying a new method, I have been successful in the past by hooking the URL.class (using the source from the jdk and recompling), however I realized that how can I print out a string, before it is even a string?

I want to be able to write to file, or print out, any string that goes through the string class, but how can I create a pipe method when I am within the string class itself?

I.e. a char array is being passed into the string, how do I grab that, make it a string and send it to the print out command from within the string class? If I am too vague I will provide some examples.

  • 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-05-20T20:17:01+00:00Added an answer on May 20, 2026 at 8:17 pm

    IMO, it is a really bad idea to tweak the implementations of Java standard classes, even if you are only doing it to try and debug something. The problem is that you can break things really badly.

    For instance, @Roflcoptr suggests that you add a System.out.println(...) to each String constructor. But what would happen if the PrintStream.println call tried to construct a String for some reason? And what would happen during JVM bootstrapping if something tried to construct a String … before the System.* stream objects were initialized?

    I’m not saying it won’t work. I’m not saying you can’t make it work. I’m am saying that hackery like this is liable to fail in spectacular and horrible ways.

    My advice would be to find another way to debug / diagnose your problem. For example, set a breakpoint on the relevant String constructor.

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

Sidebar

Related Questions

One simple method I've used in the past is basically just creating a second
i basically just want to pick a random value in a string split by
I'm writing an application that is basically just a preferences dialog, much like the
I've just written a small XBox 360 Wireless Controller managed interface that basically wraps
Just got a request from my boss for an application I'm working on. Basically
Basically what I want to do it this: a pdb file contains a location
Basically I have some code to check a specific directory to see if an
Basically I am trying to restart a service from a php web page. Here
Okay, so basically I want to be able to retrieve keyboard text. Like entering
I have an application I am writing for Android that basically does a screen

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.