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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:35:10+00:00 2026-05-27T00:35:10+00:00

I am trying to work from my thumbdrive, therefore i am setting the java

  • 0

I am trying to work from my thumbdrive, therefore i am setting the java path the java installion inside of my own thumbdrive. However, i am not always on a PC that is always a “G:\”, sometimes it may be H or F depending on how many devices are currently connected.

How may i rewrite this bat so that it is more dynamic?

set Path=G:\dev\04 jdk\jdk1.6.0_29\bin;%Path%

".\dev\01 ide\eclipse-jee-indigo-SR1-win32\eclipse.exe"

pause
  • 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-27T00:35:10+00:00Added an answer on May 27, 2026 at 12:35 am

    The drive the file was started from is in %~d0 (%0 being the files full start path).
    If the drive was G:\ then after double clicking the file in explorer, or running C:\>G:\the.bat then %~d0 === G:

    So you can;

    set Path=%~d0\dev\04 jdk\jdk1.6.0_29\bin;%Path%
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to work out the hits per hour from a database. Data
I'm trying to cast away const from an object but it doesn't work. But
I'm trying to call the MyJavascriptFunction(arg1) from an asp button and it's doesn't work...
Trying to work with groupby so that I can group together files that were
Weve recently been trying to work on an application that uses pandastream to encode
Why does the following work from the prompt but fail when stuck inside a
I'm trying to get EasyPrint to work from workstations running Windows Server 2003, connecting
Background I've picked up some incomplete work from another developer that involves displaying the
i'm trying to get a results set that displays 2 columns from 2 different
I'm trying to get two Ruby apps to work from the same port. 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.